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 9814 for NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/USR/usrdef_zgr.F90 – NEMO

Ignore:
Timestamp:
2018-06-20T15:41:08+02:00 (6 years ago)
Author:
smasson
Message:

dev_r9759_HPC09_ESIWACE: get more informations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/USR/usrdef_zgr.F90

    r9598 r9814  
    33   !!                       ***  MODULE  usrdef_zgr  *** 
    44   !! 
    5    !!                       ===  GYRE configuration  === 
     5   !!                      ===  BENCH configuration  === 
    66   !! 
    77   !! User defined : vertical coordinate system of a user configuration 
    88   !!====================================================================== 
    9    !! History :  4.0  ! 2016-06  (G. Madec)  Original code 
     9   !! History :  4.0  !  
    1010   !!---------------------------------------------------------------------- 
    1111 
     
    1818   USE oce            ! ocean variables 
    1919   USE dom_oce        ! ocean domain 
     20   USE phycst         ! physical constants 
    2021   USE depth_e3       ! depth <=> e3 
    2122   ! 
     
    2930   PUBLIC   usr_def_zgr        ! called by domzgr.F90 
    3031 
    31    !! * Substitutions 
     32  !! * Substitutions 
    3233#  include "vectopt_loop_substitute.h90" 
    3334   !!---------------------------------------------------------------------- 
    34    !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    35    !! $Id:$ 
    36    !! Software governed by the CeCILL licence     (./LICENSE) 
     35   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
     36   !! $Id$ 
     37   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3738   !!---------------------------------------------------------------------- 
    3839CONTAINS              
     
    6566      ! 
    6667      IF(lwp) WRITE(numout,*) 
    67       IF(lwp) WRITE(numout,*) 'usr_def_zgr : GYRE configuration (z-coordinate closed flat box ocean without cavities)' 
     68      IF(lwp) WRITE(numout,*) 'usr_def_zgr : BENCH configuration (z-coordinate closed flat box ocean)' 
    6869      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    6970      ! 
     
    7172      ! type of vertical coordinate 
    7273      ! --------------------------- 
    73       ld_zco    = .TRUE.         ! GYRE case:  z-coordinate without ocean cavities 
     74      ld_zco    = .TRUE.         ! BENCH case:  z-coordinate without ocean cavities 
    7475      ld_zps    = .FALSE. 
    7576      ld_sco    = .FALSE. 
     
    126127      ! 
    127128      INTEGER  ::   jk       ! dummy loop indices 
    128       REAL(wp) ::   zt, zw   ! local scalars 
    129       REAL(wp) ::   zsur, za0, za1, zkth, zacr   ! Values for the Madec & Imbard (1996) function   
    130       !!---------------------------------------------------------------------- 
    131       ! 
    132       ! Set parameters of z(k) function 
    133       ! ------------------------------- 
    134       zsur = -2033.194295283385_wp        
    135       za0  =   155.8325369664153_wp  
    136       za1  =   146.3615918601890_wp 
    137       zkth =    17.28520372419791_wp    
    138       zacr =     5.0_wp        
     129      REAL(wp) ::   zd       ! local scalar 
     130      !!---------------------------------------------------------------------- 
     131      ! 
     132      zd = 5000./FLOAT(jpkm1) 
    139133      ! 
    140134      IF(lwp) THEN            ! Parameter print 
     
    142136         WRITE(numout,*) '    zgr_z   : Reference vertical z-coordinates ' 
    143137         WRITE(numout,*) '    ~~~~~~~' 
    144          WRITE(numout,*) '       GYRE case : MI96 function with the following coefficients :' 
    145          WRITE(numout,*) '                 zsur = ', zsur 
    146          WRITE(numout,*) '                 za0  = ', za0 
    147          WRITE(numout,*) '                 za1  = ', za1 
    148          WRITE(numout,*) '                 zkth = ', zkth 
    149          WRITE(numout,*) '                 zacr = ', zacr 
     138         WRITE(numout,*) '       BENCH case : uniform vertical grid :' 
     139         WRITE(numout,*) '                     with thickness = ', zd 
    150140      ENDIF 
    151141 
     
    154144      ! ------------------------- 
    155145      ! 
    156       DO jk = 1, jpk          ! depth at T and W-points 
    157          zw = REAL( jk , wp ) 
    158          zt = REAL( jk , wp ) + 0.5_wp 
    159          pdepw_1d(jk) = ( zsur + za0 * zw + za1 * zacr *  LOG( COSH( (zw-zkth) / zacr ) )  ) 
    160          pdept_1d(jk) = ( zsur + za0 * zt + za1 * zacr *  LOG( COSH( (zt-zkth) / zacr ) )  ) 
     146      pdepw_1d(1) = 0._wp 
     147      pdept_1d(1) = 0.5_wp * zd 
     148      !  
     149      DO jk = 2, jpk          ! depth at T and W-points 
     150         pdepw_1d(jk) = pdepw_1d(jk-1) + zd  
     151         pdept_1d(jk) = pdept_1d(jk-1) + zd  
    161152      END DO 
    162153      ! 
     
    183174      !! ** Purpose :   set the masked top and bottom ocean t-levels 
    184175      !! 
    185       !! ** Method  :   GYRE case = closed flat box ocean without ocean cavities 
     176      !! ** Method  :   BENCH case = closed flat box ocean without ocean cavities 
    186177      !!                   k_top = 1     except along north, south, east and west boundaries 
    187178      !!                   k_bot = jpk-1 except along north, south, east and west boundaries 
     
    193184      ! 
    194185      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D local workspace 
     186      REAL(wp)                     ::   zmaxlam, zscl 
    195187      !!---------------------------------------------------------------------- 
    196188      ! 
     
    198190      IF(lwp) WRITE(numout,*) '    zgr_top_bot : defines the top and bottom wet ocean levels.' 
    199191      IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~' 
    200       IF(lwp) WRITE(numout,*) '       GYRE case : closed flat box ocean without ocean cavities' 
     192      IF(lwp) WRITE(numout,*) '       BENCH case : closed flat box ocean without ocean cavities' 
    201193      ! 
    202194      z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom 
    203195      ! 
    204       CALL lbc_lnk( z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     196      CALL lbc_lnk("usrdef_zgr",z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
    205197      ! 
    206198      k_bot(:,:) = INT( z2d(:,:) )           ! =jpkm1 over the ocean point, =0 elsewhere 
Note: See TracChangeset for help on using the changeset viewer.