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 8911 for branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90 – NEMO

Ignore:
Timestamp:
2017-12-06T11:23:32+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_r7881_ENHANCE09_RK3. Add changes for OSMOSIS BL scheme (and a few minor fixes). Done on this branch to ensure compatibility with the new ZDF arrangement. This branch has already been merged onto the dev_CNRS_2017 combined branch so these changes will need to be merged onto that branch once successfully reviewed. Fully SETTE tested at this point.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90

    r8866 r8911  
    1818   USE zdftke         ! vertical physics: TKE vertical mixing 
    1919   USE zdfgls         ! vertical physics: GLS vertical mixing 
     20   USE zdfosm         ! vertical physics: OSMOSIS vertical mixing 
    2021   USE zdfddm         ! vertical physics: double diffusion mixing       
    2122   USE zdfevd         ! vertical physics: convection via enhanced vertical diffusion   
     
    4950   INTEGER, PARAMETER ::   np_TKE = 3   ! Turbulente Kinetic Eenergy closure scheme for Kz 
    5051   INTEGER, PARAMETER ::   np_GLS = 4   ! Generic Length Scale closure scheme for Kz 
     52   INTEGER, PARAMETER ::   np_OSM = 5   ! OSMOSIS-OBL closure scheme for Kz 
    5153 
    5254   LOGICAL ::   l_zdfsh2   ! shear production term flag (=F for CST, =T otherwise (i.e. TKE, GLS, RIC)) 
     
    7274      !! 
    7375      NAMELIST/namzdf/ ln_zdfcst, ln_zdfric, ln_zdftke, ln_zdfgls,   &     ! type of closure scheme 
     76         &             ln_zdfosm,                                    &     ! type of closure scheme 
    7477         &             ln_zdfevd, nn_evdm, rn_evd ,                  &     ! convection : evd 
    7578         &             ln_zdfnpc, nn_npc , nn_npcp,                  &     ! convection : npc 
     
    102105         WRITE(numout,*) '         Turbulent Kinetic Energy closure (TKE)  ln_zdftke = ', ln_zdftke 
    103106         WRITE(numout,*) '         Generic Length Scale closure (GLS)      ln_zdfgls = ', ln_zdfgls 
     107         WRITE(numout,*) '         OSMOSIS-OBL closure (OSM)               ln_zdfosm = ', ln_zdfosm 
    104108         WRITE(numout,*) '      convection: ' 
    105109         WRITE(numout,*) '         enhanced vertical diffusion             ln_zdfevd = ', ln_zdfevd 
     
    156160      ! 
    157161      IF( ln_zdfnpc .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfnpc and ln_zdfevd' ) 
     162      IF( ln_zdfosm .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfosm and ln_zdfevd' ) 
    158163      IF( lk_top    .AND. ln_zdfnpc )   CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 
     164      !IF( lk_top    .AND. ln_zdfosm )   CALL ctl_stop( 'zdf_phy_init: osmosis scheme is not working with key_top' ) 
    159165      IF(lwp) THEN 
    160166         WRITE(numout,*) 
     
    178184      IF( ln_zdftke ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_TKE   ;   CALL zdf_tke_init   ;   ENDIF 
    179185      IF( ln_zdfgls ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_GLS   ;   CALL zdf_gls_init   ;   ENDIF 
     186      IF( ln_zdfosm ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_OSM   ;   CALL zdf_osm_init   ;   ENDIF 
    180187      ! 
    181188      IF( ioptio /= 1 )    CALL ctl_stop( 'zdf_phy_init: one and only one vertical diffusion option has to be defined ' ) 
     
    247254      CASE( np_TKE )   ;   CALL zdf_tke( kt         , zsh2, avm_k, avt_k )    ! TKE closure scheme for Kz 
    248255      CASE( np_GLS )   ;   CALL zdf_gls( kt         , zsh2, avm_k, avt_k )    ! GLS closure scheme for Kz 
     256      CASE( np_OSM )   ;   CALL zdf_osm( kt               , avm_k, avt_k )    ! OSMOSIS closure scheme for Kz 
    249257!     CASE( np_CST )                                  ! Constant Kz (reset avt, avm to the background value) 
    250258!         ! avt_k and avm_k set one for all at initialisation phase 
     
    290298      CALL lbc_lnk( avm  , 'W', 1. )                  ! needed to compute avm at u- and v-points 
    291299      CALL lbc_lnk( avt  , 'W', 1. )                  !!gm  a priori only avm_k and avm are required 
    292       CALL lbc_lnk( avs  , 'W', 1. )                  !!gm  for calculation, keeped here for output only 
     300      CALL lbc_lnk( avs  , 'W', 1. )                  !!gm  for calculation, kept here for output only 
    293301      ! 
    294302      IF( l_zdfdrg ) THEN     ! drag  have been updated (non-linear cases) 
     
    302310         IF( ln_zdftke )   CALL tke_rst( kt, 'WRITE' ) 
    303311         IF( ln_zdfgls )   CALL gls_rst( kt, 'WRITE' ) 
     312         IF( ln_zdfosm )   CALL osm_rst( kt, 'WRITE' ) 
    304313         IF( ln_zdfric )   CALL ric_rst( kt, 'WRITE' )  
    305314      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.