1 | MODULE traldf_iso |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE traldf_iso *** |
---|
4 | !! Ocean tracers: horizontal component of the lateral tracer mixing trend |
---|
5 | !!====================================================================== |
---|
6 | !! History : OPA ! 1994-08 (G. Madec, M. Imbard) |
---|
7 | !! 8.0 ! 1997-05 (G. Madec) split into traldf and trazdf |
---|
8 | !! NEMO ! 2002-08 (G. Madec) Free form, F90 |
---|
9 | !! 1.0 ! 2005-11 (G. Madec) merge traldf and trazdf :-) |
---|
10 | !! 3.3 ! 2010-09 (C. Ethe, G. Madec) Merge TRA-TRC |
---|
11 | !! 3.7 ! 2014-01 (G. Madec, S. Masson) restructuration/simplification of aht/aeiv specification |
---|
12 | !! - ! 2014-02 (F. Lemarie, G. Madec) triad operator (Griffies) + Method of Stabilizing Correction |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! tra_ldf_iso : update the tracer trend with the horizontal component of a iso-neutral laplacian operator |
---|
17 | !! and with the vertical part of the isopycnal or geopotential s-coord. operator |
---|
18 | !!---------------------------------------------------------------------- |
---|
19 | USE oce ! ocean dynamics and active tracers |
---|
20 | USE dom_oce ! ocean space and time domain |
---|
21 | USE trc_oce ! share passive tracers/Ocean variables |
---|
22 | USE zdf_oce ! ocean vertical physics |
---|
23 | USE ldftra ! lateral diffusion: tracer eddy coefficients |
---|
24 | USE ldfslp ! iso-neutral slopes |
---|
25 | USE diaptr ! poleward transport diagnostics |
---|
26 | USE diaar5 ! AR5 diagnostics |
---|
27 | ! |
---|
28 | USE in_out_manager ! I/O manager |
---|
29 | USE iom ! I/O library |
---|
30 | USE phycst ! physical constants |
---|
31 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
32 | |
---|
33 | IMPLICIT NONE |
---|
34 | PRIVATE |
---|
35 | |
---|
36 | PUBLIC tra_ldf_iso ! routine called by step.F90 |
---|
37 | |
---|
38 | LOGICAL :: l_ptr ! flag to compute poleward transport |
---|
39 | LOGICAL :: l_hst ! flag to compute heat transport |
---|
40 | |
---|
41 | !! * Substitutions |
---|
42 | # include "do_loop_substitute.h90" |
---|
43 | !!---------------------------------------------------------------------- |
---|
44 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
45 | !! $Id$ |
---|
46 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
47 | !!---------------------------------------------------------------------- |
---|
48 | CONTAINS |
---|
49 | |
---|
50 | SUBROUTINE tra_ldf_iso( kt, Kmm, kit000, cdtype, pahu, pahv, & |
---|
51 | & pgu , pgv , pgui, pgvi, & |
---|
52 | & pt , pt2 , pt_rhs , kjpt , kpass ) |
---|
53 | !!---------------------------------------------------------------------- |
---|
54 | !! *** ROUTINE tra_ldf_iso *** |
---|
55 | !! |
---|
56 | !! ** Purpose : Compute the before horizontal tracer (t & s) diffusive |
---|
57 | !! trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and |
---|
58 | !! add it to the general trend of tracer equation. |
---|
59 | !! |
---|
60 | !! ** Method : The horizontal component of the lateral diffusive trends |
---|
61 | !! is provided by a 2nd order operator rotated along neural or geopo- |
---|
62 | !! tential surfaces to which an eddy induced advection can be added |
---|
63 | !! It is computed using before fields (forward in time) and isopyc- |
---|
64 | !! nal or geopotential slopes computed in routine ldfslp. |
---|
65 | !! |
---|
66 | !! 1st part : masked horizontal derivative of T ( di[ t ] ) |
---|
67 | !! ======== with partial cell update if ln_zps=T |
---|
68 | !! with top cell update if ln_isfcav |
---|
69 | !! |
---|
70 | !! 2nd part : horizontal fluxes of the lateral mixing operator |
---|
71 | !! ======== |
---|
72 | !! zftu = pahu e2u*e3u/e1u di[ tb ] |
---|
73 | !! - pahu e2u*uslp dk[ mi(mk(tb)) ] |
---|
74 | !! zftv = pahv e1v*e3v/e2v dj[ tb ] |
---|
75 | !! - pahv e2u*vslp dk[ mj(mk(tb)) ] |
---|
76 | !! take the horizontal divergence of the fluxes: |
---|
77 | !! difft = 1/(e1e2t*e3t) { di-1[ zftu ] + dj-1[ zftv ] } |
---|
78 | !! Add this trend to the general trend (ta,sa): |
---|
79 | !! ta = ta + difft |
---|
80 | !! |
---|
81 | !! 3rd part: vertical trends of the lateral mixing operator |
---|
82 | !! ======== (excluding the vertical flux proportional to dk[t] ) |
---|
83 | !! vertical fluxes associated with the rotated lateral mixing: |
---|
84 | !! zftw = - { mi(mk(pahu)) * e2t*wslpi di[ mi(mk(tb)) ] |
---|
85 | !! + mj(mk(pahv)) * e1t*wslpj dj[ mj(mk(tb)) ] } |
---|
86 | !! take the horizontal divergence of the fluxes: |
---|
87 | !! difft = 1/(e1e2t*e3t) dk[ zftw ] |
---|
88 | !! Add this trend to the general trend (ta,sa): |
---|
89 | !! pt_rhs = pt_rhs + difft |
---|
90 | !! |
---|
91 | !! ** Action : Update pt_rhs arrays with the before rotated diffusion |
---|
92 | !!---------------------------------------------------------------------- |
---|
93 | INTEGER , INTENT(in ) :: kt ! ocean time-step index |
---|
94 | INTEGER , INTENT(in ) :: kit000 ! first time step index |
---|
95 | CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) |
---|
96 | INTEGER , INTENT(in ) :: kjpt ! number of tracers |
---|
97 | INTEGER , INTENT(in ) :: kpass ! =1/2 first or second passage |
---|
98 | INTEGER , INTENT(in ) :: Kmm ! ocean time level index |
---|
99 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pahu, pahv ! eddy diffusivity at u- and v-points [m2/s] |
---|
100 | REAL(wp), DIMENSION(jpi,jpj ,kjpt), INTENT(in ) :: pgu, pgv ! tracer gradient at pstep levels |
---|
101 | REAL(wp), DIMENSION(jpi,jpj, kjpt), INTENT(in ) :: pgui, pgvi ! tracer gradient at top levels |
---|
102 | REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: pt ! tracer (kpass=1) or laplacian of tracer (kpass=2) |
---|
103 | REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in ) :: pt2 ! tracer (only used in kpass=2) |
---|
104 | REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) :: pt_rhs ! tracer trend |
---|
105 | ! |
---|
106 | INTEGER :: ji, jj, jk, jn ! dummy loop indices |
---|
107 | INTEGER :: ikt |
---|
108 | INTEGER :: ierr ! local integer |
---|
109 | REAL(wp) :: zmsku, zahu_w, zabe1, zcof1, zcoef3 ! local scalars |
---|
110 | REAL(wp) :: zmskv, zahv_w, zabe2, zcof2, zcoef4 ! - - |
---|
111 | REAL(wp) :: zcoef0, ze3w_2, zsign, z2dt, z1_2dt ! - - |
---|
112 | REAL(wp), DIMENSION(jpi,jpj) :: zdkt, zdk1t, z2d |
---|
113 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdit, zdjt, zftu, zftv, ztfw |
---|
114 | !!---------------------------------------------------------------------- |
---|
115 | ! |
---|
116 | IF( kpass == 1 .AND. kt == kit000 ) THEN |
---|
117 | IF(lwp) WRITE(numout,*) |
---|
118 | IF(lwp) WRITE(numout,*) 'tra_ldf_iso : rotated laplacian diffusion operator on ', cdtype |
---|
119 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' |
---|
120 | ! |
---|
121 | akz (:,:,:) = 0._wp |
---|
122 | ah_wslp2(:,:,:) = 0._wp |
---|
123 | ENDIF |
---|
124 | ! |
---|
125 | l_hst = .FALSE. |
---|
126 | l_ptr = .FALSE. |
---|
127 | IF( cdtype == 'TRA' .AND. ( iom_use( 'sophtldf' ) .OR. iom_use( 'sopstldf' ) ) ) l_ptr = .TRUE. |
---|
128 | IF( cdtype == 'TRA' .AND. ( iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") .OR. & |
---|
129 | & iom_use("uadv_salttr") .OR. iom_use("vadv_salttr") ) ) l_hst = .TRUE. |
---|
130 | ! |
---|
131 | ! ! set time step size (Euler/Leapfrog) |
---|
132 | IF( neuler == 0 .AND. kt == nit000 ) THEN ; z2dt = rdt ! at nit000 (Euler) |
---|
133 | ELSE ; z2dt = 2.* rdt ! (Leapfrog) |
---|
134 | ENDIF |
---|
135 | z1_2dt = 1._wp / z2dt |
---|
136 | ! |
---|
137 | IF( kpass == 1 ) THEN ; zsign = 1._wp ! bilaplacian operator require a minus sign (eddy diffusivity >0) |
---|
138 | ELSE ; zsign = -1._wp |
---|
139 | ENDIF |
---|
140 | |
---|
141 | !!---------------------------------------------------------------------- |
---|
142 | !! 0 - calculate ah_wslp2 and akz |
---|
143 | !!---------------------------------------------------------------------- |
---|
144 | ! |
---|
145 | IF( kpass == 1 ) THEN !== first pass only ==! |
---|
146 | ! |
---|
147 | DO_3D_00_00( 2, jpkm1 ) |
---|
148 | ! |
---|
149 | zmsku = wmask(ji,jj,jk) / MAX( umask(ji ,jj,jk-1) + umask(ji-1,jj,jk) & |
---|
150 | & + umask(ji-1,jj,jk-1) + umask(ji ,jj,jk) , 1._wp ) |
---|
151 | zmskv = wmask(ji,jj,jk) / MAX( vmask(ji,jj ,jk-1) + vmask(ji,jj-1,jk) & |
---|
152 | & + vmask(ji,jj-1,jk-1) + vmask(ji,jj ,jk) , 1._wp ) |
---|
153 | ! |
---|
154 | zahu_w = ( pahu(ji ,jj,jk-1) + pahu(ji-1,jj,jk) & |
---|
155 | & + pahu(ji-1,jj,jk-1) + pahu(ji ,jj,jk) ) * zmsku |
---|
156 | zahv_w = ( pahv(ji,jj ,jk-1) + pahv(ji,jj-1,jk) & |
---|
157 | & + pahv(ji,jj-1,jk-1) + pahv(ji,jj ,jk) ) * zmskv |
---|
158 | ! |
---|
159 | ah_wslp2(ji,jj,jk) = zahu_w * wslpi(ji,jj,jk) * wslpi(ji,jj,jk) & |
---|
160 | & + zahv_w * wslpj(ji,jj,jk) * wslpj(ji,jj,jk) |
---|
161 | END_3D |
---|
162 | ! |
---|
163 | IF( ln_traldf_msc ) THEN ! stabilizing vertical diffusivity coefficient |
---|
164 | DO_3D_00_00( 2, jpkm1 ) |
---|
165 | akz(ji,jj,jk) = 0.25_wp * ( & |
---|
166 | & ( pahu(ji ,jj,jk) + pahu(ji ,jj,jk-1) ) / ( e1u(ji ,jj) * e1u(ji ,jj) ) & |
---|
167 | & + ( pahu(ji-1,jj,jk) + pahu(ji-1,jj,jk-1) ) / ( e1u(ji-1,jj) * e1u(ji-1,jj) ) & |
---|
168 | & + ( pahv(ji,jj ,jk) + pahv(ji,jj ,jk-1) ) / ( e2v(ji,jj ) * e2v(ji,jj ) ) & |
---|
169 | & + ( pahv(ji,jj-1,jk) + pahv(ji,jj-1,jk-1) ) / ( e2v(ji,jj-1) * e2v(ji,jj-1) ) ) |
---|
170 | END_3D |
---|
171 | ! |
---|
172 | IF( ln_traldf_blp ) THEN ! bilaplacian operator |
---|
173 | DO_3D_10_10( 2, jpkm1 ) |
---|
174 | akz(ji,jj,jk) = 16._wp * ah_wslp2(ji,jj,jk) & |
---|
175 | & * ( akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( e3w(ji,jj,jk,Kmm) * e3w(ji,jj,jk,Kmm) ) ) |
---|
176 | END_3D |
---|
177 | ELSEIF( ln_traldf_lap ) THEN ! laplacian operator |
---|
178 | DO_3D_10_10( 2, jpkm1 ) |
---|
179 | ze3w_2 = e3w(ji,jj,jk,Kmm) * e3w(ji,jj,jk,Kmm) |
---|
180 | zcoef0 = z2dt * ( akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2 ) |
---|
181 | akz(ji,jj,jk) = MAX( zcoef0 - 0.5_wp , 0._wp ) * ze3w_2 * z1_2dt |
---|
182 | END_3D |
---|
183 | ENDIF |
---|
184 | ! |
---|
185 | ELSE ! 33 flux set to zero with akz=ah_wslp2 ==>> computed in full implicit |
---|
186 | akz(:,:,:) = ah_wslp2(:,:,:) |
---|
187 | ENDIF |
---|
188 | ENDIF |
---|
189 | ! |
---|
190 | ! ! =========== |
---|
191 | DO jn = 1, kjpt ! tracer loop |
---|
192 | ! ! =========== |
---|
193 | ! |
---|
194 | !!---------------------------------------------------------------------- |
---|
195 | !! I - masked horizontal derivative |
---|
196 | !!---------------------------------------------------------------------- |
---|
197 | !!gm : bug.... why (x,:,:)? (1,jpj,:) and (jpi,1,:) should be sufficient.... |
---|
198 | zdit (1,:,:) = 0._wp ; zdit (jpi,:,:) = 0._wp |
---|
199 | zdjt (1,:,:) = 0._wp ; zdjt (jpi,:,:) = 0._wp |
---|
200 | !!end |
---|
201 | |
---|
202 | ! Horizontal tracer gradient |
---|
203 | DO_3D_10_10( 1, jpkm1 ) |
---|
204 | zdit(ji,jj,jk) = ( pt(ji+1,jj ,jk,jn) - pt(ji,jj,jk,jn) ) * umask(ji,jj,jk) |
---|
205 | zdjt(ji,jj,jk) = ( pt(ji ,jj+1,jk,jn) - pt(ji,jj,jk,jn) ) * vmask(ji,jj,jk) |
---|
206 | END_3D |
---|
207 | IF( ln_zps ) THEN ! botton and surface ocean correction of the horizontal gradient |
---|
208 | DO_2D_10_10 |
---|
209 | zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn) |
---|
210 | zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn) |
---|
211 | END_2D |
---|
212 | IF( ln_isfcav ) THEN ! first wet level beneath a cavity |
---|
213 | DO_2D_10_10 |
---|
214 | IF( miku(ji,jj) > 1 ) zdit(ji,jj,miku(ji,jj)) = pgui(ji,jj,jn) |
---|
215 | IF( mikv(ji,jj) > 1 ) zdjt(ji,jj,mikv(ji,jj)) = pgvi(ji,jj,jn) |
---|
216 | END_2D |
---|
217 | ENDIF |
---|
218 | ENDIF |
---|
219 | ! |
---|
220 | !!---------------------------------------------------------------------- |
---|
221 | !! II - horizontal trend (full) |
---|
222 | !!---------------------------------------------------------------------- |
---|
223 | ! |
---|
224 | DO jk = 1, jpkm1 ! Horizontal slab |
---|
225 | ! |
---|
226 | ! !== Vertical tracer gradient |
---|
227 | zdk1t(:,:) = ( pt(:,:,jk,jn) - pt(:,:,jk+1,jn) ) * wmask(:,:,jk+1) ! level jk+1 |
---|
228 | ! |
---|
229 | IF( jk == 1 ) THEN ; zdkt(:,:) = zdk1t(:,:) ! surface: zdkt(jk=1)=zdkt(jk=2) |
---|
230 | ELSE ; zdkt(:,:) = ( pt(:,:,jk-1,jn) - pt(:,:,jk,jn) ) * wmask(:,:,jk) |
---|
231 | ENDIF |
---|
232 | DO_2D_10_10 |
---|
233 | zabe1 = pahu(ji,jj,jk) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm) |
---|
234 | zabe2 = pahv(ji,jj,jk) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm) |
---|
235 | ! |
---|
236 | zmsku = 1. / MAX( wmask(ji+1,jj,jk ) + wmask(ji,jj,jk+1) & |
---|
237 | & + wmask(ji+1,jj,jk+1) + wmask(ji,jj,jk ), 1. ) |
---|
238 | ! |
---|
239 | zmskv = 1. / MAX( wmask(ji,jj+1,jk ) + wmask(ji,jj,jk+1) & |
---|
240 | & + wmask(ji,jj+1,jk+1) + wmask(ji,jj,jk ), 1. ) |
---|
241 | ! |
---|
242 | zcof1 = - pahu(ji,jj,jk) * e2u(ji,jj) * uslp(ji,jj,jk) * zmsku |
---|
243 | zcof2 = - pahv(ji,jj,jk) * e1v(ji,jj) * vslp(ji,jj,jk) * zmskv |
---|
244 | ! |
---|
245 | zftu(ji,jj,jk ) = ( zabe1 * zdit(ji,jj,jk) & |
---|
246 | & + zcof1 * ( zdkt (ji+1,jj) + zdk1t(ji,jj) & |
---|
247 | & + zdk1t(ji+1,jj) + zdkt (ji,jj) ) ) * umask(ji,jj,jk) |
---|
248 | zftv(ji,jj,jk) = ( zabe2 * zdjt(ji,jj,jk) & |
---|
249 | & + zcof2 * ( zdkt (ji,jj+1) + zdk1t(ji,jj) & |
---|
250 | & + zdk1t(ji,jj+1) + zdkt (ji,jj) ) ) * vmask(ji,jj,jk) |
---|
251 | END_2D |
---|
252 | ! |
---|
253 | DO_2D_00_00 |
---|
254 | pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + zsign * ( zftu(ji,jj,jk) - zftu(ji-1,jj,jk) & |
---|
255 | & + zftv(ji,jj,jk) - zftv(ji,jj-1,jk) ) & |
---|
256 | & * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) |
---|
257 | END_2D |
---|
258 | END DO ! End of slab |
---|
259 | |
---|
260 | !!---------------------------------------------------------------------- |
---|
261 | !! III - vertical trend (full) |
---|
262 | !!---------------------------------------------------------------------- |
---|
263 | ! |
---|
264 | ! Vertical fluxes |
---|
265 | ! --------------- |
---|
266 | ! ! Surface and bottom vertical fluxes set to zero |
---|
267 | ztfw(:,:, 1 ) = 0._wp ; ztfw(:,:,jpk) = 0._wp |
---|
268 | |
---|
269 | DO_3D_00_00( 2, jpkm1 ) |
---|
270 | ! |
---|
271 | zmsku = wmask(ji,jj,jk) / MAX( umask(ji ,jj,jk-1) + umask(ji-1,jj,jk) & |
---|
272 | & + umask(ji-1,jj,jk-1) + umask(ji ,jj,jk) , 1._wp ) |
---|
273 | zmskv = wmask(ji,jj,jk) / MAX( vmask(ji,jj ,jk-1) + vmask(ji,jj-1,jk) & |
---|
274 | & + vmask(ji,jj-1,jk-1) + vmask(ji,jj ,jk) , 1._wp ) |
---|
275 | ! |
---|
276 | zahu_w = ( pahu(ji ,jj,jk-1) + pahu(ji-1,jj,jk) & |
---|
277 | & + pahu(ji-1,jj,jk-1) + pahu(ji ,jj,jk) ) * zmsku |
---|
278 | zahv_w = ( pahv(ji,jj ,jk-1) + pahv(ji,jj-1,jk) & |
---|
279 | & + pahv(ji,jj-1,jk-1) + pahv(ji,jj ,jk) ) * zmskv |
---|
280 | ! |
---|
281 | zcoef3 = - zahu_w * e2t(ji,jj) * zmsku * wslpi (ji,jj,jk) !wslpi & j are already w-masked |
---|
282 | zcoef4 = - zahv_w * e1t(ji,jj) * zmskv * wslpj (ji,jj,jk) |
---|
283 | ! |
---|
284 | ztfw(ji,jj,jk) = zcoef3 * ( zdit(ji ,jj ,jk-1) + zdit(ji-1,jj ,jk) & |
---|
285 | & + zdit(ji-1,jj ,jk-1) + zdit(ji ,jj ,jk) ) & |
---|
286 | & + zcoef4 * ( zdjt(ji ,jj ,jk-1) + zdjt(ji ,jj-1,jk) & |
---|
287 | & + zdjt(ji ,jj-1,jk-1) + zdjt(ji ,jj ,jk) ) |
---|
288 | END_3D |
---|
289 | ! !== add the vertical 33 flux ==! |
---|
290 | IF( ln_traldf_lap ) THEN ! laplacian case: eddy coef = ah_wslp2 - akz |
---|
291 | DO_3D_00_00( 2, jpkm1 ) |
---|
292 | ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) & |
---|
293 | & * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) ) & |
---|
294 | & * ( pt(ji,jj,jk-1,jn) - pt(ji,jj,jk,jn) ) |
---|
295 | END_3D |
---|
296 | ! |
---|
297 | ELSE ! bilaplacian |
---|
298 | SELECT CASE( kpass ) |
---|
299 | CASE( 1 ) ! 1st pass : eddy coef = ah_wslp2 |
---|
300 | DO_3D_00_00( 2, jpkm1 ) |
---|
301 | ztfw(ji,jj,jk) = ztfw(ji,jj,jk) & |
---|
302 | & + ah_wslp2(ji,jj,jk) * e1e2t(ji,jj) & |
---|
303 | & * ( pt(ji,jj,jk-1,jn) - pt(ji,jj,jk,jn) ) / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) |
---|
304 | END_3D |
---|
305 | CASE( 2 ) ! 2nd pass : eddy flux = ah_wslp2 and akz applied on pt and pt2 gradients, resp. |
---|
306 | DO_3D_00_00( 2, jpkm1 ) |
---|
307 | ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk) & |
---|
308 | & * ( ah_wslp2(ji,jj,jk) * ( pt (ji,jj,jk-1,jn) - pt (ji,jj,jk,jn) ) & |
---|
309 | & + akz(ji,jj,jk) * ( pt2(ji,jj,jk-1,jn) - pt2(ji,jj,jk,jn) ) ) |
---|
310 | END_3D |
---|
311 | END SELECT |
---|
312 | ENDIF |
---|
313 | ! |
---|
314 | DO_3D_00_00( 1, jpkm1 ) |
---|
315 | pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + zsign * ( ztfw (ji,jj,jk) - ztfw(ji,jj,jk+1) ) & |
---|
316 | & * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) |
---|
317 | END_3D |
---|
318 | ! |
---|
319 | IF( ( kpass == 1 .AND. ln_traldf_lap ) .OR. & !== first pass only ( laplacian) ==! |
---|
320 | ( kpass == 2 .AND. ln_traldf_blp ) ) THEN !== 2nd pass (bilaplacian) ==! |
---|
321 | ! |
---|
322 | ! ! "Poleward" diffusive heat or salt transports (T-S case only) |
---|
323 | ! note sign is reversed to give down-gradient diffusive transports ) |
---|
324 | IF( l_ptr ) CALL dia_ptr_hst( jn, 'ldf', -zftv(:,:,:) ) |
---|
325 | ! ! Diffusive heat transports |
---|
326 | IF( l_hst ) CALL dia_ar5_hst( jn, 'ldf', -zftu(:,:,:), -zftv(:,:,:) ) |
---|
327 | ! |
---|
328 | ENDIF !== end pass selection ==! |
---|
329 | ! |
---|
330 | ! ! =============== |
---|
331 | END DO ! end tracer loop |
---|
332 | ! |
---|
333 | END SUBROUTINE tra_ldf_iso |
---|
334 | |
---|
335 | !!============================================================================== |
---|
336 | END MODULE traldf_iso |
---|