- Timestamp:
- 2019-11-22T15:29:17+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Property svn:mergeinfo deleted
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfiwm.F90
r11536 r11949 69 69 70 70 71 SUBROUTINE zdf_iwm( kt, p_avm, p_avt, p_avs )71 SUBROUTINE zdf_iwm( kt, Kmm, p_avm, p_avt, p_avs ) 72 72 !!---------------------------------------------------------------------- 73 73 !! *** ROUTINE zdf_iwm *** … … 118 118 !!---------------------------------------------------------------------- 119 119 INTEGER , INTENT(in ) :: kt ! ocean time step 120 INTEGER , INTENT(in ) :: Kmm ! time level index 120 121 REAL(wp), DIMENSION(:,:,:) , INTENT(inout) :: p_avm ! momentum Kz (w-points) 121 122 REAL(wp), DIMENSION(:,:,:) , INTENT(inout) :: p_avt, p_avs ! tracer Kz (w-points) … … 155 156 END DO 156 157 END DO 157 !!gm gde3w ==>>> check for ssh taken into account.... seem OK gde3w_n=gdept _n - sshn158 !!gm gde3w ==>>> check for ssh taken into account.... seem OK gde3w_n=gdept(:,:,:,Kmm) - ssh(:,:,Kmm) 158 159 DO jk = 2, jpkm1 ! complete with the level-dependent part 159 160 DO jj = 1, jpj … … 162 163 zemx_iwm(ji,jj,jk) = 0._wp 163 164 ELSE 164 zemx_iwm(ji,jj,jk) = zfact(ji,jj) * ( EXP( ( gde3w _n(ji,jj,jk ) - zhdep(ji,jj) ) / hcri_iwm(ji,jj) ) &165 & - EXP( ( gde3w _n(ji,jj,jk-1) - zhdep(ji,jj) ) / hcri_iwm(ji,jj) ) ) &166 & / ( gde3w _n(ji,jj,jk) - gde3w_n(ji,jj,jk-1) )165 zemx_iwm(ji,jj,jk) = zfact(ji,jj) * ( EXP( ( gde3w(ji,jj,jk ) - zhdep(ji,jj) ) / hcri_iwm(ji,jj) ) & 166 & - EXP( ( gde3w(ji,jj,jk-1) - zhdep(ji,jj) ) / hcri_iwm(ji,jj) ) ) & 167 & / ( gde3w(ji,jj,jk) - gde3w(ji,jj,jk-1) ) 167 168 ENDIF 168 169 END DO 169 170 END DO 170 !!gm delta(gde3w _n) = e3t_n!! Please verify the grid-point position w versus t-point171 !!gm delta(gde3w) = e3t(:,:,:,Kmm) !! Please verify the grid-point position w versus t-point 171 172 !!gm it seems to me that only 1/hcri_iwm is used ==> compute it one for all 172 173 … … 182 183 zfact(:,:) = 0._wp 183 184 DO jk = 2, jpkm1 ! part independent of the level 184 zfact(:,:) = zfact(:,:) + e3w _n(:,:,jk) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) ) * wmask(:,:,jk)185 zfact(:,:) = zfact(:,:) + e3w(:,:,jk,Kmm) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) ) * wmask(:,:,jk) 185 186 END DO 186 187 ! … … 199 200 zfact(:,:) = 0._wp 200 201 DO jk = 2, jpkm1 ! part independent of the level 201 zfact(:,:) = zfact(:,:) + e3w _n(:,:,jk) * MAX( 0._wp, rn2(:,:,jk) ) * wmask(:,:,jk)202 zfact(:,:) = zfact(:,:) + e3w(:,:,jk,Kmm) * MAX( 0._wp, rn2(:,:,jk) ) * wmask(:,:,jk) 202 203 END DO 203 204 ! … … 220 221 zfact(:,:) = 0._wp 221 222 DO jk = 2, jpkm1 222 zfact(:,:) = zfact(:,:) + e3w _n(:,:,jk) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) ) * wmask(:,:,jk)223 zfact(:,:) = zfact(:,:) + e3w(:,:,jk,Kmm) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) ) * wmask(:,:,jk) 223 224 zwkb(:,:,jk) = zfact(:,:) 224 225 END DO 225 226 !!gm even better: 226 227 ! DO jk = 2, jpkm1 227 ! zwkb(:,:) = zwkb(:,:) + e3w _n(:,:,jk) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) )228 ! zwkb(:,:) = zwkb(:,:) + e3w(:,:,jk,Kmm) * SQRT( MAX( 0._wp, rn2(:,:,jk) ) ) 228 229 ! END DO 229 230 ! zfact(:,:) = zwkb(:,:,jpkm1) … … 267 268 DO jk = 2, jpkm1 ! complete with the level-dependent part 268 269 zemx_iwm(:,:,jk) = zemx_iwm(:,:,jk) + zweight(:,:,jk) * zfact(:,:) * wmask(:,:,jk) & 269 & / ( gde3w _n(:,:,jk) - gde3w_n(:,:,jk-1) )270 !!gm use of e3t _njust above?270 & / ( gde3w(:,:,jk) - gde3w(:,:,jk-1) ) 271 !!gm use of e3t(:,:,:,Kmm) just above? 271 272 END DO 272 273 ! 273 274 !!gm this is to be replaced by just a constant value znu=1.e-6 m2/s 274 275 ! Calculate molecular kinematic viscosity 275 znu_t(:,:,:) = 1.e-4_wp * ( 17.91_wp - 0.53810_wp * ts n(:,:,:,jp_tem) + 0.00694_wp * tsn(:,:,:,jp_tem) * tsn(:,:,:,jp_tem) &276 & + 0.02305_wp * ts n(:,:,:,jp_sal) ) * tmask(:,:,:) * r1_rau0276 znu_t(:,:,:) = 1.e-4_wp * ( 17.91_wp - 0.53810_wp * ts(:,:,:,jp_tem,Kmm) + 0.00694_wp * ts(:,:,:,jp_tem,Kmm) * ts(:,:,:,jp_tem,Kmm) & 277 & + 0.02305_wp * ts(:,:,:,jp_sal,Kmm) ) * tmask(:,:,:) * r1_rau0 277 278 DO jk = 2, jpkm1 278 279 znu_w(:,:,jk) = 0.5_wp * ( znu_t(:,:,jk-1) + znu_t(:,:,jk) ) * wmask(:,:,jk) … … 314 315 DO jj = 1, jpj 315 316 DO ji = 1, jpi 316 zztmp = zztmp + e3w _n(ji,jj,jk) * e1e2t(ji,jj) &317 zztmp = zztmp + e3w(ji,jj,jk,Kmm) * e1e2t(ji,jj) & 317 318 & * MAX( 0._wp, rn2(ji,jj,jk) ) * zav_wave(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj) 318 319 END DO … … 374 375 z2d(:,:) = 0._wp 375 376 DO jk = 2, jpkm1 376 z2d(:,:) = z2d(:,:) + e3w _n(:,:,jk) * z3d(:,:,jk) * wmask(:,:,jk)377 z2d(:,:) = z2d(:,:) + e3w(:,:,jk,Kmm) * z3d(:,:,jk) * wmask(:,:,jk) 377 378 END DO 378 379 z2d(:,:) = rau0 * z2d(:,:)
Note: See TracChangeset
for help on using the changeset viewer.