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 10883 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/ZDF/zdfphy.F90 – NEMO

Ignore:
Timestamp:
2019-04-18T14:29:58+02:00 (5 years ago)
Author:
davestorkey
Message:

branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps: some of the ocean physics modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/ZDF/zdfphy.F90

    r10874 r10883  
    6161CONTAINS 
    6262 
    63    SUBROUTINE zdf_phy_init 
     63   SUBROUTINE zdf_phy_init( Kmm ) 
    6464      !!---------------------------------------------------------------------- 
    6565      !!                  ***  ROUTINE zdf_phy_init  *** 
     
    7070      !!                set horizontal shape and vertical profile of background mixing coef. 
    7171      !!---------------------------------------------------------------------- 
     72      INTEGER, INTENT(in)    :: Kmm ! time level index (middle) 
     73      ! 
    7274      INTEGER ::   jk            ! dummy loop indices 
    7375      INTEGER ::   ioptio, ios   ! local integers 
     
    193195      IF( ln_zdftke ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_TKE   ;   CALL zdf_tke_init   ;   ENDIF 
    194196      IF( ln_zdfgls ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_GLS   ;   CALL zdf_gls_init   ;   ENDIF 
    195       IF( ln_zdfosm ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_OSM   ;   CALL zdf_osm_init   ;   ENDIF 
     197      IF( ln_zdfosm ) THEN   ;   ioptio = ioptio + 1   ;    nzdf_phy = np_OSM   ;   CALL zdf_osm_init( Kmm )   ;   ENDIF 
    196198      ! 
    197199      IF( ioptio /= 1 )    CALL ctl_stop( 'zdf_phy_init: one and only one vertical diffusion option has to be defined ' ) 
     
    218220 
    219221 
    220    SUBROUTINE zdf_phy( kt ) 
     222   SUBROUTINE zdf_phy( kt, Kbb, Kmm ) 
    221223      !!---------------------------------------------------------------------- 
    222224      !!                     ***  ROUTINE zdf_phy  *** 
     
    230232      !!                bottom stress.....                               <<<<====verifier ! 
    231233      !!---------------------------------------------------------------------- 
    232       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     234      INTEGER, INTENT(in) ::   kt         ! ocean time-step index 
     235      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices 
    233236      ! 
    234237      INTEGER ::   ji, jj, jk   ! dummy loop indice 
     
    254257      ! 
    255258      IF( l_zdfsh2 )   &         !* shear production at w-points (energy conserving form) 
    256          CALL zdf_sh2( ub, vb, un, vn, avm_k,   &     ! <<== in 
    257             &                           zsh2    )     ! ==>> out : shear production 
     259         CALL zdf_sh2( Kbb, Kmm, avm_k,   &     ! <<== in 
     260            &                     zsh2    )     ! ==>> out : shear production 
    258261      ! 
    259262      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 Kz 
    261       CASE( np_TKE )   ;   CALL zdf_tke( kt         , zsh2, avm_k, avt_k )    ! TKE closure scheme for Kz 
    262       CASE( np_GLS )   ;   CALL zdf_gls( kt         , zsh2, avm_k, avt_k )    ! GLS closure scheme for Kz 
    263       CASE( np_OSM )   ;   CALL zdf_osm( kt               , avm_k, avt_k )    ! OSMOSIS closure scheme for Kz 
     263      CASE( np_RIC )   ;   CALL zdf_ric( kt,      Kmm, zsh2, avm_k, avt_k )    ! Richardson number dependent Kz 
     264      CASE( np_TKE )   ;   CALL zdf_tke( kt, Kbb, Kmm, zsh2, avm_k, avt_k )    ! TKE closure scheme for Kz 
     265      CASE( np_GLS )   ;   CALL zdf_gls( kt, Kbb, Kmm, zsh2, avm_k, avt_k )    ! GLS closure scheme for Kz 
     266      CASE( np_OSM )   ;   CALL zdf_osm( kt, Kbb, Kmm      , avm_k, avt_k )    ! OSMOSIS closure scheme for Kz 
    264267!     CASE( np_CST )                                  ! Constant Kz (reset avt, avm to the background value) 
    265268!         ! avt_k and avm_k set one for all at initialisation phase 
     
    318321         IF( ln_zdfgls )   CALL gls_rst( kt, 'WRITE' ) 
    319322         IF( ln_zdfric )   CALL ric_rst( kt, 'WRITE' )  
    320          ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after wn has been updated 
     323         ! NB. OSMOSIS restart (osm_rst) will be called in step.F90 after ww has been updated 
    321324      ENDIF 
    322325      ! 
Note: See TracChangeset for help on using the changeset viewer.