Changeset 13851
- Timestamp:
- 2020-11-23T15:24:10+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/ZDF/zdftke.F90
r13759 r13851 239 239 ! !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 240 240 ! 241 DO_2D( 0, 0, 0, 0 ) ! en(1) = rn_ebb taum / rau0 (min value rn_emin0) 242 !! clem: this should be the right formulation but it makes the model unstable unless drags are calculated implicitly 243 !! one way around would be to increase zbbirau 244 !! en(ji,jj,1) = MAX( rn_emin0, ( ( 1._wp - fr_i(ji,jj) ) * zbbrau + & 245 !! & fr_i(ji,jj) * zbbirau ) * taum(ji,jj) ) * tmask(ji,jj,1) 246 en(ji,jj,1) = MAX( rn_emin0, zbbrau * taum(ji,jj) ) * tmask(ji,jj,1) 247 END_2D 241 zd_up(ji,jj,1) = 0._wp 242 zd_lw(ji,jj,1) = 1._wp 243 244 IF ( cpl_phioc .and. ln_phioc ) THEN 245 SELECT CASE (nn_bc_surf) ! Boundary Condition using surface TKE flux from waves 246 247 CASE ( 0 ) ! Dirichlet BC 248 249 DO_2D( 0, 0, 0, 0 ) ! en(1) = rn_ebb taum / rho0 (min value rn_emin0) 250 IF ( phioc(ji,jj) < 0 ) phioc(ji,jj) = 0._wp 251 en(ji,jj,1) = MAX( rn_emin0, .5 * ( 15.8 * phioc(ji,jj) / rho0 )**(2./3.) ) * tmask(ji,jj,1) 252 zdiag(ji,jj,1) = 1._wp/en(ji,jj,1) ! choose to keep coherence with former estimation of 253 ! zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1) 254 END_2D 255 256 CASE ( 1 ) ! Neumann BC 257 DO_2D( 0, 0, 0, 0 ) 258 IF ( phioc(ji,jj) < 0 ) phioc(ji,jj) = 0._wp 259 en(ji,jj,2) = en(ji,jj,2) + ( rn_Dt * phioc(ji,jj) / rho0 )/e3w(ji,jj,2,Kmm) 260 en(ji,jj,1) = en(ji,jj,2) + (2 * e3t(ji,jj,1,Kmm) * phioc(ji,jj)/rho0) / ( p_avm(ji,jj,1) + p_avm(ji,jj,2) ) 261 zdiag(ji,jj,2) = zdiag(ji,jj,2) + zd_lw(ji,jj,2) 262 zd_lw(ji,jj,2) = 0._wp 263 zdiag(ji,jj,1) = 1._wp 264 END_2D 265 266 END SELECT 267 268 ELSE ! TKE Dirichlet boundary condition (without wave coupling) 269 270 DO_2D( 0, 0, 0, 0 ) ! en(1) = rn_ebb taum / rho0 (min value rn_emin0) 271 en(ji,jj,1) = MAX( rn_emin0, zbbrau * taum(ji,jj) ) * tmask(ji,jj,1) 272 zdiag(ji,jj,1) = 1._wp/en(ji,jj,1) ! choose to keep coherence with former estimation of 273 ! zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1) 274 END_2D 275 276 ENDIF 248 277 ! 249 278 ! !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< … … 400 429 ! ! Surface boundary condition on tke 401 430 ! !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 402 ! [EC] Should we keep this??431 ![EC] should it be removed? 403 432 IF ( ln_isfcav ) THEN 404 433 DO_2D( 1, 1, 1, 1 ) ! en(mikt(ji,jj)) = rn_emin … … 406 435 END_2D 407 436 END IF 408 409 IF ( cpl_phioc .and. ln_phioc ) THEN410 SELECT CASE (nn_bc_surf) ! Boundary Condition using surface TKE flux from waves411 412 CASE ( 0 ) ! Dirichlet BC413 414 DO_2D( 0, 0, 0, 0 ) ! en(1) = rn_ebb taum / rho0 (min value rn_emin0)415 IF ( phioc(ji,jj) < 0 ) phioc(ji,jj) = 0._wp416 en(ji,jj,1) = MAX( rn_emin0, .5 * ( 15.8 * phioc(ji,jj) / rho0 )**(2./3.) ) * tmask(ji,jj,1)417 zdiag(ji,jj,1) = 1._wp/en(ji,jj,1) ! choose to keep coherence with former estimation of418 zd_lw(ji,jj,1) = 1._wp ! zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1)419 zd_up(ji,jj,1) = 0._wp420 END_2D421 422 CASE ( 1 ) ! Neumann BC423 DO_2D( 0, 0, 0, 0 )424 IF ( phioc(ji,jj) < 0 ) phioc(ji,jj) = 0._wp425 en(ji,jj,2) = en(ji,jj,2) + ( rn_Dt * phioc(ji,jj) / rho0 ) /e3w(ji,jj,2,Kmm)426 en(ji,jj,1) = en(ji,jj,2) + (2 * e3t(ji,jj,1,Kmm) * phioc(ji,jj)) / ( p_avm(ji,jj,1) + p_avm(ji,jj,2) )427 zdiag(ji,jj,2) = zdiag(ji,jj,2) + zd_lw(ji,jj,2)428 zd_lw(ji,jj,2) = 0._wp429 zd_up(ji,jj,1) = 0._wp430 END_2D431 !432 END SELECT433 434 ELSE ! TKE Dirichlet boundary condition (without wave coupling)435 436 DO_2D( 0, 0, 0, 0 ) ! en(1) = rn_ebb taum / rho0 (min value rn_emin0)437 en(ji,jj,1) = MAX( rn_emin0, zbbrau * taum(ji,jj) ) * tmask(ji,jj,1)438 zdiag(ji,jj,1) = 1._wp/en(ji,jj,1) ! choose to keep coherence with former estimation of439 zd_lw(ji,jj,1) = 1._wp ! zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1)440 zd_up(ji,jj,1) = 0._wp441 END_2D442 443 ENDIF444 437 ! 445 438 ! !* Matrix inversion from level 2 (tke prescribed at level 1) … … 771 764 IF ( cpl_phioc .and. ln_phioc ) THEN 772 765 SELECT CASE( nn_bc_surf) ! Type of scaling under sea-ice 773 CASE( 0 ) ; WRITE(numout,*) ' nn_bc_surf=0 ==>>> DIRICHLET Surface Boundary Conditionusing surface TKE flux from waves'774 CASE( 1 ) ; WRITE(numout,*) ' nn_bc_surf=1 ==>>> NEUMANN Surface Boundary Conditionusing surface TKE flux from waves'766 CASE( 0 ) ; WRITE(numout,*) ' nn_bc_surf=0 ==>>> DIRICHLET SBC using surface TKE flux from waves' 767 CASE( 1 ) ; WRITE(numout,*) ' nn_bc_surf=1 ==>>> NEUMANN SBC using surface TKE flux from waves' 775 768 END SELECT 776 ENDIF 769 ENDIF 777 770 WRITE(numout,*) ' test param. to add tke induced by wind nn_etau = ', nn_etau 778 771 WRITE(numout,*) ' type of tke penetration profile nn_htau = ', nn_htau
Note: See TracChangeset
for help on using the changeset viewer.