[3] | 1 | MODULE dom_oce |
---|
| 2 | !!---------------------------------------------------------------------- |
---|
| 3 | !! *** MODULE dom_oce *** |
---|
| 4 | !! |
---|
| 5 | !! ** Purpose : Define in memory all the ocean space domain variables |
---|
| 6 | !!---------------------------------------------------------------------- |
---|
[247] | 7 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
| 8 | !! $Header$ |
---|
| 9 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
[3] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! * Modules used |
---|
| 12 | USE par_oce ! ocean parameters |
---|
| 13 | |
---|
| 14 | IMPLICIT NONE |
---|
[32] | 15 | PUBLIC ! allows the acces to par_oce when dom_oce is used |
---|
| 16 | ! ! exception to coding rules... to be suppressed ??? |
---|
[3] | 17 | |
---|
| 18 | !!---------------------------------------------------------------------- |
---|
| 19 | !! space domain parameters |
---|
| 20 | !! ----------------------- |
---|
[32] | 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 |
---|
[3] | 29 | |
---|
[32] | 30 | INTEGER, PUBLIC :: & !!: namdom : space domain (bathymetry, mesh) |
---|
| 31 | ntopo = 0 , & !: = 0/1 ,compute/read the bathymetry file |
---|
| 32 | ngrid = 0 , & !: = 0/1, compute/read the horizontal mesh file |
---|
| 33 | nmsh = 0 !: = 1 create a mesh-mask file |
---|
[3] | 34 | |
---|
[32] | 35 | INTEGER, PUBLIC :: & !: |
---|
[3] | 36 | ! domain parameters linked to mpp |
---|
[32] | 37 | nperio, & !: type of lateral boundary condition |
---|
| 38 | nimpp, njmpp, & !: i- & j-indexes for mpp-subdomain left bottom |
---|
| 39 | nreci, nrecj, & !: overlap region in i and j |
---|
| 40 | nproc, & !: number for local processor |
---|
| 41 | narea, & !: number for local area |
---|
| 42 | nbondi, nbondj, & !: mark of i- and j-direction local boundaries |
---|
| 43 | npolj, & !: north fold mark (0, 3 or 4) |
---|
| 44 | nlci, nlcj, & !: i- & j-dimensions of the local subdomain |
---|
| 45 | nldi, nlei, & !: first and last indoor i- and j-indexes |
---|
| 46 | nldj, nlej, & !: |
---|
| 47 | noea, nowe, & !: index of the local neighboring processors in |
---|
| 48 | noso, nono, & !: east, west, south and north directions |
---|
| 49 | npne, npnw, & !: index of north east and north west processor |
---|
| 50 | npse, npsw, & !: index of south east and south west processor |
---|
| 51 | nbne, nbnw, & !: logical of north east & north west processor |
---|
[352] | 52 | nbse, nbsw, & !: logical of south east & south west processor |
---|
| 53 | nidom |
---|
[3] | 54 | |
---|
[32] | 55 | INTEGER, PUBLIC, DIMENSION(jpi) :: & !: |
---|
| 56 | mig !: local ==> global domain i-indice |
---|
| 57 | INTEGER, PUBLIC, DIMENSION(jpj) :: & !: |
---|
| 58 | mjg !: local ==> global domain j-indice |
---|
[65] | 59 | INTEGER, PUBLIC, DIMENSION( jpidta ) :: & !: !!bug ==> other solution? |
---|
[32] | 60 | mi0, mi1 !: global ==> local domain i-indice |
---|
| 61 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
[65] | 62 | INTEGER, PUBLIC, DIMENSION( jpjdta ) :: & !: |
---|
[32] | 63 | mj0, mj1 !: global ==> local domain j-indice |
---|
[3] | 64 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
| 65 | |
---|
[32] | 66 | INTEGER, PUBLIC, DIMENSION(jpnij) :: & !: |
---|
| 67 | nimppt, njmppt, & !: i-, j-indexes for each processor |
---|
[258] | 68 | ibonit, ibonjt, & !: i-, j- processor neighbour existence |
---|
[32] | 69 | nlcit, nlcjt, & !: dimensions of every subdomain |
---|
| 70 | nldit, nldjt, & !: first, last indoor index for each i-domain |
---|
| 71 | nleit, nlejt !: first, last indoor index for each j-domain |
---|
[3] | 72 | |
---|
| 73 | !!---------------------------------------------------------------------- |
---|
| 74 | !! horizontal curvilinear coordinate and scale factors |
---|
| 75 | !! --------------------------------------------------------------------- |
---|
| 76 | |
---|
[32] | 77 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 78 | glamt, glamu, & !: longitude of t-, u-, v- and f-points (degre) |
---|
| 79 | glamv, glamf, & !: |
---|
| 80 | gphit, gphiu, & !: latitude of t-, u-, v- and f-points (degre) |
---|
| 81 | gphiv, gphif, & !: |
---|
| 82 | e1t, e2t, & !: horizontal scale factors at t-point (m) |
---|
| 83 | e1u, e2u, & !: horizontal scale factors at u-point (m) |
---|
| 84 | e1v, e2v, & !: horizontal scale factors at v-point (m) |
---|
| 85 | e1f, e2f, & !: horizontal scale factors at f-point (m) |
---|
| 86 | ff !: coriolis factor (2.*omega*sin(yphi) ) (s-1) |
---|
[3] | 87 | |
---|
| 88 | !!---------------------------------------------------------------------- |
---|
| 89 | !! vertical coordinate and scale factors |
---|
| 90 | !! -------------------------------------- |
---|
| 91 | |
---|
[32] | 92 | REAL(wp), PUBLIC :: & !!: * namelist namdom * |
---|
| 93 | e3zps_min = 5.0, & !: miminum thickness for partial steps (meters) |
---|
| 94 | e3zps_rat = 0.1 !: minimum thickness ration for partial steps |
---|
[3] | 95 | |
---|
| 96 | !! z-coordinate (default option) (also used in the other cases |
---|
| 97 | !! ----------------------------- as reference z-coordinate) |
---|
[32] | 98 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
| 99 | gdept, gdepw, & !: reference depth of t- and w-points (m) |
---|
| 100 | e3t, e3w !: reference vertical scale factors at T- and W-pts (m) |
---|
[3] | 101 | |
---|
| 102 | #if defined key_partial_steps |
---|
| 103 | !! Partial steps ('key_partial_steps') |
---|
| 104 | !! ----------------------------------- |
---|
[32] | 105 | LOGICAL, PUBLIC, PARAMETER :: lk_zps = .TRUE. !: partial steps flag |
---|
| 106 | LOGICAL, PUBLIC, PARAMETER :: lk_sco = .FALSE. !: s-coordinate flag |
---|
| 107 | LOGICAL, PUBLIC, PARAMETER :: lk_zco = .FALSE. !: z-coordinate flag |
---|
| 108 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: & !: |
---|
| 109 | gdep3w, & !: ??? |
---|
| 110 | gdept_ps, gdepw_ps, & !: depth of t- and w-points (m) |
---|
| 111 | e3t_ps, e3u_ps, e3v_ps, & !: vertical scale factors at t-, u-, w-, |
---|
| 112 | e3w_ps, e3f_ps, & !: w- and f- points (m) |
---|
| 113 | e3uw_ps, e3vw_ps !: uw- and vw- points (m) |
---|
[3] | 114 | |
---|
[32] | 115 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 116 | hdept, hdepw, e3tp, e3wp !: ??? |
---|
[3] | 117 | |
---|
| 118 | #elif defined key_s_coord |
---|
| 119 | !! s-coordinate ('key_s_coord') |
---|
| 120 | !! ---------------------------- |
---|
[32] | 121 | LOGICAL, PUBLIC, PARAMETER :: lk_zps = .FALSE. !: partial steps flag |
---|
| 122 | LOGICAL, PUBLIC, PARAMETER :: lk_sco = .TRUE. !: s-coordinate flag |
---|
| 123 | LOGICAL, PUBLIC, PARAMETER :: lk_zco = .FALSE. !: z-coordinate flag |
---|
| 124 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 125 | hbatt, hbatu, & !: ocean depth at the vertical of t-, u-, v- |
---|
| 126 | hbatv, hbatf !: and f-point (m) |
---|
[3] | 127 | |
---|
[32] | 128 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
| 129 | gsigt, gsigw , & !: model level depth coefficient at t-, w-levels |
---|
| 130 | gsi3w, & !: model level depth coefficient at w-level |
---|
[3] | 131 | ! defined as the sum of e3w scale factors |
---|
[32] | 132 | esigt, esigw !: vertical scale factor coef. at t-, w-levels |
---|
[3] | 133 | |
---|
| 134 | #else |
---|
| 135 | !! z-coordinate (Default option) |
---|
| 136 | !! ----------------------------- |
---|
[32] | 137 | LOGICAL, PUBLIC, PARAMETER :: lk_zps = .FALSE. !: partial steps flag |
---|
| 138 | LOGICAL, PUBLIC, PARAMETER :: lk_sco = .FALSE. !: s-coordinate flag |
---|
| 139 | LOGICAL, PUBLIC, PARAMETER :: lk_zco = .TRUE. !: s-coordinate flag |
---|
[3] | 140 | #endif |
---|
| 141 | !!---------------------------------------------------------------------- |
---|
| 142 | !! masks, bathymetry |
---|
| 143 | !! ----------------- |
---|
| 144 | |
---|
[32] | 145 | INTEGER , PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 146 | mbathy !: number of ocean level (=0, 1, ... , jpk-1) |
---|
[3] | 147 | |
---|
[32] | 148 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 149 | bathy , & !: ocean depth (meters) |
---|
| 150 | tmask_i !: interior domain T-point mask |
---|
[3] | 151 | |
---|
[32] | 152 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: & !: |
---|
| 153 | tmask, umask, & !: land/ocean mask at T-, U-, V- and F-points |
---|
| 154 | vmask, fmask !: |
---|
[3] | 155 | |
---|
[32] | 156 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
| 157 | bmask !: land/ocean mask of barotropic stream function |
---|
[3] | 158 | |
---|
[32] | 159 | REAL(wp), PUBLIC, DIMENSION(jpiglo) :: & !: |
---|
| 160 | tpol, fpol !: north fold mask (nperio= 3 or 4) |
---|
[3] | 161 | |
---|
| 162 | #if defined key_noslip_accurate |
---|
[32] | 163 | INTEGER, PUBLIC, DIMENSION(4,jpk) :: & !: |
---|
| 164 | npcoa !: ??? |
---|
| 165 | INTEGER, PUBLIC, DIMENSION(2*(jpi+jpj),4,jpk) :: & !: |
---|
| 166 | nicoa, & !: ??? |
---|
| 167 | njcoa !: ??? |
---|
[3] | 168 | |
---|
| 169 | #endif |
---|
| 170 | |
---|
| 171 | !!---------------------------------------------------------------------- |
---|
| 172 | !! time domain |
---|
| 173 | !!---------------------------------------------------------------------- |
---|
[32] | 174 | INTEGER, PUBLIC :: & !!: * Namelist * ??? |
---|
| 175 | nacc = 0 , & !: = 0/1 use of the acceleration of convergence technique |
---|
| 176 | neuler !: restart euler forward option (0=Euler) |
---|
[3] | 177 | |
---|
| 178 | |
---|
[32] | 179 | REAL(wp), PUBLIC :: & !!: * Namelist ??? * |
---|
| 180 | rdt = 3600._wp , & !: time step for the dynamics (and tracer if nacc=0) |
---|
| 181 | rdtmin = 3600._wp , & !: minimum time step on tracers |
---|
| 182 | rdtmax = 3600._wp , & !: maximum time step on tracers |
---|
| 183 | rdth = 800._wp , & !: depth variation of tracer step |
---|
[359] | 184 | rdtbt = 90._wp , & !: barotropic time step for the dynamics (lk_dynspg_ts=T) |
---|
[32] | 185 | atfp = 0.1_wp , & !: asselin time filter parameter |
---|
| 186 | atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) |
---|
[3] | 187 | |
---|
[32] | 188 | REAL(wp), PUBLIC, DIMENSION(jpk) :: & !: |
---|
| 189 | rdttra !: vertical profile of tracer time step |
---|
[3] | 190 | |
---|
| 191 | !!---------------------------------------------------------------------- |
---|
| 192 | !! cross land advection |
---|
| 193 | !!---------------------------------------------------------------------- |
---|
| 194 | |
---|
[32] | 195 | INTEGER, PUBLIC :: & !!: namelist ??? |
---|
| 196 | n_cla !: flag (0/1) for cross land advection to |
---|
[3] | 197 | ! ! parameterize exchanges through straits |
---|
| 198 | |
---|
[392] | 199 | #if defined key_agrif |
---|
[3] | 200 | !!---------------------------------------------------------------------- |
---|
[389] | 201 | !! agrif sponge layer |
---|
| 202 | !!---------------------------------------------------------------------- |
---|
| 203 | LOGICAL :: spongedoneT = .FALSE. |
---|
| 204 | REAL(wp), DIMENSION(jpi,jpj) :: zspe1ur, zspe2vr ,zspbtr2 |
---|
| 205 | !!---------------------------------------------------------------------- |
---|
| 206 | #endif |
---|
| 207 | |
---|
[3] | 208 | END MODULE dom_oce |
---|