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 1537 for trunk/NEMO/OPA_SRC/ZDF/zdftke.F90 – NEMO

Ignore:
Timestamp:
2009-07-24T16:22:23+02:00 (15 years ago)
Author:
ctlod
Message:

ensure the restartability of the 2nd order advection scheme,see ticket: 489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/ZDF/zdftke.F90

    r1533 r1537  
    1414   !!            8.1  !  1999-01  (E. Stretta) new option for the mixing length 
    1515   !!  NEMO      1.0  !  2002-06  (G. Madec) add tke_init routine 
    16    !!             -   !  2002-08  (G. Madec)  rn_cri and Free form, F90 
    1716   !!             -   !  2004-10  (C. Ethe )  1D configuration 
    1817   !!            2.0  !  2006-07  (S. Masson)  distributed restart using iom 
     
    6463#endif 
    6564 
    66 !!gm  - variables to be suppressed from the namelist: 
    67    LOGICAL  ::   ln_rstke = .FALSE.         ! =T restart with tke from a run without tke 
    68    INTEGER  ::   nn_itke  = 50              ! number of restart iterative loops 
    69    INTEGER  ::   nn_ave   =  1              ! horizontal average or not on avt, avmu, avmv (=0/1) 
    70    REAL(wp) ::   rn_cri   = 2._wp / 9._wp   ! critic Richardson number 
    71    REAL(wp) ::   rn_efave = 1._wp           ! coefficient for ave : ave=rn_efave*avm 
    72 !!gm end 
    73  
    74 !!gm  - variables to be added in the namelist (with a larger default value) 
    75    REAL(wp) ::   rn_bshear = 1.e-20   ! backgrounf shear (>0) 
    76 !!gm 
    77  
    78    !                                       !!! ** Namelist  namtke  ** 
     65   !                                       !!! ** Namelist  nam_tke  ** 
    7966   LOGICAL  ::   ln_mxl0  = .FALSE.         ! mixing length scale surface value as function of wind stress or not 
    8067   INTEGER  ::   nn_mxl   =  2              ! type of mixing length (=0/1/2/3) 
    81 !!gm to be change: the ref value of lmin0 and lmin 
    8268   REAL(wp) ::   rn_lmin0 = 0.4_wp          ! surface  min value of mixing length   [m] 
    8369   REAL(wp) ::   rn_lmin  = 0.1_wp          ! interior min value of mixing length   [m] 
    8470   INTEGER  ::   nn_pdl   =  1              ! Prandtl number or not (ratio avt/avm) (=0/1) 
    85    INTEGER  ::   nn_avb   =  0              ! constant or profile background on avt (=0/1) 
    8671   REAL(wp) ::   rn_ediff = 0.1_wp          ! coefficient for avt: avt=rn_ediff*mxl*sqrt(e) 
    8772   REAL(wp) ::   rn_ediss = 0.7_wp          ! coefficient of the Kolmogoroff dissipation  
     
    8974   REAL(wp) ::   rn_emin  = 0.7071e-6_wp    ! minimum value of tke           [m2/s2] 
    9075   REAL(wp) ::   rn_emin0 = 1.e-4_wp        ! surface minimum value of tke   [m2/s2] 
    91    INTEGER  ::   nn_havtb = 1               ! horizontal shape or not for avtb (=0/1) 
     76   REAL(wp) ::   rn_bshear= 1.e-20          ! background shear (>0) 
    9277   INTEGER  ::   nn_etau  = 0               ! type of depth penetration of surface tke (=0/1/2) 
    9378   INTEGER  ::   nn_htau  = 0               ! type of tke profile of penetration (=0/1/2) 
     
    9984 
    10085   REAL(wp), DIMENSION(jpi,jpj)     ::   htau      ! depth of tke penetration (nn_htau) 
    101    REAL(wp), DIMENSION(jpi,jpj)     ::   avtb_2d   ! set in tke_init, for other modif than ice 
    10286   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   en        ! now turbulent kinetic energy   [m2/s2] 
    10387   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   dissl     ! now mixing lenght of dissipation 
     
    10892   !!---------------------------------------------------------------------- 
    10993   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    110    !! $Id:$ 
     94   !! $Id: zdftke2.F90 1201 2008-09-24 13:24:21Z rblod $ 
    11195   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    11296   !!---------------------------------------------------------------------- 
     
    632616      !!              viscosity when using a tke turbulent closure scheme 
    633617      !! 
    634       !! ** Method  :   Read the namtke namelist and check the parameters 
     618      !! ** Method  :   Read the nam_tke namelist and check the parameters 
    635619      !!              called at the first timestep (nit000) 
    636620      !! 
    637       !! ** input   :   Namlist namtke 
     621      !! ** input   :   Namlist nam_tke 
    638622      !! 
    639623      !! ** Action  :   Increase by 1 the nstop flag is setting problem encounter 
     
    641625      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    642626      !! 
    643       NAMELIST/namtke/ ln_rstke, rn_ediff, rn_ediss, rn_ebb  , rn_efave, rn_emin,   & 
    644          &             rn_emin0, rn_cri  , nn_itke , nn_mxl  , nn_pdl  , nn_ave ,   & 
    645          &             nn_avb  , ln_mxl0 , rn_lmin , rn_lmin0, nn_havtb, nn_etau,   & 
    646          &             nn_htau , rn_efr  , ln_lc  , rn_lc  
    647       !!---------------------------------------------------------------------- 
    648  
    649       REWIND ( numnam )               !* Read Namelist namtke : Turbulente Kinetic Energy 
    650       READ   ( numnam, namtke ) 
     627      NAMELIST/nam_tke/ rn_ediff, rn_ediss , rn_ebb, rn_emin,   & 
     628         &              rn_emin0, rn_bshear, nn_mxl, ln_mxl0,   & 
     629         &              rn_lmin , rn_lmin0 , nn_pdl, nn_etau,   & 
     630         &              nn_htau , rn_efr   , ln_lc , rn_lc  
     631      !!---------------------------------------------------------------------- 
     632 
     633      REWIND ( numnam )               !* Read Namelist nam_tke : Turbulente Kinetic Energy 
     634      READ   ( numnam, nam_tke ) 
    651635       
    652636      ri_cri = 2. / ( 2. + rn_ediss / rn_ediff )      ! resulting critical Richardson number 
     
    656640         WRITE(numout,*) 'zdf_tke : tke turbulent closure scheme - initialisation' 
    657641         WRITE(numout,*) '~~~~~~~~' 
    658          WRITE(numout,*) '          Namelist namtke : set tke mixing parameters' 
    659          WRITE(numout,*) '             restart with tke from no tke              ln_rstke = ', ln_rstke 
     642         WRITE(numout,*) '          Namelist nam_tke : set tke mixing parameters' 
    660643         WRITE(numout,*) '             coef. to compute avt                      rn_ediff = ', rn_ediff 
    661644         WRITE(numout,*) '             Kolmogoroff dissipation coef.             rn_ediss = ', rn_ediss 
     
    663646         WRITE(numout,*) '             minimum value of tke                      rn_emin  = ', rn_emin 
    664647         WRITE(numout,*) '             surface minimum value of tke              rn_emin0 = ', rn_emin0 
     648         WRITE(numout,*) '             background shear (>0)                     rn_bshear= ', rn_bshear 
    665649         WRITE(numout,*) '             mixing length type                        nn_mxl   = ', nn_mxl 
    666650         WRITE(numout,*) '             prandl number flag                        nn_pdl   = ', nn_pdl 
    667          WRITE(numout,*) '             constant background or profile            nn_avb   = ', nn_avb 
    668651         WRITE(numout,*) '             surface mixing length = F(stress) or not  ln_mxl0  = ', ln_mxl0 
    669652         WRITE(numout,*) '             surface  mixing length minimum value      rn_lmin0 = ', rn_lmin0 
    670653         WRITE(numout,*) '             interior mixing length minimum value      rn_lmin0 = ', rn_lmin0 
    671          WRITE(numout,*) '             horizontal variation for avtb             nn_havtb = ', nn_havtb 
    672654         WRITE(numout,*) '             test param. to add tke induced by wind    nn_etau  = ', nn_etau 
    673655         WRITE(numout,*) '             flag for computation of exp. tke profile  nn_htau  = ', nn_htau 
     
    686668 
    687669      IF( nn_etau == 2  )   CALL zdf_mxl( nit000 )      ! Initialization of nmln  
    688  
    689       !                               !* Background eddy viscosity and diffusivity profil 
    690       IF( nn_avb == 0 ) THEN                ! Define avmb, avtb from namelist parameter 
    691          avmb(:) = avm0 
    692          avtb(:) = avt0 
    693       ELSE                                  ! Background profile of avt (fit a theoretical/observational profile (Krauss 1990)  
    694          avmb(:) = avm0 
    695          avtb(:) = avt0 + ( 3.0e-4 - 2 * avt0 ) * 1.0e-4 * gdepw_0(:)   ! m2/s 
    696          IF(ln_sco .AND. lwp)   CALL ctl_warn( '          avtb profile not valid in sco' ) 
    697       ENDIF 
    698       ! 
    699       !                                     ! 2D shape of the avtb 
    700       avtb_2d(:,:) = 1.e0                        ! uniform  
    701       ! 
    702       IF( nn_havtb == 1 ) THEN                   ! decrease avtb in the equatorial band 
    703            !  -15S -5S : linear decrease from avt0 to avt0/10. 
    704            !  -5S  +5N : cst value avt0/10. 
    705            !   5N  15N : linear increase from avt0/10, to avt0 
    706            WHERE(-15. <= gphit .AND. gphit < -5 )   avtb_2d = (1.  - 0.09 * (gphit + 15.)) 
    707            WHERE( -5. <= gphit .AND. gphit <  5 )   avtb_2d =  0.1 
    708            WHERE(  5. <= gphit .AND. gphit < 15 )   avtb_2d = (0.1 + 0.09 * (gphit -  5.)) 
    709       ENDIF 
    710670 
    711671      !                               !* depth of penetration of surface tke 
     
    751711     !! ** Method  :   use of IOM library 
    752712     !!                if the restart does not contain TKE, en is either  
    753      !!                set to rn_emin or recomputed (nn_itke/=0) 
     713     !!                set to rn_emin or recomputed  
    754714     !!---------------------------------------------------------------------- 
    755715     INTEGER         , INTENT(in) ::   kt         ! ocean time-step 
Note: See TracChangeset for help on using the changeset viewer.