New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13193 for NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/ZDF/zdftke.F90 – NEMO

Ignore:
Timestamp:
2020-07-01T15:42:06+02:00 (4 years ago)
Author:
smasson
Message:

better e3: update with trunk@13136 see #2385

Location:
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@12931        sette 
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/ZDF/zdftke.F90

    r12724 r13193  
    4545   USE zdfdrg         ! vertical physics: top/bottom drag coef. 
    4646   USE zdfmxl         ! vertical physics: mixed layer 
     47#if defined key_si3 
     48   USE ice, ONLY: hm_i, h_i 
     49#endif 
     50#if defined key_cice 
     51   USE sbc_ice, ONLY: h_i 
     52#endif 
    4753   ! 
    4854   USE in_out_manager ! I/O manager 
     
    6470   INTEGER  ::   nn_mxl    ! type of mixing length (=0/1/2/3) 
    6571   REAL(wp) ::   rn_mxl0   ! surface  min value of mixing length (kappa*z_o=0.4*0.1 m)  [m] 
     72   INTEGER  ::      nn_mxlice ! type of scaling under sea-ice 
     73   REAL(wp) ::      rn_mxlice ! max constant ice thickness value when scaling under sea-ice ( nn_mxlice=1) 
    6674   INTEGER  ::   nn_pdl    ! Prandtl number or not (ratio avt/avm) (=0/1) 
    6775   REAL(wp) ::   rn_ediff  ! coefficient for avt: avt=rn_ediff*mxl*sqrt(e) 
     
    245253               zetop = - 0.001875_wp * rCdU_top(ji,jj) * SQRT(  ( zmsku*( uu(ji,jj,mikt(ji,jj),Kbb)+uu(ji-1,jj,mikt(ji,jj),Kbb) ) )**2  & 
    246254                  &                                           + ( zmskv*( vv(ji,jj,mikt(ji,jj),Kbb)+vv(ji,jj-1,mikt(ji,jj),Kbb) ) )**2  ) 
    247                en(ji,jj,mikt(ji,jj)) = en(ji,jj,1) * tmask(ji,jj,1) + MAX( zetop, rn_emin ) * (1._wp - tmask(ji,jj,1)) * ssmask(ji,jj)   ! masked at ocean surface 
     255               ! (1._wp - tmask(ji,jj,1)) * ssmask(ji,jj) = 1 where ice shelves are present 
     256               en(ji,jj,mikt(ji,jj)) = en(ji,jj,1)           * tmask(ji,jj,1) & 
     257                  &                  + MAX( zetop, rn_emin ) * (1._wp - tmask(ji,jj,1)) * ssmask(ji,jj) 
    248258            END_2D 
    249259         ENDIF 
     
    424434      REAL(wp) ::   zrn2, zraug, zcoef, zav   ! local scalars 
    425435      REAL(wp) ::   zdku,   zdkv, zsqen       !   -      - 
    426       REAL(wp) ::   zemxl, zemlm, zemlp       !   -      - 
     436      REAL(wp) ::   zemxl, zemlm, zemlp, zmaxice       !   -      - 
    427437      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmxlm, zmxld   ! 3D workspace 
    428438      !!-------------------------------------------------------------------- 
     
    438448      zmxld(:,:,:)  = rmxl_min 
    439449      ! 
    440       IF( ln_mxl0 ) THEN            ! surface mixing length = F(stress) : l=vkarmn*2.e5*taum/(rho0*g) 
     450     IF( ln_mxl0 ) THEN            ! surface mixing length = F(stress) : l=vkarmn*2.e5*taum/(rho0*g) 
     451         ! 
    441452         zraug = vkarmn * 2.e5_wp / ( rho0 * grav ) 
     453#if ! defined key_si3 && ! defined key_cice 
    442454         DO_2D_00_00 
    443             zmxlm(ji,jj,1) = MAX( rn_mxl0, zraug * taum(ji,jj) * tmask(ji,jj,1) ) 
     455            zmxlm(ji,jj,1) =  zraug * taum(ji,jj) * tmask(ji,jj,1) 
    444456         END_2D 
    445       ELSE  
     457#else 
     458         SELECT CASE( nn_mxlice )             ! Type of scaling under sea-ice 
     459         ! 
     460         CASE( 0 )                      ! No scaling under sea-ice 
     461            DO_2D_00_00 
     462               zmxlm(ji,jj,1) = zraug * taum(ji,jj) * tmask(ji,jj,1) 
     463            END_2D 
     464            ! 
     465         CASE( 1 )                           ! scaling with constant sea-ice thickness 
     466            DO_2D_00_00 
     467               zmxlm(ji,jj,1) =  ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * rn_mxlice ) * tmask(ji,jj,1) 
     468            END_2D 
     469            ! 
     470         CASE( 2 )                                 ! scaling with mean sea-ice thickness 
     471            DO_2D_00_00 
     472#if defined key_si3 
     473               zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * hm_i(ji,jj) * 2. ) * tmask(ji,jj,1) 
     474#elif defined key_cice 
     475               zmaxice = MAXVAL( h_i(ji,jj,:) ) 
     476               zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * zmaxice ) * tmask(ji,jj,1) 
     477#endif 
     478            END_2D 
     479            ! 
     480         CASE( 3 )                                 ! scaling with max sea-ice thickness 
     481            DO_2D_00_00 
     482               zmaxice = MAXVAL( h_i(ji,jj,:) ) 
     483               zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * zmaxice ) * tmask(ji,jj,1) 
     484            END_2D 
     485            ! 
     486         END SELECT 
     487#endif 
     488         ! 
     489         DO_2D_00_00 
     490            zmxlm(ji,jj,1) = MAX( rn_mxl0, zmxlm(ji,jj,1) ) 
     491         END_2D 
     492         ! 
     493      ELSE 
    446494         zmxlm(:,:,1) = rn_mxl0 
    447495      ENDIF 
     496 
    448497      ! 
    449498      DO_3D_00_00( 2, jpkm1 ) 
     
    554603      INTEGER             ::   ios 
    555604      !! 
    556       NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb , rn_emin  ,          & 
    557          &                 rn_emin0, rn_bshear, nn_mxl , ln_mxl0  ,          & 
    558          &                 rn_mxl0 , nn_pdl   , ln_drg , ln_lc    , rn_lc,   & 
    559          &                 nn_etau , nn_htau  , rn_efr , rn_eice   
     605      NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb   , rn_emin  ,  & 
     606         &                 rn_emin0, rn_bshear, nn_mxl   , ln_mxl0  ,  & 
     607         &                 rn_mxl0 , nn_mxlice, rn_mxlice,             & 
     608         &                 nn_pdl  , ln_drg   , ln_lc    , rn_lc,      & 
     609         &                 nn_etau , nn_htau  , rn_efr   , rn_eice   
    560610      !!---------------------------------------------------------------------- 
    561611      ! 
     
    583633         WRITE(numout,*) '      mixing length type                          nn_mxl    = ', nn_mxl 
    584634         WRITE(numout,*) '         surface mixing length = F(stress) or not    ln_mxl0   = ', ln_mxl0 
     635         IF( ln_mxl0 ) THEN 
     636            WRITE(numout,*) '      type of scaling under sea-ice               nn_mxlice = ', nn_mxlice 
     637            IF( nn_mxlice == 1 ) & 
     638            WRITE(numout,*) '      ice thickness when scaling under sea-ice    rn_mxlice = ', rn_mxlice 
     639         ENDIF          
    585640         WRITE(numout,*) '         surface  mixing length minimum value        rn_mxl0   = ', rn_mxl0 
    586641         WRITE(numout,*) '      top/bottom friction forcing flag            ln_drg    = ', ln_drg 
Note: See TracChangeset for help on using the changeset viewer.