[325] | 1 | MODULE dom_oce |
---|
| 2 | !!---------------------------------------------------------------------- |
---|
| 3 | !! *** MODULE dom_oce *** |
---|
| 4 | !! |
---|
| 5 | !! ** Purpose : Define in memory all the ocean space domain variables |
---|
| 6 | !!---------------------------------------------------------------------- |
---|
[343] | 7 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
[1152] | 8 | !! $Id$ |
---|
[343] | 9 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
[325] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! * Modules used |
---|
| 12 | USE par_oce ! ocean parameters |
---|
| 13 | |
---|
| 14 | IMPLICIT NONE |
---|
| 15 | PUBLIC ! allows the acces to par_oce when dom_oce is used |
---|
| 16 | ! ! exception to coding rules... to be suppressed ??? |
---|
| 17 | |
---|
| 18 | !!---------------------------------------------------------------------- |
---|
| 19 | !! space domain parameters |
---|
| 20 | !! ----------------------- |
---|
| 21 | LOGICAL, PUBLIC :: & !: |
---|
| 22 | lzoom = .FALSE. , & !: zoom flag |
---|
| 23 | lzoom_e = .FALSE. , & !: East zoom type flag |
---|
| 24 | lzoom_w = .FALSE. , & !: West zoom type flag |
---|
| 25 | lzoom_s = .FALSE. , & !: South zoom type flag |
---|
| 26 | lzoom_n = .FALSE. , & !: North zoom type flag |
---|
| 27 | lzoom_arct = .FALSE. , & !: ORCA arctic zoom flag |
---|
| 28 | lzoom_anta = .FALSE. !: ORCA antarctic zoom flag |
---|
| 29 | |
---|
| 30 | INTEGER, PUBLIC :: & !!: namdom : space domain (bathymetry, mesh) |
---|
| 31 | nmsh = 0 !: = 1 create a mesh-mask file |
---|
| 32 | |
---|
| 33 | INTEGER, PUBLIC :: & !: |
---|
| 34 | ! domain parameters linked to mpp |
---|
| 35 | nperio, & !: type of lateral boundary condition |
---|
| 36 | nimpp, njmpp, & !: i- & j-indexes for mpp-subdomain left bottom |
---|
| 37 | nreci, nrecj, & !: overlap region in i and j |
---|
| 38 | nproc, & !: number for local processor |
---|
| 39 | narea, & !: number for local area |
---|
| 40 | nbondi, nbondj, & !: mark of i- and j-direction local boundaries |
---|
| 41 | npolj, & !: north fold mark (0, 3 or 4) |
---|
| 42 | nlci, nlcj, & !: i- & j-dimensions of the local subdomain |
---|
| 43 | nldi, nlei, & !: first and last indoor i- and j-indexes |
---|
| 44 | nldj, nlej, & !: |
---|
| 45 | noea, nowe, & !: index of the local neighboring processors in |
---|
| 46 | noso, nono, & !: east, west, south and north directions |
---|
| 47 | npne, npnw, & !: index of north east and north west processor |
---|
| 48 | npse, npsw, & !: index of south east and south west processor |
---|
| 49 | nbne, nbnw, & !: logical of north east & north west processor |
---|
[361] | 50 | nbse, nbsw, & !: logical of south east & south west processor |
---|
| 51 | nidom |
---|
[325] | 52 | |
---|
| 53 | INTEGER, PUBLIC, DIMENSION(jpi) :: & !: |
---|
| 54 | mig !: local ==> global domain i-indice |
---|
| 55 | INTEGER, PUBLIC, DIMENSION(jpj) :: & !: |
---|
| 56 | mjg !: local ==> global domain j-indice |
---|
| 57 | INTEGER, PUBLIC, DIMENSION( jpidta ) :: & !: !!bug ==> other solution? |
---|
| 58 | mi0, mi1 !: global ==> local domain i-indice |
---|
| 59 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
| 60 | INTEGER, PUBLIC, DIMENSION( jpjdta ) :: & !: |
---|
| 61 | mj0, mj1 !: global ==> local domain j-indice |
---|
| 62 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
| 63 | |
---|
| 64 | INTEGER, PUBLIC, DIMENSION(jpnij) :: & !: |
---|
| 65 | nimppt, njmppt, & !: i-, j-indexes for each processor |
---|
| 66 | ibonit, ibonjt, & !: i-, j- processor neighbour existence |
---|
| 67 | nlcit, nlcjt, & !: dimensions of every subdomain |
---|
| 68 | nldit, nldjt, & !: first, last indoor index for each i-domain |
---|
| 69 | nleit, nlejt !: first, last indoor index for each j-domain |
---|
| 70 | |
---|
| 71 | !!---------------------------------------------------------------------- |
---|
| 72 | !! horizontal curvilinear coordinate and scale factors |
---|
| 73 | !! --------------------------------------------------------------------- |
---|
| 74 | |
---|
| 75 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 76 | glamt, glamu, & !: longitude of t-, u-, v- and f-points (degre) |
---|
| 77 | glamv, glamf, & !: |
---|
| 78 | gphit, gphiu, & !: latitude of t-, u-, v- and f-points (degre) |
---|
| 79 | gphiv, gphif, & !: |
---|
| 80 | e1t, e2t, & !: horizontal scale factors at t-point (m) |
---|
| 81 | e1u, e2u, & !: horizontal scale factors at u-point (m) |
---|
| 82 | e1v, e2v, & !: horizontal scale factors at v-point (m) |
---|
| 83 | ff !: coriolis factor (2.*omega*sin(yphi) ) (s-1) |
---|
| 84 | |
---|
[497] | 85 | |
---|
[325] | 86 | !!---------------------------------------------------------------------- |
---|
| 87 | !! vertical coordinate and scale factors |
---|
| 88 | !! -------------------------------------- |
---|
| 89 | |
---|
[497] | 90 | LOGICAL, PUBLIC :: & !!: namzgr : vertical coordinate |
---|
| 91 | ln_zco = .TRUE. , & !: z-coordinate - full step |
---|
| 92 | ln_zps = .FALSE. , & !: z-coordinate - partial step |
---|
| 93 | ln_sco = .FALSE. !: s-coordinate or hybrid z-s coordinate |
---|
[325] | 94 | |
---|
[497] | 95 | #if defined key_zco |
---|
| 96 | LOGICAL, PUBLIC, PARAMETER :: lk_zco = .TRUE. !: z-coordinate flag (1D arrays) |
---|
| 97 | #else |
---|
| 98 | LOGICAL, PUBLIC, PARAMETER :: lk_zco = .FALSE. !: z-coordinate flag (3D arrays) |
---|
[325] | 99 | |
---|
[497] | 100 | !! All coordinates |
---|
| 101 | !! --------------- |
---|
[325] | 102 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: & !: |
---|
[497] | 103 | gdep3w , & !: depth of T-points (sum of e3w) (m) |
---|
| 104 | gdept , gdepw , & !: analytical depth at T-W points (m) |
---|
| 105 | e3v , e3f , & !: analytical vertical scale factors at V--F |
---|
| 106 | e3t , e3u , & !: T--U points (m) |
---|
| 107 | e3vw , & !: analytical vertical scale factors at VW-- |
---|
| 108 | e3w , e3uw !: W--UW points (m) |
---|
| 109 | #endif |
---|
| 110 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 111 | hur, hvr, & !: inverse of u and v-points ocean depth (1/m) |
---|
| 112 | hu , hv !: depth at u- and v-points (meters) |
---|
[325] | 113 | |
---|
[497] | 114 | !! z-coordinate with full steps (also used in the other cases as reference z-coordinate) |
---|
| 115 | !! =-----------------====------ |
---|
| 116 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
| 117 | gdept_0, gdepw_0, & !: reference depth of t- and w-points (m) |
---|
| 118 | e3t_0 , e3w_0 !: reference vertical scale factors at T- and W-pts (m) |
---|
| 119 | |
---|
| 120 | !! z-coordinate with partial steps |
---|
| 121 | !! =-----------------=======------ |
---|
| 122 | REAL(wp), PUBLIC :: & !!: * namelist namdom * |
---|
| 123 | e3zps_min = 5.0_wp, & !: miminum thickness for partial steps (meters) |
---|
| 124 | e3zps_rat = 0.1_wp !: minimum thickness ration for partial steps |
---|
| 125 | |
---|
[325] | 126 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 127 | hdept, hdepw, e3tp, e3wp !: ??? |
---|
| 128 | |
---|
[497] | 129 | !! s-coordinate and hybrid z-s-coordinate |
---|
| 130 | !! =----------------======--------------- |
---|
[325] | 131 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
[497] | 132 | gsigt, gsigw , & !: model level depth coefficient at t-, w-levels (analytic) |
---|
| 133 | gsi3w , & !: model level depth coefficient at w-level (sum of gsigw) |
---|
[325] | 134 | esigt, esigw !: vertical scale factor coef. at t-, w-levels |
---|
| 135 | |
---|
[497] | 136 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 137 | hbatv , hbatf , & !: ocean depth at the vertical of V--F |
---|
| 138 | hbatt , hbatu , & !: T--U points (m) |
---|
| 139 | scosrf, scobot, & !: ocean surface and bottom topographies (if deviating from coordinate surfaces in HYBRID) |
---|
| 140 | hifv , hiff , & !: interface depth between stretching at V--F |
---|
| 141 | hift , hifu !: and quasi-uniform spacing T--U points (m) |
---|
| 142 | |
---|
[1528] | 143 | #if defined key_vvl |
---|
| 144 | LOGICAL, PUBLIC, PARAMETER :: lk_vvl = .TRUE. !: variable grid flag |
---|
| 145 | #else |
---|
| 146 | LOGICAL, PUBLIC, PARAMETER :: lk_vvl = .FALSE. !: fixed grid flag |
---|
| 147 | #endif |
---|
[497] | 148 | |
---|
[325] | 149 | !!---------------------------------------------------------------------- |
---|
| 150 | !! masks, bathymetry |
---|
| 151 | !! ----------------- |
---|
| 152 | |
---|
| 153 | INTEGER , PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 154 | mbathy !: number of ocean level (=0, 1, ... , jpk-1) |
---|
| 155 | |
---|
| 156 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 157 | tmask_i !: interior domain T-point mask |
---|
| 158 | |
---|
| 159 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: & !: |
---|
| 160 | tmask, umask, & !: land/ocean mask at T-, U-, V- and F-points |
---|
| 161 | vmask, fmask !: |
---|
| 162 | |
---|
| 163 | REAL(wp), PUBLIC, DIMENSION(jpiglo) :: & !: |
---|
| 164 | tpol !: north fold mask (nperio= 3 or 4) |
---|
| 165 | |
---|
| 166 | !!---------------------------------------------------------------------- |
---|
| 167 | !! time domain |
---|
| 168 | !!---------------------------------------------------------------------- |
---|
| 169 | INTEGER, PUBLIC :: & !!: * Namelist * ??? |
---|
| 170 | nacc = 0 , & !: = 0/1 use of the acceleration of convergence technique |
---|
| 171 | neuler !: restart euler forward option (0=Euler) |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | REAL(wp), PUBLIC :: & !!: * Namelist ??? * |
---|
| 175 | rdt = 3600._wp , & !: time step for the dynamics (and tracer if nacc=0) |
---|
| 176 | rdtmin = 3600._wp , & !: minimum time step on tracers |
---|
| 177 | rdtmax = 3600._wp , & !: maximum time step on tracers |
---|
| 178 | rdth = 800._wp , & !: depth variation of tracer step |
---|
| 179 | atfp = 0.1_wp , & !: asselin time filter parameter |
---|
| 180 | atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) |
---|
| 181 | |
---|
| 182 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
| 183 | rdttra !: vertical profile of tracer time step |
---|
| 184 | |
---|
| 185 | !!---------------------------------------------------------------------- |
---|
| 186 | !! cross land advection |
---|
| 187 | !!---------------------------------------------------------------------- |
---|
| 188 | |
---|
| 189 | INTEGER, PUBLIC :: & !!: namelist ??? |
---|
| 190 | n_cla !: flag (0/1) for cross land advection to |
---|
| 191 | ! ! parameterize exchanges through straits |
---|
[1748] | 192 | |
---|
[1716] | 193 | !!---------------------------------------------------------------------- |
---|
| 194 | !! calendar variables |
---|
| 195 | !! --------------------------------------------------------------------- |
---|
| 196 | INTEGER , PUBLIC :: nyear !: current year |
---|
| 197 | INTEGER , PUBLIC :: nmonth !: current month |
---|
| 198 | INTEGER , PUBLIC :: nday !: current day of the month |
---|
| 199 | INTEGER , PUBLIC :: ndastp !: time step date in yyyymmdd format |
---|
| 200 | INTEGER , PUBLIC :: nday_year !: current day counted from jan 1st of the current year |
---|
[1748] | 201 | INTEGER , PUBLIC :: nsec_year !: current time step counted in second since 00h jan 1st of the current year |
---|
| 202 | INTEGER , PUBLIC :: nsec_month !: current time step counted in second since 00h 1st day of the current month |
---|
| 203 | INTEGER , PUBLIC :: nsec_day !: current time step counted in second since 00h of the current day |
---|
[1716] | 204 | REAL(wp), PUBLIC :: fjulday !: julian day |
---|
| 205 | REAL(wp), PUBLIC :: adatrj !: number of elapsed days since the begining of the whole simulation |
---|
| 206 | ! !: (cumulative duration of previous runs that may have used different time-step size) |
---|
[1748] | 207 | INTEGER , PUBLIC, DIMENSION(0: 1) :: nyear_len !: length in days of the previous/current year |
---|
| 208 | INTEGER , PUBLIC, DIMENSION(0:13) :: nmonth_len !: length in days of the months of the current year |
---|
| 209 | INTEGER , PUBLIC, DIMENSION(0:13) :: nmonth_half !: second since Jan 1st 0h of the current year and the half of the months |
---|
| 210 | INTEGER , PUBLIC, DIMENSION(0:13) :: nmonth_end !: second since Jan 1st 0h of the current year and the end of the months |
---|
| 211 | INTEGER , PUBLIC :: nsec1jan000 !: second since Jan 1st 0h of nit000 year and Jan 1st 0h the current year |
---|
[325] | 212 | |
---|
[1748] | 213 | !!---------------------------------------------------------------------- |
---|
| 214 | !! agrif domain |
---|
| 215 | !!---------------------------------------------------------------------- |
---|
| 216 | #if defined key_agrif |
---|
| 217 | LOGICAL, PUBLIC, PARAMETER :: lk_agrif = .TRUE. !: agrif flag |
---|
| 218 | #else |
---|
| 219 | LOGICAL, PUBLIC, PARAMETER :: lk_agrif = .FALSE. !: agrif flag |
---|
| 220 | #endif |
---|
[1716] | 221 | |
---|
[497] | 222 | #if defined key_off_degrad |
---|
| 223 | !! ------------------------------------------------ |
---|
| 224 | !! Degradation method |
---|
| 225 | !! -------------------------------------------------- |
---|
| 226 | REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: & |
---|
| 227 | facvol !! volume for degraded regions |
---|
| 228 | #endif |
---|
| 229 | |
---|
[325] | 230 | !!---------------------------------------------------------------------- |
---|
| 231 | END MODULE dom_oce |
---|