Changeset 10829
- Timestamp:
- 2019-04-03T11:29:54+02:00 (6 years ago)
- Location:
- NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/ZDF/zdfphy.F90
r10425 r10829 218 218 219 219 220 SUBROUTINE zdf_phy( kt )220 SUBROUTINE zdf_phy( kt, ktlev1, ktlev2, kt2lev1, kt2lev2 ) 221 221 !!---------------------------------------------------------------------- 222 222 !! *** ROUTINE zdf_phy *** … … 231 231 !!---------------------------------------------------------------------- 232 232 INTEGER, INTENT(in) :: kt ! ocean time-step index 233 INTEGER, INTENT(in) :: ktlev1, ktlev2 ! time level indices for 3-time-level source terms 234 INTEGER, INTENT(in) :: kt2lev1, kt2lev2 ! time level indices for 2-time-level source terms 233 235 ! 234 236 INTEGER :: ji, jj, jk ! dummy loop indice … … 254 256 ! 255 257 IF( l_zdfsh2 ) & !* shear production at w-points (energy conserving form) 256 CALL zdf_sh2( u b, vb, un, vn, avm_k, & ! <<== in258 CALL zdf_sh2( uu(:,:,:,ktlev1), vv(:,:,:,ktlev1), uu(:,:,:,ktlev2), vv(:,:,:,ktlev2), avm_k, & ! <<== in 257 259 & zsh2 ) ! ==>> out : shear production 258 260 ! 259 261 SELECT CASE ( nzdf_phy ) !* Vertical eddy viscosity and diffusivity coefficients at w-points 260 CASE( np_RIC ) ; CALL zdf_ric( kt, gdept _n, zsh2, avm_k, avt_k ) ! Richardson number dependent Kz261 CASE( np_TKE ) ; CALL zdf_tke( kt 262 CASE( np_RIC ) ; CALL zdf_ric( kt, gdept(:,:,:,kt2lev2), zsh2, avm_k, avt_k ) ! Richardson number dependent Kz 263 CASE( np_TKE ) ; CALL zdf_tke( kt, ktlev1, ktlev2, kt2lev1, kt2lev2, zsh2, avm_k, avt_k ) ! TKE closure scheme for Kz 262 264 CASE( np_GLS ) ; CALL zdf_gls( kt , zsh2, avm_k, avt_k ) ! GLS closure scheme for Kz 263 265 CASE( np_OSM ) ; CALL zdf_osm( kt , avm_k, avt_k ) ! OSMOSIS closure scheme for Kz … … 318 320 IF( ln_zdfgls ) CALL gls_rst( kt, 'WRITE' ) 319 321 IF( ln_zdfric ) CALL ric_rst( kt, 'WRITE' ) 320 ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after w nhas been updated322 ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after ww has been updated 321 323 ENDIF 322 324 ! -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/ZDF/zdftke.F90
r10425 r10829 109 109 110 110 111 SUBROUTINE zdf_tke( kt, p_sh2, p_avm, p_avt )111 SUBROUTINE zdf_tke( kt, ktlev1, ktlev2, kt2lev1, kt2lev2, p_sh2, p_avm, p_avt ) 112 112 !!---------------------------------------------------------------------- 113 113 !! *** ROUTINE zdf_tke *** … … 155 155 !!---------------------------------------------------------------------- 156 156 INTEGER , INTENT(in ) :: kt ! ocean time step 157 INTEGER , INTENT(in ) :: ktlev1, ktlev2 ! time level indices for 3-time-level source terms 158 INTEGER , INTENT(in ) :: kt2lev1, kt2lev2 ! time level indices for 2-time-level source terms 157 159 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: p_sh2 ! shear production term 158 160 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: p_avm, p_avt ! momentum and tracer Kz (w-points) 159 161 !!---------------------------------------------------------------------- 160 162 ! 161 CALL tke_tke( gdepw_n, e3t_n, e3w_n, p_sh2, p_avm, p_avt ) ! now tke (en)162 ! 163 CALL tke_avn( gdepw_n, e3t_n, e3w_n, p_avm, p_avt ) ! now avt, avm, dissl163 CALL tke_tke( ktlev1, kt2lev1, kt2lev2, gdepw(:,:,:,kt2lev2), e3t(:,:,:,ktlev2), e3w(:,:,:,kt2lev2), p_sh2, p_avm, p_avt ) ! now tke (en) 164 ! 165 CALL tke_avn( kt2lev2, gdepw(:,:,:,kt2lev2), e3t(:,:,:,ktlev2), e3w(:,:,:,kt2lev2), p_avm, p_avt ) ! now avt, avm, dissl 164 166 ! 165 167 END SUBROUTINE zdf_tke 166 168 167 169 168 SUBROUTINE tke_tke( pdepw, p_e3t, p_e3w, p_sh2, p_avm, p_avt )170 SUBROUTINE tke_tke( ktlev1, kt2lev1, kt2lev2, pdepw, p_e3t, p_e3w, p_sh2, p_avm, p_avt ) 169 171 !!---------------------------------------------------------------------- 170 172 !! *** ROUTINE tke_tke *** … … 186 188 USE zdf_oce , ONLY : en ! ocean vertical physics 187 189 !! 190 INTEGER , INTENT(in ) :: ktlev1 ! time level index for 3-time-level source terms 191 INTEGER , INTENT(in ) :: kt2lev1, kt2lev2 ! time level indices for 2-time-level source terms 188 192 REAL(wp), DIMENSION(:,:,:) , INTENT(in ) :: pdepw ! depth of w-points 189 193 REAL(wp), DIMENSION(:,:,:) , INTENT(in ) :: p_e3t, p_e3w ! level thickness (t- & w-points) … … 243 247 zmskv = ( 2. - vmask(ji,jj-1,mbkt(ji,jj)) * vmask(ji,jj,mbkt(ji,jj)) ) 244 248 ! ! where 0.001875 = (rn_ebb0/rau0) * 0.5 = 3.75*0.5/1000. (CAUTION CdU<0) 245 zebot = - 0.001875_wp * rCdU_bot(ji,jj) * SQRT( ( zmsku*( u b(ji,jj,mbkt(ji,jj))+ub(ji-1,jj,mbkt(ji,jj)) ) )**2 &246 & + ( zmskv*( v b(ji,jj,mbkt(ji,jj))+vb(ji,jj-1,mbkt(ji,jj)) ) )**2 )249 zebot = - 0.001875_wp * rCdU_bot(ji,jj) * SQRT( ( zmsku*( uu(ji,jj,mbkt(ji,jj),ktlev1)+uu(ji-1,jj,mbkt(ji,jj),ktlev1) ) )**2 & 250 & + ( zmskv*( vv(ji,jj,mbkt(ji,jj),ktlev1)+vv(ji,jj-1,mbkt(ji,jj),ktlev1) ) )**2 ) 247 251 en(ji,jj,mbkt(ji,jj)+1) = MAX( zebot, rn_emin ) * ssmask(ji,jj) 248 252 END DO … … 254 258 zmskv = ( 2. - vmask(ji,jj-1,mikt(ji,jj)) * vmask(ji,jj,mikt(ji,jj)) ) 255 259 ! ! where 0.001875 = (rn_ebb0/rau0) * 0.5 = 3.75*0.5/1000. (CAUTION CdU<0) 256 zetop = - 0.001875_wp * rCdU_top(ji,jj) * SQRT( ( zmsku*( u b(ji,jj,mikt(ji,jj))+ub(ji-1,jj,mikt(ji,jj)) ) )**2 &257 & + ( zmskv*( v b(ji,jj,mikt(ji,jj))+vb(ji,jj-1,mikt(ji,jj)) ) )**2 )260 zetop = - 0.001875_wp * rCdU_top(ji,jj) * SQRT( ( zmsku*( uu(ji,jj,mikt(ji,jj),ktlev1)+uu(ji-1,jj,mikt(ji,jj),ktlev1) ) )**2 & 261 & + ( zmskv*( vv(ji,jj,mikt(ji,jj),ktlev1)+vv(ji,jj-1,mikt(ji,jj),ktlev1) ) )**2 ) 258 262 en(ji,jj,mikt(ji,jj)) = MAX( zetop, rn_emin ) * (1._wp - tmask(ji,jj,1)) ! masked at ocean surface 259 263 END DO … … 268 272 ! 269 273 ! !* total energy produce by LC : cumulative sum over jk 270 zpelc(:,:,1) = MAX( r n2b(:,:,1), 0._wp ) * pdepw(:,:,1) * p_e3w(:,:,1)274 zpelc(:,:,1) = MAX( r_n2(:,:,1,kt2lev1), 0._wp ) * pdepw(:,:,1) * p_e3w(:,:,1) 271 275 DO jk = 2, jpk 272 zpelc(:,:,jk) = zpelc(:,:,jk-1) + MAX( r n2b(:,:,jk), 0._wp ) * pdepw(:,:,jk) * p_e3w(:,:,jk)276 zpelc(:,:,jk) = zpelc(:,:,jk-1) + MAX( r_n2(:,:,jk,kt2lev1), 0._wp ) * pdepw(:,:,jk) * p_e3w(:,:,jk) 273 277 END DO 274 278 ! !* finite Langmuir Circulation depth … … 327 331 DO ji = 2, jpim1 328 332 ! ! local Richardson number 329 zri = MAX( r n2b(ji,jj,jk), 0._wp ) * p_avm(ji,jj,jk) / ( p_sh2(ji,jj,jk) + rn_bshear )333 zri = MAX( r_n2(ji,jj,jk,kt2lev1), 0._wp ) * p_avm(ji,jj,jk) / ( p_sh2(ji,jj,jk) + rn_bshear ) 330 334 ! ! inverse of Prandtl number 331 335 apdlr(ji,jj,jk) = MAX( 0.1_wp, ri_cri / MAX( ri_cri , zri ) ) … … 352 356 ! ! right hand side in en 353 357 en(ji,jj,jk) = en(ji,jj,jk) + rdt * ( p_sh2(ji,jj,jk) & ! shear 354 & - p_avt(ji,jj,jk) * r n2(ji,jj,jk) & ! stratification358 & - p_avt(ji,jj,jk) * r_n2(ji,jj,jk,kt2lev2) & ! stratification 355 359 & + zfact3 * dissl(ji,jj,jk) * en(ji,jj,jk) & ! dissipation 356 360 & ) * wmask(ji,jj,jk) … … 441 445 442 446 443 SUBROUTINE tke_avn( pdepw, p_e3t, p_e3w, p_avm, p_avt )447 SUBROUTINE tke_avn( kt2lev2, pdepw, p_e3t, p_e3w, p_avm, p_avt ) 444 448 !!---------------------------------------------------------------------- 445 449 !! *** ROUTINE tke_avn *** … … 477 481 USE zdf_oce , ONLY : en, avtb, avmb, avtb_2d ! ocean vertical physics 478 482 !! 483 INTEGER , INTENT(in ) :: kt2lev2 ! time level index for 2-time-level source terms 479 484 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pdepw ! depth (w-points) 480 485 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: p_e3t, p_e3w ! level thickness (t- & w-points) … … 512 517 DO jj = 2, jpjm1 513 518 DO ji = fs_2, fs_jpim1 ! vector opt. 514 zrn2 = MAX( r n2(ji,jj,jk), rsmall )519 zrn2 = MAX( r_n2(ji,jj,jk,kt2lev2), rsmall ) 515 520 zmxlm(ji,jj,jk) = MAX( rmxl_min, SQRT( 2._wp * en(ji,jj,jk) / zrn2 ) ) 516 521 END DO -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/step.F90
r10825 r10829 132 132 133 133 ! VERTICAL PHYSICS 134 CALL zdf_phy( kstp )! vertical physics update (top/bot drag, avt, avs, avm + MLD)134 CALL zdf_phy( kstp, Nm1, Nnn, Nm1_2lev, Nnn_2lev ) ! vertical physics update (top/bot drag, avt, avs, avm + MLD) 135 135 136 136 ! LATERAL PHYSICS
Note: See TracChangeset
for help on using the changeset viewer.