ldftra_c3d.h90 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. !!----------------------------------------------------------------------
  2. !! *** ldftra_c3d.h90 ***
  3. !!----------------------------------------------------------------------
  4. !!----------------------------------------------------------------------
  5. !! NEMO/OPA 3.3 , NEMO Consortium (2010)
  6. !! $Id: ldftra_c3d.h90 3634 2012-11-22 17:32:14Z acc $
  7. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  8. !!----------------------------------------------------------------------
  9. SUBROUTINE ldf_tra_c3d( ld_print )
  10. !!----------------------------------------------------------------------
  11. !! *** ROUTINE ldftra_c3d ***
  12. !!
  13. !! ** Purpose :
  14. !! initializations of non uniform horizontal eddy diffusivity coef.
  15. !!
  16. !! ** Method :
  17. !! 3D eddy diffusivity coefficients ( longitude, latitude, depth )
  18. !!
  19. !! biharmonic operator : ahtt = defined at T-level
  20. !! ahtu,ahtv,ahtw never used
  21. !!
  22. !! harmonic operator (ahtt never used)
  23. !! iso-model level : ahtu, ahtv defined at u-, v-points
  24. !! isopycnal : ahtu, ahtv, ahtw defined at u-, v-, w-pts
  25. !! or geopotential
  26. !!
  27. !! eddy induced velocity
  28. !! always harmonic : aeiu, aeiv, aeiw defined at u-, v-, w-pts
  29. !!----------------------------------------------------------------------
  30. USE ioipsl
  31. !
  32. LOGICAL, INTENT (in) :: ld_print ! If true, output arrays on numout
  33. !!----------------------------------------------------------------------
  34. IF( lk_traldf_eiv ) THEN
  35. IF(lwp) WRITE(numout,*)
  36. IF(lwp) WRITE(numout,*) ' ldf_tra_c3d : 3D eddy diffusivity and eddy induced velocity coefficients'
  37. IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ -- '
  38. IF(lwp) WRITE(numout,*) ' Coefficients set to constant'
  39. ELSE
  40. IF(lwp) WRITE(numout,*)
  41. IF(lwp) WRITE(numout,*) ' ldf_tra_c3d : 3D eddy diffusivity coefficient'
  42. IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ -- '
  43. IF(lwp) WRITE(numout,*) ' Coefficients set to constant'
  44. ENDIF
  45. ! biharmonic operator (T-point)
  46. ! -------------------
  47. ahtt(:,:,:) = aht0 ! set ahtt at T-point (here no space variation)
  48. CALL lbc_lnk( ahtt, 'T', 1. ) ! Lateral boundary conditions on ( ahtt )
  49. IF(lwp .AND. ld_print ) THEN ! Control print
  50. WRITE(numout,*)
  51. WRITE(numout,*) 'inildf: ahtt at k = 1'
  52. CALL prihre( ahtt(:,:,1), jpi, jpj, 1, jpi, 1, &
  53. & 1, jpj, 1, 1.e-3, numout )
  54. ENDIF
  55. ! harmonic operator (U-, V-, W-points)
  56. ! -----------------
  57. ahtu(:,:,:) = aht0 ! set ahtu = ahtv at u- and v-points,
  58. ahtv(:,:,:) = aht0 ! and ahtw at w-point
  59. ahtw(:,:,:) = aht0 ! (here example: no space variation)
  60. CALL lbc_lnk( ahtu, 'U', 1. ) ! Lateral boundary conditions
  61. CALL lbc_lnk( ahtv, 'V', 1. )
  62. CALL lbc_lnk( ahtw, 'W', 1. )
  63. IF(lwp .AND. ld_print ) THEN ! Control print
  64. WRITE(numout,*)
  65. WRITE(numout,*) 'inildf: ahtu at k = 1'
  66. CALL prihre( ahtu(:,:,1), jpi, jpj, 1, jpi, 1, &
  67. & 1, jpj, 1, 1.e-3, numout )
  68. WRITE(numout,*)
  69. WRITE(numout,*) 'inildf: ahtv at k = 1'
  70. CALL prihre( ahtv(:,:,1), jpi, jpj, 1, jpi, 1, &
  71. & 1, jpj, 1, 1.e-3, numout )
  72. WRITE(numout,*)
  73. WRITE(numout,*) 'inildf: ahtw at k = 1'
  74. CALL prihre( ahtw(:,:,1), jpi, jpj, 1, jpi, 1, &
  75. & 1, jpj, 1, 1.e-3, numout )
  76. ENDIF
  77. # if defined key_traldf_eiv
  78. aeiu(:,:,:) = aeiv0 ! set aeiu = aeiv at u- and v-points,
  79. aeiv(:,:,:) = aeiv0 ! and aeiw at w-point
  80. aeiw(:,:,:) = aeiv0 ! (here example: no space variation)
  81. IF( cp_cfg == "orca" .AND. jp_cfg == 4 ) THEN
  82. ! ! Cancel eiv in Gibraltar strait
  83. aeiu( mi0(68):mi1(71) , mj0(50):mj1(53) , : ) = 0.e0
  84. aeiv( mi0(68):mi1(71) , mj0(50):mj1(53) , : ) = 0.e0
  85. aeiw( mi0(68):mi1(71) , mj0(50):mj1(53) , : ) = 0.e0
  86. ! ! Cancel eiv in Mediterrannean sea
  87. aeiu( mi0(70):mi1(90) , mj0(49):mj1(56) , : ) = 0.e0
  88. aeiv( mi0(70):mi1(90) , mj0(49):mj1(56) , : ) = 0.e0
  89. aeiw( mi0(70):mi1(90) , mj0(49):mj1(56) , : ) = 0.e0
  90. ENDIF
  91. CALL lbc_lnk( aeiu, 'U', 1. ) ! Lateral boundary conditions
  92. CALL lbc_lnk( aeiv, 'V', 1. )
  93. CALL lbc_lnk( aeiw, 'W', 1. )
  94. IF(lwp .AND. ld_print ) THEN
  95. WRITE(numout,*)
  96. WRITE(numout,*) 'inildf: aeiu at k = 1'
  97. CALL prihre(aeiu(:,:,1),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
  98. WRITE(numout,*)
  99. WRITE(numout,*) 'inildf: aeiv at k = 1'
  100. CALL prihre(aeiv(:,:,1),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
  101. WRITE(numout,*)
  102. WRITE(numout,*) 'inildf: aeiw at k = 1'
  103. CALL prihre(aeiw(:,:,1),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
  104. ENDIF
  105. # endif
  106. END SUBROUTINE ldf_tra_c3d