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 14021 for NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/ZDF/zdfphy.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T20:53:00+01:00 (3 years ago)
Author:
laurent
Message:

Caught up with trunk rev 14020...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/ZDF/zdfphy.F90

    r13558 r14021  
    99   !!---------------------------------------------------------------------- 
    1010   !!   zdf_phy_init  : initialization of all vertical physics packages 
    11    !!   zdf_phy       : upadate at each time-step the vertical mixing coeff.  
     11   !!   zdf_phy       : upadate at each time-step the vertical mixing coeff. 
    1212   !!---------------------------------------------------------------------- 
    1313   USE oce            ! ocean dynamics and tracers variables 
    14    USE zdf_oce        ! vertical physics: shared variables          
     14   USE zdf_oce        ! vertical physics: shared variables 
    1515   USE zdfdrg         ! vertical physics: top/bottom drag coef. 
    1616   USE zdfsh2         ! vertical physics: shear production term of TKE 
    17    USE zdfric         ! vertical physics: RIChardson dependent vertical mixing    
     17   USE zdfric         ! vertical physics: RIChardson dependent vertical mixing 
    1818   USE zdftke         ! vertical physics: TKE vertical mixing 
    1919   USE zdfgls         ! vertical physics: GLS vertical mixing 
    2020   USE zdfosm         ! vertical physics: OSMOSIS vertical mixing 
    21    USE zdfddm         ! vertical physics: double diffusion mixing       
    22    USE zdfevd         ! vertical physics: convection via enhanced vertical diffusion   
    23    USE zdfiwm         ! vertical physics: internal wave-induced mixing   
     21   USE zdfddm         ! vertical physics: double diffusion mixing 
     22   USE zdfevd         ! vertical physics: convection via enhanced vertical diffusion 
     23   USE zdfmfc         ! vertical physics: Mass Flux Convection 
     24   USE zdfiwm         ! vertical physics: internal wave-induced mixing 
    2425   USE zdfswm         ! vertical physics: surface  wave-induced mixing 
    2526   USE zdfmxl         ! vertical physics: mixed layer 
    2627   USE tranpc         ! convection: non penetrative adjustment 
    27    USE trc_oce        ! variables shared between passive tracer & ocean            
     28   USE trc_oce        ! variables shared between passive tracer & ocean 
    2829   USE sbc_oce        ! surface module (only for nn_isf in the option compatibility test) 
    2930   USE sbcrnf         ! surface boundary condition: runoff variables 
     
    4546   PUBLIC   zdf_phy       ! called by step.F90 
    4647 
    47    INTEGER ::   nzdf_phy   ! type of vertical closure used  
     48   INTEGER ::   nzdf_phy   ! type of vertical closure used 
    4849   !                       ! associated indicators 
    4950   INTEGER, PARAMETER ::   np_CST = 1   ! Constant Kz 
     
    6566      !!---------------------------------------------------------------------- 
    6667      !!                  ***  ROUTINE zdf_phy_init  *** 
    67       !!  
     68      !! 
    6869      !! ** Purpose :   initializations of the vertical ocean physics 
    6970      !! 
    70       !! ** Method  :   Read namelist namzdf, control logicals  
     71      !! ** Method  :   Read namelist namzdf, control logicals 
    7172      !!                set horizontal shape and vertical profile of background mixing coef. 
    7273      !!---------------------------------------------------------------------- 
     
    7879      NAMELIST/namzdf/ ln_zdfcst, ln_zdfric, ln_zdftke, ln_zdfgls,   &     ! type of closure scheme 
    7980         &             ln_zdfosm,                                    &     ! type of closure scheme 
     81         &             ln_zdfmfc,                                    &     ! convection : mass flux 
    8082         &             ln_zdfevd, nn_evdm, rn_evd ,                  &     ! convection : evd 
    8183         &             ln_zdfnpc, nn_npc , nn_npcp,                  &     ! convection : npc 
     
    112114         WRITE(numout,*) '         OSMOSIS-OBL closure (OSM)               ln_zdfosm = ', ln_zdfosm 
    113115         WRITE(numout,*) '      convection: ' 
     116         WRITE(numout,*) '         convection mass flux (mfc)              ln_zdfmfc = ', ln_zdfmfc 
    114117         WRITE(numout,*) '         enhanced vertical diffusion             ln_zdfevd = ', ln_zdfevd 
    115118         WRITE(numout,*) '            applied on momentum (=1/0)             nn_evdm = ', nn_evdm 
     
    140143      IF( nn_avb == 0 ) THEN             ! Define avmb, avtb from namelist parameter 
    141144         avmb(:) = rn_avm0 
    142          avtb(:) = rn_avt0                      
     145         avtb(:) = rn_avt0 
    143146      ELSE                               ! Background profile of avt (fit a theoretical/observational profile (Krauss 1990) 
    144147         avmb(:) = rn_avm0 
     
    147150      ENDIF 
    148151      !                                  ! 2D shape of the avtb 
    149       avtb_2d(:,:) = 1._wp                   ! uniform  
     152      avtb_2d(:,:) = 1._wp                   ! uniform 
    150153      ! 
    151154      IF( nn_havtb == 1 ) THEN               ! decrease avtb by a factor of ten in the equatorial band 
     
    172175      IF( ln_zdfnpc .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfnpc and ln_zdfevd' ) 
    173176      IF( ln_zdfosm .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfosm and ln_zdfevd' ) 
     177      IF( ln_zdfmfc .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfmfc and ln_zdfevd' ) 
     178      IF( ln_zdfmfc .AND. ln_zdfnpc )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfmfc and ln_zdfnpc' ) 
     179      IF( ln_zdfmfc .AND. ln_zdfosm )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfmfc and ln_zdfosm' ) 
    174180      IF( lk_top    .AND. ln_zdfnpc )   CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 
    175181      IF( lk_top    .AND. ln_zdfosm )   CALL ctl_stop( 'zdf_phy_init: osmosis scheme is not working with key_top' ) 
     182      IF( lk_top    .AND. ln_zdfmfc )   CALL ctl_stop( 'zdf_phy_init: Mass Flux scheme is not working with key_top' ) 
    176183      IF(lwp) THEN 
    177184         WRITE(numout,*) 
    178185         IF    ( ln_zdfnpc ) THEN  ;   WRITE(numout,*) '   ==>>>   convection: use non penetrative convective scheme' 
    179186         ELSEIF( ln_zdfevd ) THEN  ;   WRITE(numout,*) '   ==>>>   convection: use enhanced vertical diffusion scheme' 
     187         ELSEIF( ln_zdfmfc ) THEN  ;   WRITE(numout,*) '   ==>>>   convection: use Mass Flux scheme' 
    180188         ELSE                      ;   WRITE(numout,*) '   ==>>>   convection: no specific scheme used' 
    181189         ENDIF 
     
    190198 
    191199      !                          !==  type of vertical turbulent closure  ==!    (set nzdf_phy) 
    192       ioptio = 0  
     200      ioptio = 0 
    193201      IF( ln_zdfcst ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_CST   ;   ENDIF 
    194202      IF( ln_zdfric ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_RIC   ;   CALL zdf_ric_init          ;   ENDIF 
     
    205213      ELSE                   ;   l_zdfsh2 = .TRUE. 
    206214      ENDIF 
    207  
     215      !                          !== Mass Flux Convectiive algorithm  ==! 
     216      IF( ln_zdfmfc )   CALL zdf_mfc_init       ! Convection computed with eddy diffusivity mass flux 
     217      ! 
    208218      !                          !== gravity wave-driven mixing  ==! 
    209219      IF( ln_zdfiwm )   CALL zdf_iwm_init       ! internal wave-driven mixing 
     
    226236      !! ** Purpose :  Update ocean physics at each time-step 
    227237      !! 
    228       !! ** Method  :  
     238      !! ** Method  : 
    229239      !! 
    230240      !! ** Action  :   avm, avt vertical eddy viscosity and diffusivity at w-points 
     
    244254         ! 
    245255         !                       !* bottom drag 
    246          CALL zdf_drg( kt, Kmm, mbkt , r_Cdmin_bot, r_Cdmax_bot,   &   ! <<== in  
     256         CALL zdf_drg( kt, Kmm, mbkt , r_Cdmin_bot, r_Cdmax_bot,   &   ! <<== in 
    247257            &              r_z0_bot,   r_ke0_bot,    rCd0_bot,   & 
    248258            &                                        rCdU_bot  )     ! ==>> out : bottom drag [m/s] 
    249259         IF( ln_isfcav ) THEN    !* top drag   (ocean cavities) 
    250             CALL zdf_drg( kt, Kmm, mikt , r_Cdmin_top, r_Cdmax_top,   &   ! <<== in  
     260            CALL zdf_drg( kt, Kmm, mikt , r_Cdmin_top, r_Cdmax_top,   &   ! <<== in 
    251261               &              r_z0_top,   r_ke0_top,    rCd0_top,   & 
    252262               &                                        rCdU_top  )     ! ==>> out : bottom drag [m/s] 
     
    263273      ENDIF 
    264274#endif 
    265       !  
     275      ! 
    266276      !                       !==  Kz from chosen turbulent closure  ==!   (avm_k, avt_k) 
    267277      ! 
     
    280290!!gm         avm(2:jpim1,2:jpjm1,1:jpkm1) = rn_avm0 * wmask(2:jpim1,2:jpjm1,1:jpkm1) 
    281291      END SELECT 
    282       !   
     292      ! 
    283293      !                          !==  ocean Kz  ==!   (avt, avs, avm) 
    284294      ! 
     
    302312      ENDIF 
    303313      ! 
    304       !                                         !* wave-induced mixing  
    305       IF( ln_zdfswm )   CALL zdf_swm( kt, Kmm, avm, avt, avs )   ! surface  wave (Qiao et al. 2004)  
     314      !                                         !* wave-induced mixing 
     315      IF( ln_zdfswm )   CALL zdf_swm( kt, Kmm, avm, avt, avs )   ! surface  wave (Qiao et al. 2004) 
    306316      IF( ln_zdfiwm )   CALL zdf_iwm( kt, Kmm, avm, avt, avs )   ! internal wave (de Lavergne et al 2017) 
    307317 
    308 #if defined key_agrif  
     318#if defined key_agrif 
    309319      ! interpolation parent grid => child grid for avm_k ( ex : at west border: update column 1 and 2) 
    310320      IF( l_zdfsh2 )   CALL Agrif_avm 
     
    330340         IF( ln_zdftke )   CALL tke_rst( kt, 'WRITE' ) 
    331341         IF( ln_zdfgls )   CALL gls_rst( kt, 'WRITE' ) 
    332          IF( ln_zdfric )   CALL ric_rst( kt, 'WRITE' )  
     342         IF( ln_zdfric )   CALL ric_rst( kt, 'WRITE' ) 
    333343         ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after ww has been updated 
    334344      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.