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 6914 – NEMO

Changeset 6914


Ignore:
Timestamp:
2016-09-06T13:27:38+02:00 (8 years ago)
Author:
gm
Message:

#1692 - branch SIMPLIF_2_usrdef: final adjustment of OVERFLOW and LOCK-ECHANGE configuration

Location:
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/EXP00/namelist_cfg

    r6906 r6914  
    22!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref 
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     4! 
    45!----------------------------------------------------------------------- 
    56&namusr_def    !   LOCK_EXCHANGE user defined namelist 
    67!----------------------------------------------------------------------- 
    7    ln_zco      =  .true.   ! z-coordinate flag 
    88   rn_dx       =    500.   ! horizontal resolution in meters 
    99   rn_dz       =      1.   ! vertical   resolution in meters 
    1010/ 
     11! 
    1112!----------------------------------------------------------------------- 
    1213&namrun        !   parameters of the run 
    1314!----------------------------------------------------------------------- 
    1415   nn_no       =       0   !  job number (no more used...) 
    15    cn_exp      =   "LOCK-FCT2-flux-ubs-ens"  !  experience name 
     16   cn_exp      =   "LOCK_FCT2_flux_ubs"  !  experience name 
    1617   nn_it000    =       1   !  first time step 
    17    nn_itend    =   12240   ! for 34h of simulation    
     18   nn_itend    =   61200   ! for 17h of simulation  (=61200 time-step) 
    1819   nn_istate   =       0   !  output the initial state (1) or not (0) 
    19    nn_stock    =   12240   !  frequency of creation of a restart file (modulo referenced to 1) 
    20    nn_write    =   12240   !  frequency of write in the output file   (modulo referenced to nn_it000) 
     20   nn_stock    =   61200   !  frequency of creation of a restart file (modulo referenced to 1) 
     21   nn_write    =   61200   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    2122/ 
    2223!----------------------------------------------------------------------- 
     
    2728   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
    2829   ! 
    29    cp_cfg      = "lock" !  name of the configuration 
     30   cp_cfg      = "lock"    !  name of the configuration 
    3031   jp_cfg      =      0    !  resolution of the configuration 
    3132   ln_use_jattr = .false.  !  use (T) the file attribute: open_ocean_jstart, if present 
     
    8182/ 
    8283!----------------------------------------------------------------------- 
    83 &nambbl        !   bottom boundary layer scheme 
     84&nambbl        !   bottom boundary layer scheme                         ("key_trabbl") 
    8485!----------------------------------------------------------------------- 
    8586/ 
     
    124125!----------------------------------------------------------------------- 
    125126&namtra_ldf    !   lateral diffusion scheme for tracers 
    126 !---------------------------------------------------------------------------------- 
    127    !                       !  Operator type: 
    128    ln_traldf_lap   =  .true.   !    laplacian operator 
     127!----------------------------------------------------------------------- 
     128   !                       !  Operator type:    both false = No lateral diffusion 
     129   ln_traldf_lap   =  .false.  !    laplacian operator 
    129130   ln_traldf_blp   =  .false.  !  bilaplacian operator 
    130    !                       !  Direction of action: 
    131    ln_traldf_lev   =  .false.  !  iso-level 
    132    ln_traldf_hor   =  .true.  !  horizontal (geopotential) 
    133    ln_traldf_iso   =  .false.   !  iso-neutral (standard operator) 
    134    ln_traldf_triad =  .false.  !  iso-neutral (triad    operator) 
    135    ! 
    136    !                       !  iso-neutral options:         
    137    ln_traldf_msc   =  .true.   !  Method of Stabilizing Correction (both operators) 
    138    rn_slpmax       =   0.01    !  slope limit                      (both operators) 
    139    ln_triad_iso    =  .false.  !  pure horizontal mixing in ML              (triad only) 
    140    rn_sw_triad     =  1        !  =1 switching triad ; =0 all 4 triads used (triad only) 
    141    ln_botmix_triad =  .false.  !  lateral mixing on bottom                  (triad only) 
    142    ! 
    143    !                       !  Coefficients: 
    144    nn_aht_ijk_t    = 0        !  space/time variation of eddy coef 
    145    !                                !   =-20 (=-30)    read in eddy_diffusivity_2D.nc (..._3D.nc) file 
    146    !                                !   =  0           constant 
    147    !                                !   = 10 F(k)      =ldf_c1d 
    148    !                                !   = 20 F(i,j)    =ldf_c2d 
    149    !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
    150    !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d 
    151    !                                !   = 31 F(i,j,k,t)=F(local velocity) 
    152    rn_aht_0        = 0.    !  lateral eddy diffusivity   (lap. operator) [m2/s] 
    153    rn_bht_0        = 0.    !  lateral eddy diffusivity (bilap. operator) [m4/s] 
    154 / 
    155 !---------------------------------------------------------------------------------- 
    156 &namtra_ldfeiv !   eddy induced velocity param. 
    157 !---------------------------------------------------------------------------------- 
    158    ln_ldfeiv     =.false.   ! use eddy induced velocity parameterization 
    159    ln_ldfeiv_dia =.false.   ! diagnose eiv stream function and velocities 
    160    rn_aeiv_0     = 0.   ! eddy induced velocity coefficient   [m2/s] 
    161    nn_aei_ijk_t  = 0      ! space/time variation of the eiv coeficient 
    162    !                                !   =-20 (=-30)    read in eddy_induced_velocity_2D.nc (..._3D.nc) file 
    163    !                                !   =  0           constant 
    164    !                                !   = 10 F(k)      =ldf_c1d 
    165    !                                !   = 20 F(i,j)    =ldf_c2d 
    166    !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
    167    !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d 
    168131/ 
    169132!----------------------------------------------------------------------- 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90

    r6906 r6914  
    1010   !!---------------------------------------------------------------------- 
    1111 
    12    !!---------------------------------------------------------------------------------- 
     12   !!---------------------------------------------------------------------- 
    1313   !!   usr_def_hgr    : initialize the horizontal mesh for LOCK_EXCHANGE configuration 
    14    !!---------------------------------------------------------------------------------- 
     14   !!---------------------------------------------------------------------- 
    1515   USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
    1616   USE par_oce         ! ocean space and time domain 
     
    4646      !! 
    4747      !! ** Method  :   set all intent(out) argument to a proper value 
    48       !!                LOCK_EXCHANGE configuration : uniform grid spacing (500m) 
     48      !!                LOCK_EXCHANGE configuration : uniform grid spacing (rn_dx) 
    4949      !!                without Coriolis force (f=0) 
    5050      !! 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_istate.F90

    r6906 r6914  
    3737      !!  
    3838      !! ** Purpose :   Initialization of the dynamics and tracers 
    39       !!                Here LOCK_EXCHANGE configuration example  
     39      !!                Here LOCK_EXCHANGE configuration  
    4040      !! 
    4141      !! ** Method  : - set temprature field 
     
    5959      IF(lwp) WRITE(numout,*) '                 (i.e. a temperature difference of 25 degrees with rn_a0 = 0.2' 
    6060      ! 
    61       !  rn_a0 =  2.e-1   !  thermal expension coefficient (nn_eos= 1) 
     61      !  rn_a0 =  0.2   !  thermal expension coefficient (nn_eos= 1) 
    6262      !  rho = rau0 - rn_a0 * (T-10)  
    6363      !  delta_T = 25 degrees  ==>>  delta_rho = 25 * rn_a0 = 5 kg/m3 
     
    6868      ! 
    6969      !                          ! T & S profiles 
    70       zdam = 32.                      ! in kilometers 
     70      zdam = 32.                      ! density front position in kilometers 
    7171      pts(:,:,:,jp_tem) = 30._wp * ptmask(:,:,:) 
    7272      DO jk = 1, jpkm1 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r6906 r6914  
    1515   !!---------------------------------------------------------------------- 
    1616   USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    17    USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate       !!gm NOT SURE ! 
    1817   USE par_oce        ! ocean space and time domain 
    1918   USE phycst         ! physical constants 
     
    5756      INTEGER ::   ios, ii   ! Local integer 
    5857      !! 
    59       NAMELIST/namusr_def/ ln_zco, ln_zps, ln_sco, rn_dx, rn_dz 
     58      NAMELIST/namusr_def/ rn_dx, rn_dz 
    6059      !!---------------------------------------------------------------------- 
    6160      ! 
     
    7877      WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1 
    7978      WRITE(ldtxt(ii),*) '   Namelist namusr_def : LOCK_EXCHANGE test case'                             ;   ii = ii + 1 
    80       WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                         ;   ii = ii + 1 
    81       WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco = ', ln_zco             ;   ii = ii + 1 
    82       WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps = ', ln_sco             ;   ii = ii + 1 
    83       WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco = ', ln_sco             ;   ii = ii + 1 
    8479      WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters'   ;   ii = ii + 1 
    8580      WRITE(ldtxt(ii),*) '      vertical   resolution                    rn_dz  = ', rn_dz, ' meters'   ;   ii = ii + 1 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_sbc.F90

    r6901 r6914  
    66   !! 
    77   !! User defined :    user defined momentum, heat and freshwater forcings   
    8    !!===================================================================== 
     8   !!====================================================================== 
    99   !! History :  4.0   ! 2016-03  (S. Flavoni, G. Madec)  user defined interface 
    1010   !!---------------------------------------------------------------------- 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90

    r6906 r6914  
    22   !!============================================================================== 
    33   !!                       ***  MODULE usrdef_zgr  *** 
     4   !! 
     5   !!                   ===      LOCK_EXCHANGE case      === 
     6   !! 
    47   !! Ocean domain : user defined vertical coordinate system  
    5    !! 
    6    !!                       ===      LOCK_EXCHANGE case      === 
    7    !! 
    88   !!============================================================================== 
    9    !! History :  4.0  ! 2016-08  (G. Madec)  Original code 
     9   !! History :  4.0  ! 2016-08  (G. Madec, S. Flavoni)  Original code 
    1010   !!---------------------------------------------------------------------- 
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   usr_def_zgr      : user defined vertical coordinate system (required) 
    14    !!       zgr_z1d      : reference 1D z-coordinate  
    15    !!       zgr_zps      : 3D vertical coordinate in z-partial cell coordinate 
     13   !!   usr_def_zgr   : user defined vertical coordinate system (required) 
     14   !!       zgr_z1d   : reference 1D z-coordinate  
    1615   !!--------------------------------------------------------------------- 
    17    USE oce               ! ocean variables 
    18    USE dom_oce  ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
    19    USE dom_oce  ,  ONLY: nimpp, njmpp             ! ocean space and time domain 
    20    USE dom_oce  ,  ONLY: glamt                    ! ocean space and time domain 
    21    USE usrdef_nam        ! User defined : namelist variables 
     16   USE oce            ! ocean variables 
     17   USE dom_oce ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
     18   USE usrdef_nam     ! User defined : namelist variables 
    2219   ! 
    23    USE in_out_manager    ! I/O manager 
    24    USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    25    USE lib_mpp           ! distributed memory computing library 
    26    USE wrk_nemo          ! Memory allocation 
    27    USE timing            ! Timing 
     20   USE in_out_manager ! I/O manager 
     21   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     22   USE lib_mpp        ! distributed memory computing library 
     23   USE wrk_nemo       ! Memory allocation 
     24   USE timing         ! Timing 
    2825 
    2926   IMPLICIT NONE 
     
    6259      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top, k_bot                ! first & last ocean level 
    6360      ! 
    64       INTEGER  ::   ji, jj, jk        ! dummy indices 
    65       INTEGER  ::   ik                ! local integers 
    66       REAL(wp) ::   zfact, z1_jpkm1   ! local scalar 
    67       REAL(wp) ::   ze3min            ! local scalar 
    68       REAL(wp), DIMENSION(jpi,jpj) ::   zht, zhu, z2d   ! 2D workspace 
     61      INTEGER  ::   jk   ! dummy indices 
     62      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
    6963      !!---------------------------------------------------------------------- 
    7064      ! 
     
    7771      ! --------------------------- 
    7872      ! set in usrdef_nam.F90 by reading the namusr_def namelist only ln_zco 
     73      ln_zco    = .TRUE.       ! z-partial-step coordinate 
    7974      ln_zps    = .FALSE.      ! z-partial-step coordinate 
    8075      ln_sco    = .FALSE.      ! s-coordinate 
     
    8782      !                       !==  UNmasked meter bathymetry  ==! 
    8883      ! 
    89       ! flat bassin (20m deep and 64000m wide) 
     84      ! flat bassin (20m deep and 64000m wide, set through the jpk and jpi (see userdef_nam.F90)) 
    9085      CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
    9186      ! 
     
    9691      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
    9792      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    98       CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin  
    99       k_top(:,:) = z2d(:,:) 
     93      CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     94      k_top(:,:) = NINT( z2d(:,:) ) 
    10095      ! 
    10196      !                               
    102       IF ( ln_zco ) THEN      !==  z-coordinate  ==!   (step-like topography) 
    103          ! 
    104          !                                !* bottom ocean compute from the depth of grid-points 
    105          k_bot(:,:) = jpkm1 * k_top(:,:)     ! here use k_top as a land mask 
    106          !                                !* horizontally uniform coordinate (reference z-co everywhere) 
    107          DO jk = 1, jpk 
    108             pdept(:,:,jk) = pdept_1d(jk) 
    109             pdepw(:,:,jk) = pdepw_1d(jk) 
    110             pe3t (:,:,jk) = pe3t_1d (jk) 
    111             pe3u (:,:,jk) = pe3t_1d (jk) 
    112             pe3v (:,:,jk) = pe3t_1d (jk) 
    113             pe3f (:,:,jk) = pe3t_1d (jk) 
    114             pe3w (:,:,jk) = pe3w_1d (jk) 
    115             pe3uw(:,:,jk) = pe3w_1d (jk) 
    116             pe3vw(:,:,jk) = pe3w_1d (jk) 
    117          END DO 
    118       ENDIF 
     97      !                       !==  z-coordinate  ==!   (step-like topography) 
    11998      ! 
     99      !                                !* bottom ocean compute from the depth of grid-points 
     100      k_bot(:,:) = jpkm1 * k_top(:,:)     ! here use k_top as a land mask 
     101      !                                !* horizontally uniform coordinate (reference z-co everywhere) 
     102      DO jk = 1, jpk 
     103         pdept(:,:,jk) = pdept_1d(jk) 
     104         pdepw(:,:,jk) = pdepw_1d(jk) 
     105         pe3t (:,:,jk) = pe3t_1d (jk) 
     106         pe3u (:,:,jk) = pe3t_1d (jk) 
     107         pe3v (:,:,jk) = pe3t_1d (jk) 
     108         pe3f (:,:,jk) = pe3t_1d (jk) 
     109         pe3w (:,:,jk) = pe3w_1d (jk) 
     110         pe3uw(:,:,jk) = pe3w_1d (jk) 
     111         pe3vw(:,:,jk) = pe3w_1d (jk) 
     112      END DO 
    120113      ! 
    121114   END SUBROUTINE usr_def_zgr 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/EXP00/namelist_cfg

    r6906 r6914  
    22!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref 
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     4! 
    45!----------------------------------------------------------------------- 
    56&namusr_def    !   User defined :   OVERFLOW configuration  
     
    78   !                       !  type of vertical coordinate 
    89   ln_zco      = .false.      ! z-coordinate 
    9    ln_zps      = .false.      ! z-partial-step coordinate 
    10    ln_sco      = .true.       ! s-coordinate    
    11    rn_dx       = 1000.     !  horizontal resolution   [meters] 
    12    rn_dz       =   20.     !  vertical   resolution   [meters] 
     10   ln_zps      = .true.       ! z-partial-step coordinate 
     11   ln_sco      = .false.      ! s-coordinate    
     12   rn_dx       =   1000.   !  horizontal resolution   [meters] 
     13   rn_dz       =     20.   !  vertical   resolution   [meters] 
    1314/ 
    1415! 
     
    1718!----------------------------------------------------------------------- 
    1819   nn_no       =       0   !  job number (no more used...) 
    19    cn_exp      =   "overfl-FCT2-flux-ubs-ens"  !  experience name 
     20   cn_exp      =   "OVF_FCT2_flux_ubs"  !  experience name 
    2021   nn_it000    =       1   !  first time step 
    21    nn_itend    =   12240   ! for 34h of simulation  (=12240)  
    22    nn_istate   =       1   !  output the initial state (1) or not (0) 
    23    nn_stock    =   12240   !  frequency of creation of a restart file (modulo referenced to 1) 
    24    nn_write    =   12240   !  frequency of write in the output file   (modulo referenced to nn_it000) 
     22   nn_itend    =    6120   ! here 17h of simulation  (=6120 time-step)  
     23   nn_istate   =       0   !  output the initial state (1) or not (0) 
     24   nn_stock    =    6120   !  frequency of creation of a restart file (modulo referenced to 1) 
     25   nn_write    =    6120   !  frequency of write in the output file   (modulo referenced to nn_it000) 
    2526/ 
    2627!----------------------------------------------------------------------- 
     
    8586/ 
    8687!----------------------------------------------------------------------- 
    87 &nambbl        !   bottom boundary layer scheme 
     88&nambbl        !   bottom boundary layer scheme                         ("key_trabbl") 
    8889!----------------------------------------------------------------------- 
    8990/ 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90

    r6904 r6914  
    4646      !! 
    4747      !! ** Method  :   set all intent(out) argument to a proper value 
    48       !!                OVERFLOW configuration : uniform grid spcing (1km) 
     48      !!                OVERFLOW configuration : uniform grid spacing (rn_dx) 
    4949      !!                without Coriolis force (f=0) 
    5050      !! 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_istate.F90

    r6906 r6914  
    3737      !!  
    3838      !! ** Purpose :   Initialization of the dynamics and tracers 
    39       !!                Here OVERFLOW configuration example  
     39      !!                Here OVERFLOW configuration  
    4040      !! 
    4141      !! ** Method  : - set temprature field 
     
    5959      IF(lwp) WRITE(numout,*) '                 (i.e. a temperature difference of 10 degrees with rn_a0 = 0.2' 
    6060      ! 
    61       !  rn_a0 =  2.e-1   !  thermal expension coefficient (nn_eos= 1) 
     61      !  rn_a0 =  0.2   !  thermal expension coefficient (nn_eos= 1) 
    6262      !  rho = rau0 - rn_a0 * (T-10)  
    6363      !  delta_T = 10 degrees  ==>>  delta_rho = 10 * rn_a0 = 2 kg/m3 
     
    6868      ! 
    6969      !                          ! T & S profiles 
    70       zdam = 20.                      ! in kilometers 
     70      zdam = 20.                      ! density front position in kilometers 
    7171      pts(:,:,:,jp_tem) = 20._wp * ptmask(:,:,:) 
    7272      DO jk = 1, jpkm1 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_nam.F90

    r6906 r6914  
    1515   !!---------------------------------------------------------------------- 
    1616   USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain 
    17    USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate       !!gm NOT SURE ! 
     17   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate 
    1818   USE par_oce        ! ocean space and time domain 
    1919   USE phycst         ! physical constants 
     
    7171      kpi = INT( 200.e3 / rn_dx ) + 2 
    7272      kpj = 3 
    73       kpk = INT(   2.e3 / rn_dz ) + 1 
     73      kpk = INT(  2000. / rn_dz ) + 1 
    7474      ! 
    7575      !                             ! control print 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_sbc.F90

    r6900 r6914  
    66   !! 
    77   !! User defined :    user defined momentum, heat and freshwater forcings   
    8    !!===================================================================== 
     8   !!====================================================================== 
    99   !! History :  4.0   ! 2016-03  (S. Flavoni, G. Madec)  user defined interface 
    1010   !!---------------------------------------------------------------------- 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_zgr.F90

    r6906 r6914  
    22   !!============================================================================== 
    33   !!                       ***  MODULE usrdef_zgr  *** 
     4   !! 
     5   !!                     ===      OVERFLOW case      === 
     6   !! 
    47   !! Ocean domain : user defined vertical coordinate system  
    5    !! 
    6    !!                       ===      OVERFLOW case      === 
    7    !! 
    88   !!============================================================================== 
    9    !! History :  4.0  ! 2016-08  (G. Madec)  Original code 
    10    !!---------------------------------------------------------------------- 
    11  
    12    !!---------------------------------------------------------------------- 
    13    !!   usr_def_zgr      : user defined vertical coordinate system (required) 
    14    !!       zgr_z1d      : reference 1D z-coordinate  
    15    !!       zgr_zps      : 3D vertical coordinate in z-partial cell coordinate 
     9   !! History :  4.0  ! 2016-08  (G. Madec, S. Flavoni)  Original code 
     10   !!---------------------------------------------------------------------- 
     11 
     12   !!---------------------------------------------------------------------- 
     13   !!   usr_def_zgr   : user defined vertical coordinate system (required) 
     14   !!       zgr_z1d   : reference 1D z-coordinate  
    1615   !!--------------------------------------------------------------------- 
    17    USE oce               ! ocean variables 
    18    USE dom_oce  ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
    19    USE dom_oce  ,  ONLY: nimpp, njmpp             ! ocean space and time domain 
    20    USE dom_oce  ,  ONLY: glamt                    ! ocean space and time domain 
    21    USE usrdef_nam        ! User defined : namelist variables 
     16   USE oce            ! ocean variables 
     17   USE dom_oce ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
     18   USE dom_oce ,  ONLY: mi0, mi1, nimpp, njmpp   ! ocean space and time domain 
     19   USE dom_oce ,  ONLY: glamt                    ! ocean space and time domain 
     20   USE usrdef_nam     ! User defined : namelist variables 
    2221   ! 
    23    USE in_out_manager    ! I/O manager 
    24    USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    25    USE lib_mpp           ! distributed memory computing library 
    26    USE wrk_nemo          ! Memory allocation 
    27    USE timing            ! Timing 
     22   USE in_out_manager ! I/O manager 
     23   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     24   USE lib_mpp        ! distributed memory computing library 
     25   USE wrk_nemo       ! Memory allocation 
     26   USE timing         ! Timing 
    2827 
    2928   IMPLICIT NONE 
     
    7069      ! 
    7170      IF(lwp) WRITE(numout,*) 
    72       IF(lwp) WRITE(numout,*) 'usr_def_zgr : OVERFLOW configuration (z-coordinate closed box ocean without cavities)' 
     71      IF(lwp) WRITE(numout,*) 'usr_def_zgr : OVERFLOW configuration (z(ps)- or s-coordinate closed box ocean without cavities)' 
    7372      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    7473      ! 
     
    8685      ! 
    8786      ! western continental shelf (500m deep) and eastern deep ocean (2000m deep) 
     87      ! (set through the jpk and jpi (see userdef_nam.F90)) 
    8888      ! with a hyperbolic tangent transition centered at 40km 
    8989      ! NB: here glamt is in kilometers 
     
    9191      zht(:,:) = + (  500. + 0.5 * 1500. * ( 1.0 + tanh( (glamt(:,:) - 40.) / 7. ) )  ) 
    9292      ! 
    93       ! at u-point: recompute from glamu (see usrdef_hgr.F90) to avoid the masking when using lbc_lnk 
    94       zfact = rn_dx * 1.e-3         ! conversion in km 
    95       DO ji = 1, jpi 
    96          zhu(ji,:) = + (  500. + 0.5 * 1500. * ( 1.0 + tanh( ( zfact * REAL( ji-1 + nimpp-1 , wp ) - 40.) / 7. ) )  ) 
    97       END DO 
    98       ! 
     93      ! at u-point: averaging zht 
     94      DO ji = 1, jpim1 
     95         zhu(ji,:) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) ) 
     96      END DO 
     97      CALL lbc_lnk( zhu, 'U', 1. )     ! boundary condition: this mask the surrouding grid-points 
     98      !                                ! ==>>>  set by hand non-zero value on first/last columns & rows  
     99      DO ji = mi0(1), mi1(1)              ! first row of global domain only 
     100         zhu(ji,2) = zht(1,2) 
     101      END DO 
     102       DO ji = mi0(jpi), mi1(jpi)         ! last  row of global domain only 
     103         zhu(ji,2) = zht(jpi,2) 
     104      END DO 
     105      zhu(:,1) = zhu(:,2) 
     106      zhu(:,3) = zhu(:,2) 
     107      !      
    99108      CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
    100109      ! 
     
    105114      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
    106115      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    107       CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin  
    108       k_top(:,:) = z2d(:,:) 
     116      CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     117      k_top(:,:) = NINT( z2d(:,:) ) 
    109118      ! 
    110119      !                               
     
    162171         k_bot(:,:) = jpkm1 
    163172         DO jk = jpkm1, 1, -1 
    164             WHERE( zht(:,:) <= pdepw_1d(jk) + ze3min )   k_bot(:,:) = jk-1 
     173            WHERE( zht(:,:) < pdepw_1d(jk) + ze3min )   k_bot(:,:) = jk-1 
    165174         END DO 
    166175         ! 
     
    180189            DO ji = 1, jpi 
    181190               ik = k_bot(ji,jj) 
    182                IF( ik /= jpkm1 ) THEN                 ! last level ==> ref 1d z-coordinate 
    183191                  pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) ) 
    184192                  pe3t (ji,jj,ik  ) = pdepw(ji,jj,ik+1) - pdepw(ji,jj,ik) 
    185                   pe3t (ji,jj,ik+1) = pe3t (ji,jj,ik)  
     193                  pe3t (ji,jj,ik+1) = pe3t (ji,jj,ik  )  
    186194                  ! 
    187                   pdept(ji,jj,ik  ) = pdept(ji,jj,ik-1) + pe3t(ji,jj,ik) * 0.5_wp 
    188                   pe3w (ji,jj,ik+1) = pdepw(ji,jj,ik+1) - pdepw(ji,jj,ik) 
    189                ENDIF 
     195                  pdept(ji,jj,ik  ) = pdepw(ji,jj,ik  ) + pe3t (ji,jj,ik  ) * 0.5_wp 
     196                  pdept(ji,jj,ik+1) = pdepw(ji,jj,ik+1) + pe3t (ji,jj,ik+1) * 0.5_wp 
     197                  pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik)              ! = pe3t (ji,jj,ik  ) 
    190198            END DO 
    191199         END DO          
     
    194202         pe3u (:,:,:) = pe3t(:,:,:)          ! HERE OVERFLOW configuration :  
    195203         pe3v (:,:,:) = pe3t(:,:,:)          !    e3 increases with i-index and identical with j-index 
    196          pe3f (:,:,:) = pe3t(:,:,:)          !    so e3 minimum of (i,i+1) points is (i) point (idem in j-direction) 
    197          pe3uw(:,:,:) = pe3w(:,:,:)          !     
     204         pe3f (:,:,:) = pe3t(:,:,:)          !    so e3 minimum of (i,i+1) points is (i) point 
     205         pe3uw(:,:,:) = pe3w(:,:,:)          !    in j-direction e3v=e3t and e3f=e3v 
    198206         pe3vw(:,:,:) = pe3w(:,:,:)          !    ==>>  no need of lbc_lnk calls 
    199207         !       
Note: See TracChangeset for help on using the changeset viewer.