- Timestamp:
- 2018-06-20T15:41:08+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/USR/usrdef_zgr.F90
r9598 r9814 3 3 !! *** MODULE usrdef_zgr *** 4 4 !! 5 !! === GYREconfiguration ===5 !! === BENCH configuration === 6 6 !! 7 7 !! User defined : vertical coordinate system of a user configuration 8 8 !!====================================================================== 9 !! History : 4.0 ! 2016-06 (G. Madec) Original code9 !! History : 4.0 ! 10 10 !!---------------------------------------------------------------------- 11 11 … … 18 18 USE oce ! ocean variables 19 19 USE dom_oce ! ocean domain 20 USE phycst ! physical constants 20 21 USE depth_e3 ! depth <=> e3 21 22 ! … … 29 30 PUBLIC usr_def_zgr ! called by domzgr.F90 30 31 31 32 !! * Substitutions 32 33 # include "vectopt_loop_substitute.h90" 33 34 !!---------------------------------------------------------------------- 34 !! NEMO/O CE 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) 37 38 !!---------------------------------------------------------------------- 38 39 CONTAINS … … 65 66 ! 66 67 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)' 68 69 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 69 70 ! … … 71 72 ! type of vertical coordinate 72 73 ! --------------------------- 73 ld_zco = .TRUE. ! GYREcase: z-coordinate without ocean cavities74 ld_zco = .TRUE. ! BENCH case: z-coordinate without ocean cavities 74 75 ld_zps = .FALSE. 75 76 ld_sco = .FALSE. … … 126 127 ! 127 128 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) 139 133 ! 140 134 IF(lwp) THEN ! Parameter print … … 142 136 WRITE(numout,*) ' zgr_z : Reference vertical z-coordinates ' 143 137 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 150 140 ENDIF 151 141 … … 154 144 ! ------------------------- 155 145 ! 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 161 152 END DO 162 153 ! … … 183 174 !! ** Purpose : set the masked top and bottom ocean t-levels 184 175 !! 185 !! ** Method : GYREcase = closed flat box ocean without ocean cavities176 !! ** Method : BENCH case = closed flat box ocean without ocean cavities 186 177 !! k_top = 1 except along north, south, east and west boundaries 187 178 !! k_bot = jpk-1 except along north, south, east and west boundaries … … 193 184 ! 194 185 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D local workspace 186 REAL(wp) :: zmaxlam, zscl 195 187 !!---------------------------------------------------------------------- 196 188 ! … … 198 190 IF(lwp) WRITE(numout,*) ' zgr_top_bot : defines the top and bottom wet ocean levels.' 199 191 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~' 200 IF(lwp) WRITE(numout,*) ' GYREcase : closed flat box ocean without ocean cavities'192 IF(lwp) WRITE(numout,*) ' BENCH case : closed flat box ocean without ocean cavities' 201 193 ! 202 194 z2d(:,:) = REAL( jpkm1 , wp ) ! flat bottom 203 195 ! 204 CALL lbc_lnk( 196 CALL lbc_lnk("usrdef_zgr",z2d, 'T', 1. ) ! set surrounding land to zero (here jperio=0 ==>> closed) 205 197 ! 206 198 k_bot(:,:) = INT( z2d(:,:) ) ! =jpkm1 over the ocean point, =0 elsewhere
Note: See TracChangeset
for help on using the changeset viewer.