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