1 | MODULE dom_oce |
---|
2 | !!---------------------------------------------------------------------- |
---|
3 | !! *** MODULE dom_oce *** |
---|
4 | !! |
---|
5 | !! ** Purpose : Define in memory all the ocean space domain variables |
---|
6 | !!---------------------------------------------------------------------- |
---|
7 | !! OPA 9.0 , LODYC-IPSL (2003) |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | !! * Modules used |
---|
10 | USE par_oce ! ocean parameters |
---|
11 | |
---|
12 | IMPLICIT NONE |
---|
13 | PUBLIC |
---|
14 | |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! space domain parameters |
---|
17 | !! ----------------------- |
---|
18 | LOGICAL :: & |
---|
19 | lclosea = .FALSE. , & ! closed sea flag |
---|
20 | lzoom = .FALSE. , & ! zoom flag |
---|
21 | lzoom_e = .FALSE. , & ! East zoom type flag |
---|
22 | lzoom_w = .FALSE. , & ! West zoom type flag |
---|
23 | lzoom_s = .FALSE. , & ! South zoom type flag |
---|
24 | lzoom_n = .FALSE. , & ! North zoom type flag |
---|
25 | lzoom_arct = .FALSE. , & ! ORCA arctic zoom flag |
---|
26 | lzoom_anta = .FALSE. ! ORCA antarctic zoom flag |
---|
27 | |
---|
28 | INTEGER :: & !!! namdom : space domain (bathymetry, mesh) |
---|
29 | ntopo = 0 , & ! = 0/1 ,compute/read the bathymetry file |
---|
30 | ngrid = 0 , & ! = 0/1, compute/read the horizontal mesh file |
---|
31 | nmsh = 0 ! = 1 create a mesh-mask file |
---|
32 | |
---|
33 | INTEGER :: & |
---|
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 |
---|
50 | nbse, nbsw ! logical of south east & south west processor |
---|
51 | |
---|
52 | INTEGER, DIMENSION(jpi) :: & |
---|
53 | mig ! local ==> global domain i-indice |
---|
54 | INTEGER, DIMENSION(jpj) :: & |
---|
55 | mjg ! local ==> global domain j-indice |
---|
56 | INTEGER, DIMENSION( jpiglo ) :: & !!bug ==> other solution? |
---|
57 | mi0, mi1 ! global ==> local domain i-indice |
---|
58 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
59 | INTEGER, DIMENSION( jpjglo ) :: & |
---|
60 | mj0, mj1 ! global ==> local domain j-indice |
---|
61 | ! ! (mi0=1 and mi1=0 if the global indice is not in the local domain) |
---|
62 | |
---|
63 | INTEGER, DIMENSION(jpnij) :: & |
---|
64 | nimppt, njmppt, & ! i-, j-indexes for each processor |
---|
65 | nlcit, nlcjt, & ! dimensions of every subdomain |
---|
66 | nldit, nldjt, & ! first, last indoor index for each i-domain |
---|
67 | nleit, nlejt ! first, last indoor index for each j-domain |
---|
68 | |
---|
69 | !!---------------------------------------------------------------------- |
---|
70 | !! horizontal curvilinear coordinate and scale factors |
---|
71 | !! --------------------------------------------------------------------- |
---|
72 | |
---|
73 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
74 | glamt, glamu, & ! longitude of t-, u-, v- and f-points (degre) |
---|
75 | glamv, glamf, & ! |
---|
76 | gphit, gphiu, & ! latitude of t-, u-, v- and f-points (degre) |
---|
77 | gphiv, gphif, & ! |
---|
78 | e1t, e2t, & ! horizontal scale factors at t-point (m) |
---|
79 | e1u, e2u, & ! horizontal scale factors at u-point (m) |
---|
80 | e1v, e2v, & ! horizontal scale factors at v-point (m) |
---|
81 | e1f, e2f, & ! horizontal scale factors at f-point (m) |
---|
82 | ff ! coriolis factor (2.*omega*sin(yphi) ) (s-1) |
---|
83 | |
---|
84 | !!---------------------------------------------------------------------- |
---|
85 | !! vertical coordinate and scale factors |
---|
86 | !! -------------------------------------- |
---|
87 | |
---|
88 | REAL(wp) :: & !!! * namelist namdom * |
---|
89 | e3zps_min = 5.0, & ! miminum thickness for partial steps (meters) |
---|
90 | e3zps_rat = 0.1 ! minimum thickness ration for partial steps |
---|
91 | |
---|
92 | !! z-coordinate (default option) (also used in the other cases |
---|
93 | !! ----------------------------- as reference z-coordinate) |
---|
94 | REAL(wp), DIMENSION(jpk) :: & |
---|
95 | gdept, gdepw, & ! reference depth of t- and w-points (m) |
---|
96 | e3t, e3w ! reference vertical scale factors at T- and W-pts (m) |
---|
97 | |
---|
98 | #if defined key_partial_steps |
---|
99 | !! Partial steps ('key_partial_steps') |
---|
100 | !! ----------------------------------- |
---|
101 | LOGICAL, PARAMETER :: lk_zps = .TRUE. ! partial steps flag |
---|
102 | LOGICAL, PARAMETER :: lk_sco = .FALSE. ! s-coordinate flag |
---|
103 | LOGICAL, PARAMETER :: lk_zco = .FALSE. ! z-coordinate flag |
---|
104 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: & |
---|
105 | gdep3w, & ! |
---|
106 | gdept_ps, gdepw_ps, & ! depth of t- and w-points (m) |
---|
107 | e3t_ps, e3u_ps, e3v_ps, & ! vertical scale factors at t-, u-, w-, |
---|
108 | e3w_ps, e3f_ps, & ! w-, f-, uw- and vw- points (m) |
---|
109 | e3uw_ps, e3vw_ps |
---|
110 | |
---|
111 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
112 | hdept, hdepw, e3tp, e3wp |
---|
113 | |
---|
114 | #elif defined key_s_coord |
---|
115 | !! s-coordinate ('key_s_coord') |
---|
116 | !! ---------------------------- |
---|
117 | LOGICAL, PARAMETER :: lk_zps = .FALSE. ! partial steps flag |
---|
118 | LOGICAL, PARAMETER :: lk_sco = .TRUE. ! s-coordinate flag |
---|
119 | LOGICAL, PARAMETER :: lk_zco = .FALSE. ! z-coordinate flag |
---|
120 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
121 | hbatt, hbatu, & ! ocean depth at the vertical of t-, u-, v- |
---|
122 | hbatv, hbatf ! and f-point (m) |
---|
123 | |
---|
124 | REAL(wp), DIMENSION(jpk) :: & |
---|
125 | gsigt, gsigw , & ! model level depth coefficient at t-, w-levels |
---|
126 | gsi3w, & ! model level depth coefficient at w-level |
---|
127 | ! defined as the sum of e3w scale factors |
---|
128 | esigt, esigw ! vertical scale factor coef. at t-, w-levels |
---|
129 | |
---|
130 | #else |
---|
131 | !! z-coordinate (Default option) |
---|
132 | !! ----------------------------- |
---|
133 | LOGICAL, PARAMETER :: lk_zps = .FALSE. ! partial steps flag |
---|
134 | LOGICAL, PARAMETER :: lk_sco = .FALSE. ! s-coordinate flag |
---|
135 | LOGICAL, PARAMETER :: lk_zco = .TRUE. ! s-coordinate flag |
---|
136 | #endif |
---|
137 | !!---------------------------------------------------------------------- |
---|
138 | !! masks, bathymetry |
---|
139 | !! ----------------- |
---|
140 | |
---|
141 | INTEGER , DIMENSION(jpi,jpj) :: & |
---|
142 | mbathy ! number of ocean level (=0, 1, ... , jpk-1) |
---|
143 | |
---|
144 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
145 | bathy , & ! ocean depth (meters) |
---|
146 | tmask_i ! interior domain T-point mask |
---|
147 | |
---|
148 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: & |
---|
149 | tmask, umask, & ! land/ocean mask at T-, U-, V- and F-points |
---|
150 | vmask, fmask ! |
---|
151 | |
---|
152 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
153 | bmask ! land/ocean mask of barotropic stream function |
---|
154 | |
---|
155 | REAL(wp), DIMENSION(jpiglo) :: & |
---|
156 | tpol, fpol ! north fold mask (nperio= 3 or 4) |
---|
157 | |
---|
158 | #if defined key_noslip_accurate |
---|
159 | INTEGER, DIMENSION(4,jpk) :: & |
---|
160 | npcoa ! ??? |
---|
161 | INTEGER, DIMENSION(2*(jpi+jpj),4,jpk) :: & |
---|
162 | nicoa, & ! ??? |
---|
163 | njcoa ! ??? |
---|
164 | |
---|
165 | #endif |
---|
166 | |
---|
167 | !!---------------------------------------------------------------------- |
---|
168 | !! time domain |
---|
169 | !!---------------------------------------------------------------------- |
---|
170 | INTEGER :: & |
---|
171 | nacc = 0 , & ! = 0/1 use of the acceleration of convergence technique |
---|
172 | neuler ! restart euler forward option (0=Euler) |
---|
173 | |
---|
174 | |
---|
175 | REAL(wp) :: & |
---|
176 | rdt = 3600._wp , & ! time step for the dynamics (and tracer if nacc=0) |
---|
177 | rdtmin = 3600._wp , & ! minimum time step on tracers |
---|
178 | rdtmax = 3600._wp , & ! maximum time step on tracers |
---|
179 | rdth = 800._wp , & ! depth variation of tracer step |
---|
180 | atfp = 0.1_wp , & ! asselin time filter parameter |
---|
181 | atfp1 ! asselin time filter coeff. (atfp1= 1-2*atfp) |
---|
182 | |
---|
183 | REAL(wp), DIMENSION(jpk) :: & |
---|
184 | rdttra ! vertical profile of tracer time step |
---|
185 | |
---|
186 | !!---------------------------------------------------------------------- |
---|
187 | !! cross land advection |
---|
188 | !!---------------------------------------------------------------------- |
---|
189 | |
---|
190 | INTEGER :: & !!! namelist ??? |
---|
191 | n_cla ! flag (0/1) for cross land advection to |
---|
192 | ! ! parameterize exchanges through straits |
---|
193 | |
---|
194 | !!---------------------------------------------------------------------- |
---|
195 | END MODULE dom_oce |
---|