[458] | 1 | MODULE traldf |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE traldf *** |
---|
| 4 | !! Ocean Active tracers : lateral diffusive trends |
---|
| 5 | !!===================================================================== |
---|
[2024] | 6 | !! History : 9.0 ! 2005-11 (G. Madec) Original code |
---|
| 7 | !! NEMO 3.0 ! 2008-01 (C. Ethe, G. Madec) merge TRC-TRA |
---|
[458] | 8 | !!---------------------------------------------------------------------- |
---|
[503] | 9 | |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
[2104] | 11 | !! tra_ldf : update the tracer trend with the lateral diffusion |
---|
| 12 | !! tra_ldf_init : initialization, namelist read, and parameters control |
---|
| 13 | !! ldf_ano : compute lateral diffusion for constant T-S profiles |
---|
[458] | 14 | !!---------------------------------------------------------------------- |
---|
| 15 | USE oce ! ocean dynamics and tracers |
---|
| 16 | USE dom_oce ! ocean space and time domain |
---|
| 17 | USE phycst ! physical constants |
---|
| 18 | USE ldftra_oce ! ocean tracer lateral physics |
---|
| 19 | USE ldfslp ! ??? |
---|
| 20 | USE traldf_bilapg ! lateral mixing (tra_ldf_bilapg routine) |
---|
| 21 | USE traldf_bilap ! lateral mixing (tra_ldf_bilap routine) |
---|
| 22 | USE traldf_iso ! lateral mixing (tra_ldf_iso routine) |
---|
[2236] | 23 | USE traldf_iso_grif ! lateral mixing (tra_ldf_iso_grif routine) |
---|
[458] | 24 | USE traldf_lap ! lateral mixing (tra_ldf_lap routine) |
---|
[2024] | 25 | USE trdmod_oce ! ocean space and time domain |
---|
| 26 | USE trdtra ! ocean active tracers trends |
---|
[458] | 27 | USE prtctl ! Print control |
---|
| 28 | USE in_out_manager ! I/O manager |
---|
| 29 | USE lib_mpp ! distribued memory computing library |
---|
| 30 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
| 31 | |
---|
| 32 | IMPLICIT NONE |
---|
| 33 | PRIVATE |
---|
| 34 | |
---|
[2024] | 35 | PUBLIC tra_ldf ! called by step.F90 |
---|
| 36 | PUBLIC tra_ldf_init ! called by opa.F90 |
---|
| 37 | ! |
---|
| 38 | INTEGER :: nldf = 0 ! type of lateral diffusion used defined from ln_traldf_... namlist logicals) |
---|
[458] | 39 | #if defined key_traldf_ano |
---|
[2104] | 40 | REAL, DIMENSION(jpi,jpj,jpk) :: t0_ldf, s0_ldf ! lateral diffusion trends of T & S for a constant profile |
---|
[458] | 41 | #endif |
---|
| 42 | |
---|
| 43 | !! * Substitutions |
---|
| 44 | # include "domzgr_substitute.h90" |
---|
| 45 | # include "vectopt_loop_substitute.h90" |
---|
[503] | 46 | !!---------------------------------------------------------------------- |
---|
[2287] | 47 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[1152] | 48 | !! $Id$ |
---|
[2287] | 49 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[503] | 50 | !!---------------------------------------------------------------------- |
---|
[458] | 51 | |
---|
| 52 | CONTAINS |
---|
| 53 | |
---|
| 54 | SUBROUTINE tra_ldf( kt ) |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
| 56 | !! *** ROUTINE tra_ldf *** |
---|
| 57 | !! |
---|
| 58 | !! ** Purpose : compute the lateral ocean tracer physics. |
---|
| 59 | !! |
---|
| 60 | !!---------------------------------------------------------------------- |
---|
[503] | 61 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 62 | !! |
---|
[2024] | 63 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrdt, ztrds |
---|
[458] | 64 | !!---------------------------------------------------------------------- |
---|
| 65 | |
---|
[2024] | 66 | IF( l_trdtra ) THEN !* Save ta and sa trends |
---|
| 67 | ALLOCATE( ztrdt(jpi,jpj,jpk) ) ; ztrdt(:,:,:) = tsa(:,:,:,jp_tem) |
---|
| 68 | ALLOCATE( ztrds(jpi,jpj,jpk) ) ; ztrds(:,:,:) = tsa(:,:,:,jp_sal) |
---|
[458] | 69 | ENDIF |
---|
| 70 | |
---|
| 71 | SELECT CASE ( nldf ) ! compute lateral mixing trend and add it to the general trend |
---|
[2082] | 72 | CASE ( 0 ) ; CALL tra_ldf_lap ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts ) ! iso-level laplacian |
---|
[2236] | 73 | CASE ( 1 ) |
---|
| 74 | IF ( ln_traldf_grif ) THEN |
---|
| 75 | CALL tra_ldf_iso_grif ( kt ) ! Griffies quarter-cell formulation |
---|
| 76 | ELSE |
---|
| 77 | CALL tra_ldf_iso ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts, ahtb0 ) ! rotated laplacian |
---|
| 78 | ENDIF |
---|
[2082] | 79 | CASE ( 2 ) ; CALL tra_ldf_bilap ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts ) ! iso-level bilaplacian |
---|
[2104] | 80 | CASE ( 3 ) ; CALL tra_ldf_bilapg( kt, 'TRA', tsb, tsa, jpts ) ! s-coord. horizontal bilap. |
---|
[503] | 81 | ! |
---|
| 82 | CASE ( -1 ) ! esopa: test all possibility with control print |
---|
[2082] | 83 | CALL tra_ldf_lap ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts ) |
---|
[2034] | 84 | CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf0 - Ta: ', mask1=tmask, & |
---|
| 85 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[2236] | 86 | IF ( ln_traldf_grif ) THEN |
---|
| 87 | CALL tra_ldf_iso_grif ( kt ) |
---|
| 88 | ELSE |
---|
| 89 | CALL tra_ldf_iso ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts, ahtb0 ) |
---|
| 90 | ENDIF |
---|
[2034] | 91 | CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf1 - Ta: ', mask1=tmask, & |
---|
| 92 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[2082] | 93 | CALL tra_ldf_bilap ( kt, 'TRA', gtsu, gtsv, tsb, tsa, jpts ) |
---|
[2034] | 94 | CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf2 - Ta: ', mask1=tmask, & |
---|
| 95 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[2082] | 96 | CALL tra_ldf_bilapg( kt, 'TRA', tsb, tsa, jpts ) |
---|
[2034] | 97 | CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf3 - Ta: ', mask1=tmask, & |
---|
| 98 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[458] | 99 | END SELECT |
---|
| 100 | |
---|
| 101 | #if defined key_traldf_ano |
---|
[2024] | 102 | tsa(:,:,:,jp_tem) = tsa(:,:,:,jp_tem) - t0_ldf(:,:,:) ! anomaly: substract the reference diffusivity |
---|
| 103 | tsa(:,:,:,jp_sal) = tsa(:,:,:,jp_sal) - s0_ldf(:,:,:) |
---|
[458] | 104 | #endif |
---|
[2024] | 105 | |
---|
[503] | 106 | IF( l_trdtra ) THEN ! save the horizontal diffusive trends for further diagnostics |
---|
[2024] | 107 | ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) |
---|
| 108 | ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) |
---|
| 109 | CALL trd_tra( kt, 'TRA', jp_tem, jptra_trd_ldf, ztrdt ) |
---|
| 110 | CALL trd_tra( kt, 'TRA', jp_sal, jptra_trd_ldf, ztrds ) |
---|
| 111 | DEALLOCATE( ztrdt ) ; DEALLOCATE( ztrds ) |
---|
[458] | 112 | ENDIF |
---|
| 113 | ! ! print mean trends (used for debugging) |
---|
[2024] | 114 | IF(ln_ctl) CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' ldf - Ta: ', mask1=tmask, & |
---|
| 115 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[503] | 116 | ! |
---|
[458] | 117 | END SUBROUTINE tra_ldf |
---|
| 118 | |
---|
| 119 | |
---|
[2024] | 120 | SUBROUTINE tra_ldf_init |
---|
[458] | 121 | !!---------------------------------------------------------------------- |
---|
[2024] | 122 | !! *** ROUTINE tra_ldf_init *** |
---|
[458] | 123 | !! |
---|
| 124 | !! ** Purpose : Choice of the operator for the lateral tracer diffusion |
---|
| 125 | !! |
---|
[1601] | 126 | !! ** Method : set nldf from the namtra_ldf logicals |
---|
[458] | 127 | !! nldf == -1 ESOPA test: ALL operators are used |
---|
| 128 | !! nldf == 0 laplacian operator |
---|
| 129 | !! nldf == 1 Rotated laplacian operator |
---|
| 130 | !! nldf == 2 bilaplacian operator |
---|
| 131 | !! nldf == 3 Rotated bilaplacian |
---|
| 132 | !!---------------------------------------------------------------------- |
---|
| 133 | INTEGER :: ioptio, ierr ! temporary integers |
---|
| 134 | ! |
---|
[1601] | 135 | ! NAMELIST/namtra_ldf/ ln_traldf_lap , ln_traldf_bilap, & |
---|
| 136 | ! & ln_traldf_level, ln_traldf_hor , ln_traldf_iso, & |
---|
| 137 | ! & rn_aht_0 , rn_ahtb_0 , rn_aeiv_0 |
---|
[458] | 138 | !!---------------------------------------------------------------------- |
---|
| 139 | |
---|
| 140 | ! Define the lateral mixing oparator for tracers |
---|
| 141 | ! =============================================== |
---|
| 142 | |
---|
[1601] | 143 | ! REWIND( numnam ) ! Namelist namtra_ldf already read in ldftra module |
---|
| 144 | ! READ ( numnam, namtra_ldf ) |
---|
[458] | 145 | |
---|
[503] | 146 | IF(lwp) THEN ! Namelist print |
---|
[458] | 147 | WRITE(numout,*) |
---|
[2024] | 148 | WRITE(numout,*) 'tra_ldf_init : lateral tracer diffusive operator' |
---|
[458] | 149 | WRITE(numout,*) '~~~~~~~~~~~' |
---|
[1601] | 150 | WRITE(numout,*) ' Namelist namtra_ldf : set lateral mixing parameters (type, direction, coefficients)' |
---|
| 151 | WRITE(numout,*) ' laplacian operator ln_traldf_lap = ', ln_traldf_lap |
---|
| 152 | WRITE(numout,*) ' bilaplacian operator ln_traldf_bilap = ', ln_traldf_bilap |
---|
| 153 | WRITE(numout,*) ' iso-level ln_traldf_level = ', ln_traldf_level |
---|
| 154 | WRITE(numout,*) ' horizontal (geopotential) ln_traldf_hor = ', ln_traldf_hor |
---|
| 155 | WRITE(numout,*) ' iso-neutral ln_traldf_iso = ', ln_traldf_iso |
---|
[2236] | 156 | WRITE(numout,*) ' iso-neutral (Griffies) ln_traldf_grif = ', ln_traldf_grif |
---|
[458] | 157 | ENDIF |
---|
| 158 | |
---|
[503] | 159 | ! ! control the input |
---|
[458] | 160 | ioptio = 0 |
---|
| 161 | IF( ln_traldf_lap ) ioptio = ioptio + 1 |
---|
| 162 | IF( ln_traldf_bilap ) ioptio = ioptio + 1 |
---|
[620] | 163 | IF( ioptio > 1 ) CALL ctl_stop( ' use ONE or NONE of the 2 lap/bilap operator type on tracer' ) |
---|
| 164 | IF( ioptio == 0 ) nldf = -2 ! No lateral diffusion |
---|
[458] | 165 | ioptio = 0 |
---|
| 166 | IF( ln_traldf_level ) ioptio = ioptio + 1 |
---|
| 167 | IF( ln_traldf_hor ) ioptio = ioptio + 1 |
---|
| 168 | IF( ln_traldf_iso ) ioptio = ioptio + 1 |
---|
[503] | 169 | IF( ioptio /= 1 ) CALL ctl_stop( ' use only ONE direction (level/hor/iso)' ) |
---|
[458] | 170 | |
---|
| 171 | ! defined the type of lateral diffusion from ln_traldf_... logicals |
---|
[902] | 172 | ! CAUTION : nldf = 1 is used in trazdf_imp, change it carefully |
---|
[458] | 173 | ierr = 0 |
---|
[620] | 174 | IF( ln_traldf_lap ) THEN ! laplacian operator |
---|
[458] | 175 | IF ( ln_zco ) THEN ! z-coordinate |
---|
| 176 | IF ( ln_traldf_level ) nldf = 0 ! iso-level (no rotation) |
---|
| 177 | IF ( ln_traldf_hor ) nldf = 0 ! horizontal (no rotation) |
---|
| 178 | IF ( ln_traldf_iso ) nldf = 1 ! isoneutral ( rotation) |
---|
| 179 | ENDIF |
---|
| 180 | IF ( ln_zps ) THEN ! z-coordinate |
---|
| 181 | IF ( ln_traldf_level ) ierr = 1 ! iso-level not allowed |
---|
| 182 | IF ( ln_traldf_hor ) nldf = 0 ! horizontal (no rotation) |
---|
| 183 | IF ( ln_traldf_iso ) nldf = 1 ! isoneutral ( rotation) |
---|
| 184 | ENDIF |
---|
| 185 | IF ( ln_sco ) THEN ! z-coordinate |
---|
| 186 | IF ( ln_traldf_level ) nldf = 0 ! iso-level (no rotation) |
---|
| 187 | IF ( ln_traldf_hor ) nldf = 1 ! horizontal ( rotation) |
---|
| 188 | IF ( ln_traldf_iso ) nldf = 1 ! isoneutral ( rotation) |
---|
| 189 | ENDIF |
---|
| 190 | ENDIF |
---|
| 191 | |
---|
| 192 | IF( ln_traldf_bilap ) THEN ! bilaplacian operator |
---|
| 193 | IF ( ln_zco ) THEN ! z-coordinate |
---|
| 194 | IF ( ln_traldf_level ) nldf = 2 ! iso-level (no rotation) |
---|
| 195 | IF ( ln_traldf_hor ) nldf = 2 ! horizontal (no rotation) |
---|
| 196 | IF ( ln_traldf_iso ) ierr = 2 ! isoneutral ( rotation) |
---|
| 197 | ENDIF |
---|
| 198 | IF ( ln_zps ) THEN ! z-coordinate |
---|
| 199 | IF ( ln_traldf_level ) ierr = 1 ! iso-level not allowed |
---|
| 200 | IF ( ln_traldf_hor ) nldf = 2 ! horizontal (no rotation) |
---|
| 201 | IF ( ln_traldf_iso ) ierr = 2 ! isoneutral ( rotation) |
---|
| 202 | ENDIF |
---|
| 203 | IF ( ln_sco ) THEN ! z-coordinate |
---|
| 204 | IF ( ln_traldf_level ) nldf = 2 ! iso-level (no rotation) |
---|
| 205 | IF ( ln_traldf_hor ) nldf = 3 ! horizontal ( rotation) |
---|
| 206 | IF ( ln_traldf_iso ) ierr = 2 ! isoneutral ( rotation) |
---|
| 207 | ENDIF |
---|
| 208 | ENDIF |
---|
| 209 | |
---|
[503] | 210 | IF( ierr == 1 ) CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) |
---|
| 211 | IF( ierr == 2 ) CALL ctl_stop( ' isoneutral bilaplacian operator does not exist' ) |
---|
| 212 | IF( lk_traldf_eiv .AND. .NOT.ln_traldf_iso ) & |
---|
| 213 | CALL ctl_stop( ' eddy induced velocity on tracers', & |
---|
| 214 | & ' the eddy induced velocity on tracers requires isopycnal laplacian diffusion' ) |
---|
[458] | 215 | IF( nldf == 1 .OR. nldf == 3 ) THEN ! rotation |
---|
[503] | 216 | IF( .NOT.lk_ldfslp ) CALL ctl_stop( ' the rotation of the diffusive tensor require key_ldfslp' ) |
---|
[915] | 217 | l_traldf_rot = .TRUE. ! needed for trazdf_imp |
---|
[458] | 218 | ENDIF |
---|
| 219 | |
---|
| 220 | IF( lk_esopa ) THEN |
---|
| 221 | IF(lwp) WRITE(numout,*) ' esopa control: use all lateral physics options' |
---|
| 222 | nldf = -1 |
---|
| 223 | ENDIF |
---|
| 224 | |
---|
| 225 | IF(lwp) THEN |
---|
| 226 | WRITE(numout,*) |
---|
[620] | 227 | IF( nldf == -2 ) WRITE(numout,*) ' NO lateral diffusion' |
---|
| 228 | IF( nldf == -1 ) WRITE(numout,*) ' ESOPA test All scheme used' |
---|
| 229 | IF( nldf == 0 ) WRITE(numout,*) ' laplacian operator' |
---|
| 230 | IF( nldf == 1 ) WRITE(numout,*) ' Rotated laplacian operator' |
---|
| 231 | IF( nldf == 2 ) WRITE(numout,*) ' bilaplacian operator' |
---|
| 232 | IF( nldf == 3 ) WRITE(numout,*) ' Rotated bilaplacian' |
---|
[458] | 233 | ENDIF |
---|
| 234 | |
---|
| 235 | ! Reference T & S diffusivity (if necessary) |
---|
| 236 | ! =========================== |
---|
| 237 | CALL ldf_ano |
---|
[503] | 238 | ! |
---|
[2024] | 239 | END SUBROUTINE tra_ldf_init |
---|
[458] | 240 | |
---|
| 241 | #if defined key_traldf_ano |
---|
| 242 | !!---------------------------------------------------------------------- |
---|
| 243 | !! 'key_traldf_ano' T & S lateral diffusion on anomalies |
---|
| 244 | !!---------------------------------------------------------------------- |
---|
| 245 | |
---|
| 246 | SUBROUTINE ldf_ano |
---|
| 247 | !!---------------------------------------------------------------------- |
---|
| 248 | !! *** ROUTINE ldf_ano *** |
---|
| 249 | !! |
---|
| 250 | !! ** Purpose : initializations of |
---|
| 251 | !!---------------------------------------------------------------------- |
---|
| 252 | USE zdf_oce ! vertical mixing |
---|
| 253 | USE trazdf ! vertical mixing: double diffusion |
---|
| 254 | USE zdfddm ! vertical mixing: double diffusion |
---|
[503] | 255 | !! |
---|
| 256 | INTEGER :: jk ! Dummy loop indice |
---|
| 257 | LOGICAL :: llsave ! |
---|
| 258 | REAL(wp) :: zt0, zs0, z12 ! temporary scalar |
---|
| 259 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zt_ref, ztb, zavt ! 3D workspace |
---|
| 260 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zs_ref, zsb ! 3D workspace |
---|
[458] | 261 | !!---------------------------------------------------------------------- |
---|
| 262 | |
---|
| 263 | IF(lwp) THEN |
---|
| 264 | WRITE(numout,*) |
---|
| 265 | WRITE(numout,*) 'tra:ldf_ano : lateral diffusion acting on anomalies' |
---|
| 266 | WRITE(numout,*) '~~~~~~~~~~~' |
---|
| 267 | ENDIF |
---|
| 268 | |
---|
| 269 | ! defined the T & S reference profiles |
---|
| 270 | ! ------------------------------------ |
---|
| 271 | zt0 =10.e0 ! homogeneous ocean |
---|
| 272 | zs0 =35.e0 |
---|
| 273 | zt_ref(:,:,:) = 10.0 * tmask(:,:,:) |
---|
| 274 | zs_ref(:,:,:) = 35.0 * tmask(:,:,:) |
---|
| 275 | IF(lwp) WRITE(numout,*) ' homogeneous ocean T = ', zt0, ' S = ',zs0 |
---|
| 276 | |
---|
| 277 | ! ! T & S profile (to be coded +namelist parameter |
---|
| 278 | |
---|
| 279 | ! prepare the ldf computation |
---|
| 280 | ! --------------------------- |
---|
| 281 | llsave = l_trdtra |
---|
| 282 | l_trdtra = .false. ! desactivate trend computation |
---|
| 283 | t0_ldf(:,:,:) = 0.e0 |
---|
| 284 | s0_ldf(:,:,:) = 0.e0 |
---|
[2024] | 285 | ztb (:,:,:) = tsb (:,:,:,jp_tem) |
---|
| 286 | zsb (:,:,:) = tsb (:,:,:,jp_sal) |
---|
| 287 | ua (:,:,:) = tsa (:,:,:,jp_tem) |
---|
| 288 | va (:,:,:) = tsa (:,:,:,jp_sal) |
---|
[458] | 289 | zavt (:,:,:) = avt(:,:,:) |
---|
[474] | 290 | IF( lk_zdfddm ) THEN CALL ctl_stop( ' key_traldf_ano with key_zdfddm not implemented' ) |
---|
[458] | 291 | ! set tb, sb to reference values and avr to zero |
---|
[2024] | 292 | tsb (:,:,:,jp_tem) = zt_ref(:,:,:) |
---|
| 293 | tsb (:,:,:,jp_sal) = zs_ref(:,:,:) |
---|
| 294 | tsa (:,:,:,jp_tem) = 0.e0 |
---|
| 295 | tsa (:,:,:,jp_sal) = 0.e0 |
---|
| 296 | avt(:,:,:) = 0.e0 |
---|
[458] | 297 | |
---|
| 298 | ! Compute the ldf trends |
---|
| 299 | ! ---------------------- |
---|
| 300 | CALL tra_ldf( nit000+1 ) ! horizontal components (+1: no more init) |
---|
| 301 | CALL tra_zdf( nit000 ) ! vertical component (if necessary nit000 to performed the init) |
---|
| 302 | |
---|
| 303 | ! finalise the computation and recover all arrays |
---|
| 304 | ! ----------------------------------------------- |
---|
| 305 | l_trdtra = llsave |
---|
| 306 | z12 = 2.e0 |
---|
| 307 | IF( neuler == 1) z12 = 1.e0 |
---|
| 308 | IF( ln_zdfexp ) THEN ! ta,sa are the trends |
---|
[2024] | 309 | t0_ldf(:,:,:) = tsa(:,:,:,jp_tem) |
---|
| 310 | s0_ldf(:,:,:) = tsa(:,:,:,jp_sal) |
---|
[458] | 311 | ELSE |
---|
| 312 | DO jk = 1, jpkm1 |
---|
[2024] | 313 | t0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / ( z12 *rdttra(jk) ) |
---|
| 314 | s0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / ( z12 *rdttra(jk) ) |
---|
[458] | 315 | END DO |
---|
| 316 | ENDIF |
---|
[2024] | 317 | tsb(:,:,:,jp_tem) = ztb (:,:,:) |
---|
| 318 | tsb(:,:,:,jp_sal) = zsb (:,:,:) |
---|
| 319 | tsa(:,:,:,jp_tem) = ua (:,:,:) |
---|
| 320 | tsa(:,:,:,jp_sal) = va (:,:,:) |
---|
| 321 | avt(:,:,:) = zavt(:,:,:) |
---|
[503] | 322 | ! |
---|
[458] | 323 | END SUBROUTINE ldf_ano |
---|
| 324 | |
---|
| 325 | #else |
---|
| 326 | !!---------------------------------------------------------------------- |
---|
| 327 | !! default option : Dummy code NO T & S background profiles |
---|
| 328 | !!---------------------------------------------------------------------- |
---|
| 329 | SUBROUTINE ldf_ano |
---|
| 330 | IF(lwp) THEN |
---|
| 331 | WRITE(numout,*) |
---|
| 332 | WRITE(numout,*) 'tra:ldf_ano : lateral diffusion acting on the full fields' |
---|
| 333 | WRITE(numout,*) '~~~~~~~~~~~' |
---|
| 334 | ENDIF |
---|
| 335 | END SUBROUTINE ldf_ano |
---|
| 336 | #endif |
---|
| 337 | |
---|
| 338 | !!====================================================================== |
---|
[620] | 339 | END MODULE traldf |
---|