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