- Timestamp:
- 2020-03-23T22:16:19+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/TRA/trazdf.F90
r12377 r12590 13 13 !!---------------------------------------------------------------------- 14 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 15 USE dom_oce ! ocean space and time domain variables 16 16 USE domvvl ! variable volume 17 17 USE phycst ! physical constant … … 19 19 USE sbc_oce ! surface boundary condition: ocean 20 20 USE ldftra ! lateral diffusion: eddy diffusivity 21 USE ldfslp ! lateral diffusion: iso-neutral slope 21 USE ldfslp ! lateral diffusion: iso-neutral slope 22 22 USE trd_oce ! trends: ocean variables 23 23 USE trdtra ! trends: tracer trend manager … … 37 37 !! * Substitutions 38 38 # include "do_loop_substitute.h90" 39 # include "domzgr_substitute.h90" 39 40 !!---------------------------------------------------------------------- 40 41 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 77 78 ! 78 79 ! !* compute lateral mixing trend and add it to the general trend 79 CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt, Kbb, Kmm, Krhs, pts, Kaa, jpts ) 80 CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt, Kbb, Kmm, Krhs, pts, Kaa, jpts ) 80 81 81 82 !!gm WHY here ! and I don't like that ! … … 88 89 IF( l_trdtra ) THEN ! save the vertical diffusive trends for further diagnostics 89 90 DO jk = 1, jpkm1 90 ztrdt(:,:,jk) = ( ( pts(:,:,jk,jp_tem,Kaa)*e3t(:,:,jk,Kaa) - pts(:,:,jk,jp_tem,Kbb)*e3t(:,:,jk,Kbb) ) & 91 & / (e3t(:,:,jk,Kmm)*r2dt) ) - ztrdt(:,:,jk) 92 ztrds(:,:,jk) = ( ( pts(:,:,jk,jp_sal,Kaa)*e3t(:,:,jk,Kaa) - pts(:,:,jk,jp_sal,Kbb)*e3t(:,:,jk,Kbb) ) & 93 & / (e3t(:,:,jk,Kmm)*r2dt) ) - ztrds(:,:,jk) 91 ztrdt(:,:,jk) = ( ( pts(:,:,jk,jp_tem,Kaa)*e3t(:,:,jk,Kaa) & 92 & - pts(:,:,jk,jp_tem,Kbb)*e3t(:,:,jk,Kbb) ) & 93 & / (e3t(:,:,jk,Kmm)*r2dt) ) - ztrdt(:,:,jk) 94 ztrds(:,:,jk) = ( ( pts(:,:,jk,jp_sal,Kaa)*e3t(:,:,jk,Kaa) & 95 & - pts(:,:,jk,jp_sal,Kbb)*e3t(:,:,jk,Kbb) ) & 96 & / (e3t(:,:,jk,Kmm)*r2dt) ) - ztrds(:,:,jk) 94 97 END DO 95 98 !!gm this should be moved in trdtra.F90 and done on all trends … … 108 111 END SUBROUTINE tra_zdf 109 112 110 111 SUBROUTINE tra_zdf_imp( kt, kit000, cdtype, p2dt, Kbb, Kmm, Krhs, pt, Kaa, kjpt ) 113 114 SUBROUTINE tra_zdf_imp( kt, kit000, cdtype, p2dt, Kbb, Kmm, Krhs, pt, Kaa, kjpt ) 112 115 !!---------------------------------------------------------------------- 113 116 !! *** ROUTINE tra_zdf_imp *** 114 117 !! 115 118 !! ** Purpose : Compute the after tracer through a implicit computation 116 !! of the vertical tracer diffusion (including the vertical component 117 !! of lateral mixing (only for 2nd order operator, for fourth order 118 !! it is already computed and add to the general trend in traldf) 119 !! of the vertical tracer diffusion (including the vertical component 120 !! of lateral mixing (only for 2nd order operator, for fourth order 121 !! it is already computed and add to the general trend in traldf) 119 122 !! 120 123 !! ** Method : The vertical diffusion of a tracer ,t , is given by: … … 158 161 zwt(:,:,1) = 0._wp 159 162 ! 160 IF( l_ldfslp ) THEN ! isoneutral diffusion: add the contribution 161 IF( ln_traldf_msc ) THEN ! MSC iso-neutral operator 163 IF( l_ldfslp ) THEN ! isoneutral diffusion: add the contribution 164 IF( ln_traldf_msc ) THEN ! MSC iso-neutral operator 162 165 DO_3D_00_00( 2, jpkm1 ) 163 zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk) 166 zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk) 164 167 END_3D 165 168 ELSE ! standard or triad iso-neutral operator … … 204 207 ! The solution will be in the 4d array pta. 205 208 ! The 3d array zwt is used as a work space array. 206 ! En route to the solution pt(:,:,:,:,Kaa) is used a to evaluate the rhs and then 209 ! En route to the solution pt(:,:,:,:,Kaa) is used a to evaluate the rhs and then 207 210 ! used as a work space array: its value is modified. 208 211 ! … … 214 217 END_3D 215 218 ! 216 ENDIF 217 ! 219 ENDIF 220 ! 218 221 DO_2D_00_00 219 pt(ji,jj,1,jn,Kaa) = e3t(ji,jj,1,Kbb) * pt(ji,jj,1,jn,Kbb) + p2dt * e3t(ji,jj,1,Kmm) * pt(ji,jj,1,jn,Krhs) 222 pt(ji,jj,1,jn,Kaa) = e3t(ji,jj,1,Kbb) * pt(ji,jj,1,jn,Kbb) & 223 & + p2dt * e3t(ji,jj,1,Kmm) * pt(ji,jj,1,jn,Krhs) 220 224 END_2D 221 225 DO_3D_00_00( 2, jpkm1 ) 222 zrhs = e3t(ji,jj,jk,Kbb) * pt(ji,jj,jk,jn,Kbb) + p2dt * e3t(ji,jj,jk,Kmm) * pt(ji,jj,jk,jn,Krhs) ! zrhs=right hand side 226 zrhs = e3t(ji,jj,jk,Kbb) * pt(ji,jj,jk,jn,Kbb) & 227 & + p2dt * e3t(ji,jj,jk,Kmm) * pt(ji,jj,jk,jn,Krhs) ! zrhs=right hand side 223 228 pt(ji,jj,jk,jn,Kaa) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pt(ji,jj,jk-1,jn,Kaa) 224 229 END_3D
Note: See TracChangeset
for help on using the changeset viewer.