1 | \documentclass[../tex_main/NEMO_manual]{subfiles} |
---|
2 | \begin{document} |
---|
3 | % ================================================================ |
---|
4 | % Chapter 2 ——— Space and Time Domain (DOM) |
---|
5 | % ================================================================ |
---|
6 | \chapter{Space Domain (DOM)} |
---|
7 | \label{chap:DOM} |
---|
8 | \minitoc |
---|
9 | |
---|
10 | % Missing things: |
---|
11 | % - istate: description of the initial state ==> this has to be put elsewhere.. |
---|
12 | % perhaps in MISC ? By the way the initialisation of T S and dynamics |
---|
13 | % should be put outside of DOM routine (better with TRC staff and off-line |
---|
14 | % tracers) |
---|
15 | % -geo2ocean: how to switch from geographic to mesh coordinate |
---|
16 | % - domclo: closed sea and lakes.... management of closea sea area : specific to global configuration, both forced and coupled |
---|
17 | |
---|
18 | |
---|
19 | \newpage |
---|
20 | $\ $\newline % force a new line |
---|
21 | |
---|
22 | Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP}, |
---|
23 | we need to choose a discretization on a grid, and numerical algorithms. |
---|
24 | In the present chapter, we provide a general description of the staggered grid used in \NEMO, |
---|
25 | and other information relevant to the main directory routines as well as the DOM (DOMain) directory. |
---|
26 | |
---|
27 | $\ $\newline % force a new line |
---|
28 | |
---|
29 | % ================================================================ |
---|
30 | % Fundamentals of the Discretisation |
---|
31 | % ================================================================ |
---|
32 | \section{Fundamentals of the discretisation} |
---|
33 | \label{sec:DOM_basics} |
---|
34 | |
---|
35 | % ------------------------------------------------------------------------------------------------------------- |
---|
36 | % Arrangement of Variables |
---|
37 | % ------------------------------------------------------------------------------------------------------------- |
---|
38 | \subsection{Arrangement of variables} |
---|
39 | \label{subsec:DOM_cell} |
---|
40 | |
---|
41 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
42 | \begin{figure}[!tb] \begin{center} |
---|
43 | \includegraphics[width=0.90\textwidth]{Fig_cell} |
---|
44 | \caption{ \protect\label{fig:cell} |
---|
45 | Arrangement of variables. |
---|
46 | $t$ indicates scalar points where temperature, salinity, density, pressure and horizontal divergence are defined. |
---|
47 | ($u$,$v$,$w$) indicates vector points, |
---|
48 | and $f$ indicates vorticity points where both relative and planetary vorticities are defined} |
---|
49 | \end{center} \end{figure} |
---|
50 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
51 | |
---|
52 | The numerical techniques used to solve the Primitive Equations in this model are based on the traditional, |
---|
53 | centred second-order finite difference approximation. |
---|
54 | Special attention has been given to the homogeneity of the solution in the three space directions. |
---|
55 | The arrangement of variables is the same in all directions. |
---|
56 | It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in |
---|
57 | the centre of each face of the cells (\autoref{fig:cell}). |
---|
58 | This is the generalisation to three dimensions of the well-known ``C'' grid in Arakawa's classification |
---|
59 | \citep{Mesinger_Arakawa_Bk76}. |
---|
60 | The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each vertical edge and |
---|
61 | the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points. |
---|
62 | |
---|
63 | The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by |
---|
64 | the transformation that gives ($\lambda$ ,$\varphi$ ,$z$) as a function of $(i,j,k)$. |
---|
65 | The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. |
---|
66 | In all the following, subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of |
---|
67 | the grid-point where the scale factors are defined. |
---|
68 | Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}. |
---|
69 | As a result, |
---|
70 | the mesh on which partial derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, |
---|
71 | and $\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity. |
---|
72 | Discrete partial derivatives are formulated by the traditional, |
---|
73 | centred second order finite difference approximation while |
---|
74 | the scale factors are chosen equal to their local analytical value. |
---|
75 | An important point here is that the partial derivative of the scale factors must be evaluated by |
---|
76 | centred finite difference approximation, not from their analytical expression. |
---|
77 | This preserves the symmetry of the discrete set of equations and |
---|
78 | therefore satisfies many of the continuous properties (see \autoref{apdx:C}). |
---|
79 | A similar, related remark can be made about the domain size: |
---|
80 | when needed, an area, volume, or the total ocean depth must be evaluated as the sum of the relevant scale factors |
---|
81 | (see \autoref{eq:DOM_bar}) in the next section). |
---|
82 | |
---|
83 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
84 | \begin{table}[!tb] |
---|
85 | \begin{center} \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|} |
---|
86 | \hline |
---|
87 | T &$i$ & $j$ & $k$ \\ \hline |
---|
88 | u & $i+1/2$ & $j$ & $k$ \\ \hline |
---|
89 | v & $i$ & $j+1/2$ & $k$ \\ \hline |
---|
90 | w & $i$ & $j$ & $k+1/2$ \\ \hline |
---|
91 | f & $i+1/2$ & $j+1/2$ & $k$ \\ \hline |
---|
92 | uw & $i+1/2$ & $j$ & $k+1/2$ \\ \hline |
---|
93 | vw & $i$ & $j+1/2$ & $k+1/2$ \\ \hline |
---|
94 | fw & $i+1/2$ & $j+1/2$ & $k+1/2$ \\ \hline |
---|
95 | \end{tabular} |
---|
96 | \caption{ \protect\label{tab:cell} |
---|
97 | Location of grid-points as a function of integer or integer and a half value of the column, line or level. |
---|
98 | This indexing is only used for the writing of the semi-discrete equation. |
---|
99 | In the code, the indexing uses integer values only and has a reverse direction in the vertical |
---|
100 | (see \autoref{subsec:DOM_Num_Index})} |
---|
101 | \end{center} |
---|
102 | \end{table} |
---|
103 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
104 | |
---|
105 | % ------------------------------------------------------------------------------------------------------------- |
---|
106 | % Vector Invariant Formulation |
---|
107 | % ------------------------------------------------------------------------------------------------------------- |
---|
108 | \subsection{Discrete operators} |
---|
109 | \label{subsec:DOM_operators} |
---|
110 | |
---|
111 | Given the values of a variable $q$ at adjacent points, |
---|
112 | the differencing and averaging operators at the midpoint between them are: |
---|
113 | \begin{subequations} \label{eq:di_mi} |
---|
114 | \begin{align} |
---|
115 | \delta_i [q] &= \ \ q(i+1/2) - q(i-1/2) \\ |
---|
116 | \overline q^{\,i} &= \left\{ q(i+1/2) + q(i-1/2) \right\} \; / \; 2 |
---|
117 | \end{align} |
---|
118 | \end{subequations} |
---|
119 | |
---|
120 | Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and $k+1/2$. |
---|
121 | Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at |
---|
122 | a $t$-point has its three components defined at $u$-, $v$- and $w$-points while |
---|
123 | its Laplacien is defined at $t$-point. |
---|
124 | These operators have the following discrete forms in the curvilinear $s$-coordinate system: |
---|
125 | \begin{equation} \label{eq:DOM_grad} |
---|
126 | \nabla q\equiv \frac{1}{e_{1u} } \delta_{i+1/2 } [q] \;\,\mathbf{i} |
---|
127 | + \frac{1}{e_{2v} } \delta_{j+1/2 } [q] \;\,\mathbf{j} |
---|
128 | + \frac{1}{e_{3w}} \delta_{k+1/2} [q] \;\,\mathbf{k} |
---|
129 | \end{equation} |
---|
130 | \begin{multline} \label{eq:DOM_lap} |
---|
131 | \Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } |
---|
132 | \;\left( \delta_i \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right] |
---|
133 | + \delta_j \left[ \frac{e_{1v}\,e_{3v}} {e_{2v}} \;\delta_{j+1/2} [q] \right] \; \right) \\ |
---|
134 | +\frac{1}{e_{3t}} \delta_k \left[ \frac{1}{e_{3w} } \;\delta_{k+1/2} [q] \right] |
---|
135 | \end{multline} |
---|
136 | |
---|
137 | Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ |
---|
138 | defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, |
---|
139 | and its divergence defined at $t$-points: |
---|
140 | \begin{align} \label{eq:DOM_curl} |
---|
141 | \nabla \times {\rm{\bf A}}\equiv & |
---|
142 | \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right) &\ \mathbf{i} \\ |
---|
143 | +& \frac{1}{e_{2u}\,e_{3uw}} \ \left( \delta_{k+1/2} \left[e_{1u}\,a_1 \right] -\delta_{i +1/2} \left[e_{3w}\,a_3 \right] \right) &\ \mathbf{j} \\ |
---|
144 | +& \frac{1}{e_{1f} \,e_{2f} } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2 \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right) &\ \mathbf{k} |
---|
145 | \end{align} |
---|
146 | \begin{align} \label{eq:DOM_div} |
---|
147 | \nabla \cdot \rm{\bf A} \equiv |
---|
148 | \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] |
---|
149 | +\delta_j \left[e_{1v}\,e_{3v}\,a_2 \right] \right)+\frac{1}{e_{3t} }\delta_k \left[a_3 \right] |
---|
150 | \end{align} |
---|
151 | |
---|
152 | The vertical average over the whole water column denoted by an overbar becomes for a quantity $q$ which |
---|
153 | is a masked field (i.e. equal to zero inside solid area): |
---|
154 | \begin{equation} \label{eq:DOM_bar} |
---|
155 | \bar q = \frac{1}{H} \int_{k^b}^{k^o} {q\;e_{3q} \,dk} |
---|
156 | \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } |
---|
157 | \end{equation} |
---|
158 | where $H_q$ is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points, |
---|
159 | $k^b$ and $k^o$ are the bottom and surface $k$-indices, |
---|
160 | and the symbol $k^o$ refers to a summation over all grid points of the same type in the direction indicated by |
---|
161 | the subscript (here $k$). |
---|
162 | |
---|
163 | In continuous form, the following properties are satisfied: |
---|
164 | \begin{equation} \label{eq:DOM_curl_grad} |
---|
165 | \nabla \times \nabla q ={\rm {\bf {0}}} |
---|
166 | \end{equation} |
---|
167 | \begin{equation} \label{eq:DOM_div_curl} |
---|
168 | \nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0 |
---|
169 | \end{equation} |
---|
170 | |
---|
171 | It is straightforward to demonstrate that these properties are verified locally in discrete form as soon as |
---|
172 | the scalar $q$ is taken at $t$-points and |
---|
173 | the vector \textbf{A} has its components defined at vector points $(u,v,w)$. |
---|
174 | |
---|
175 | Let $a$ and $b$ be two fields defined on the mesh, with value zero inside continental area. |
---|
176 | Using integration by parts it can be shown that |
---|
177 | the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$) are skew-symmetric linear operators, |
---|
178 | and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$, $\overline{\,\cdot\,}^{\,k}$ and |
---|
179 | $\overline{\,\cdot\,}^{\,k}$) are symmetric linear operators, |
---|
180 | $i.e.$ |
---|
181 | \begin{align} |
---|
182 | \label{eq:DOM_di_adj} |
---|
183 | \sum\limits_i { a_i \;\delta_i \left[ b \right]} |
---|
184 | &\equiv -\sum\limits_i {\delta_{i+1/2} \left[ a \right]\;b_{i+1/2} } \\ |
---|
185 | \label{eq:DOM_mi_adj} |
---|
186 | \sum\limits_i { a_i \;\overline b^{\,i}} |
---|
187 | & \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} } |
---|
188 | \end{align} |
---|
189 | |
---|
190 | In other words, the adjoint of the differencing and averaging operators are $\delta_i^*=\delta_{i+1/2}$ and |
---|
191 | ${(\overline{\,\cdot \,}^{\,i})}^*= \overline{\,\cdot\,}^{\,i+1/2}$, respectively. |
---|
192 | These two properties will be used extensively in the \autoref{apdx:C} to |
---|
193 | demonstrate integral conservative properties of the discrete formulation chosen. |
---|
194 | |
---|
195 | % ------------------------------------------------------------------------------------------------------------- |
---|
196 | % Numerical Indexing |
---|
197 | % ------------------------------------------------------------------------------------------------------------- |
---|
198 | \subsection{Numerical indexing} |
---|
199 | \label{subsec:DOM_Num_Index} |
---|
200 | |
---|
201 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
202 | \begin{figure}[!tb] \begin{center} |
---|
203 | \includegraphics[width=0.90\textwidth]{Fig_index_hor} |
---|
204 | \caption{ \protect\label{fig:index_hor} |
---|
205 | Horizontal integer indexing used in the \textsc{Fortran} code. |
---|
206 | The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices} |
---|
207 | \end{center} \end{figure} |
---|
208 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
209 | |
---|
210 | The array representation used in the \textsc{Fortran} code requires an integer indexing while |
---|
211 | the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of |
---|
212 | integer values for $t$-points and both integer and integer and a half values for all the other points. |
---|
213 | Therefore a specific integer indexing must be defined for points other than $t$-points |
---|
214 | ($i.e.$ velocity and vorticity grid-points). |
---|
215 | Furthermore, the direction of the vertical indexing has been changed so that the surface level is at $k=1$. |
---|
216 | |
---|
217 | % ----------------------------------- |
---|
218 | % Horizontal Indexing |
---|
219 | % ----------------------------------- |
---|
220 | \subsubsection{Horizontal indexing} |
---|
221 | \label{subsec:DOM_Num_Index_hor} |
---|
222 | |
---|
223 | The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}. |
---|
224 | For an increasing $i$ index ($j$ index), |
---|
225 | the $t$-point and the eastward $u$-point (northward $v$-point) have the same index |
---|
226 | (see the dashed area in \autoref{fig:index_hor}). |
---|
227 | A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices. |
---|
228 | |
---|
229 | % ----------------------------------- |
---|
230 | % Vertical indexing |
---|
231 | % ----------------------------------- |
---|
232 | \subsubsection{Vertical indexing} |
---|
233 | \label{subsec:DOM_Num_Index_vertical} |
---|
234 | |
---|
235 | In the vertical, the chosen indexing requires special attention since |
---|
236 | the $k$-axis is re-orientated downward in the \textsc{Fortran} code compared to |
---|
237 | the indexing used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}. |
---|
238 | The sea surface corresponds to the $w$-level $k=1$ which is the same index as $t$-level just below |
---|
239 | (\autoref{fig:index_vert}). |
---|
240 | The last $w$-level ($k=jpk$) either corresponds to the ocean floor or is inside the bathymetry while |
---|
241 | the last $t$-level is always inside the bathymetry (\autoref{fig:index_vert}). |
---|
242 | Note that for an increasing $k$ index, a $w$-point and the $t$-point just below have the same $k$ index, |
---|
243 | in opposition to what is done in the horizontal plane where |
---|
244 | it is the $t$-point and the nearest velocity points in the direction of the horizontal axis that |
---|
245 | have the same $i$ or $j$ index |
---|
246 | (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). |
---|
247 | Since the scale factors are chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran} |
---|
248 | code \emph{before all the vertical derivatives} of the discrete equations given in this documentation. |
---|
249 | |
---|
250 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
251 | \begin{figure}[!pt] \begin{center} |
---|
252 | \includegraphics[width=.90\textwidth]{Fig_index_vert} |
---|
253 | \caption{ \protect\label{fig:index_vert} |
---|
254 | Vertical integer indexing used in the \textsc{Fortran } code. |
---|
255 | Note that the $k$-axis is orientated downward. |
---|
256 | The dashed area indicates the cell in which variables contained in arrays have the same $k$-index.} |
---|
257 | \end{center} \end{figure} |
---|
258 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
259 | |
---|
260 | % ----------------------------------- |
---|
261 | % Domain Size |
---|
262 | % ----------------------------------- |
---|
263 | \subsubsection{Domain size} |
---|
264 | \label{subsec:DOM_size} |
---|
265 | |
---|
266 | The total size of the computational domain is set by the parameters \np{jpiglo}, |
---|
267 | \np{jpjglo} and \np{jpkglo} in the $i$, $j$ and $k$ directions respectively. |
---|
268 | %%% |
---|
269 | %%% |
---|
270 | %%% |
---|
271 | Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when |
---|
272 | the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, |
---|
273 | see \autoref{sec:LBC_mpp}). |
---|
274 | |
---|
275 | |
---|
276 | $\ $\newline % force a new line |
---|
277 | |
---|
278 | % ================================================================ |
---|
279 | % Domain: List of fields needed |
---|
280 | % ================================================================ |
---|
281 | \section{Needed fields} |
---|
282 | \label{sec:DOM_fields} |
---|
283 | The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. |
---|
284 | The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. |
---|
285 | The associated scale factors are defined using the analytical first derivative of the transformation |
---|
286 | \autoref{eq:scale_factors}. |
---|
287 | Necessary fields for configuration definition are: \\ |
---|
288 | Geographic position : |
---|
289 | |
---|
290 | longitude: glamt, glamu, glamv and glamf (at T, U, V and F point) |
---|
291 | |
---|
292 | latitude: gphit, gphiu, gphiv and gphif (at T, U, V and F point)\\ |
---|
293 | Coriolis parameter (if domain not on the sphere): |
---|
294 | |
---|
295 | ff\_f and ff\_t (at T and F point)\\ |
---|
296 | Scale factors : |
---|
297 | |
---|
298 | e1t, e1u, e1v and e1f (on i direction), |
---|
299 | |
---|
300 | e2t, e2u, e2v and e2f (on j direction) and |
---|
301 | |
---|
302 | ie1e2u\_v, e1e2u , e1e2v |
---|
303 | |
---|
304 | e1e2u , e1e2v are u and v surfaces (if gridsize reduction in some straits)\\ |
---|
305 | ie1e2u\_v is a flag to flag set u and v surfaces are neither read nor computed.\\ |
---|
306 | |
---|
307 | These fields can be read in an domain input file which name is setted in |
---|
308 | \np{cn\_domcfg} parameter specified in \ngn{namcfg}. |
---|
309 | |
---|
310 | \nlst{namcfg} |
---|
311 | or they can be defined in an analytical way in MY\_SRC directory of the configuration. |
---|
312 | For Reference Configurations of NEMO input domain files are supplied by NEMO System Team. |
---|
313 | For analytical definition of input fields two routines are supplied: \mdl{userdef\_hgr} and \mdl{userdef\_zgr}. |
---|
314 | They are an example of GYRE configuration parameters, and they are available in NEMO/OPA\_SRC/USR directory, |
---|
315 | they provide the horizontal and vertical mesh. |
---|
316 | % ------------------------------------------------------------------------------------------------------------- |
---|
317 | % Needed fields |
---|
318 | % ------------------------------------------------------------------------------------------------------------- |
---|
319 | %\subsection{List of needed fields to build DOMAIN} |
---|
320 | %\label{subsec:DOM_fields_list} |
---|
321 | |
---|
322 | |
---|
323 | % ================================================================ |
---|
324 | % Domain: Horizontal Grid (mesh) |
---|
325 | % ================================================================ |
---|
326 | \section{Horizontal grid mesh (\protect\mdl{domhgr})} |
---|
327 | \label{sec:DOM_hgr} |
---|
328 | |
---|
329 | % ------------------------------------------------------------------------------------------------------------- |
---|
330 | % Coordinates and scale factors |
---|
331 | % ------------------------------------------------------------------------------------------------------------- |
---|
332 | \subsection{Coordinates and scale factors} |
---|
333 | \label{subsec:DOM_hgr_coord_e} |
---|
334 | |
---|
335 | The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by |
---|
336 | the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. |
---|
337 | The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. |
---|
338 | The associated scale factors are defined using the analytical first derivative of the transformation |
---|
339 | \autoref{eq:scale_factors}. |
---|
340 | These definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, |
---|
341 | which provide the horizontal and vertical meshes, respectively. |
---|
342 | This section deals with the horizontal mesh parameters. |
---|
343 | |
---|
344 | In a horizontal plane, the location of all the model grid points is defined from |
---|
345 | the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$. |
---|
346 | The horizontal scale factors are calculated using \autoref{eq:scale_factors}. |
---|
347 | For example, when the longitude and latitude are function of a single value |
---|
348 | ($i$ and $j$, respectively) (geographical configuration of the mesh), |
---|
349 | the horizontal mesh definition reduces to define the wanted $\lambda(i)$, $\varphi(j)$, |
---|
350 | and their derivatives $\lambda'(i)$ $\varphi'(j)$ in the \mdl{domhgr} module. |
---|
351 | The model computes the grid-point positions and scale factors in the horizontal plane as follows: |
---|
352 | \begin{flalign*} |
---|
353 | \lambda_t &\equiv \text{glamt}= \lambda(i) & \varphi_t &\equiv \text{gphit} = \varphi(j)\\ |
---|
354 | \lambda_u &\equiv \text{glamu}= \lambda(i+1/2)& \varphi_u &\equiv \text{gphiu}= \varphi(j)\\ |
---|
355 | \lambda_v &\equiv \text{glamv}= \lambda(i) & \varphi_v &\equiv \text{gphiv} = \varphi(j+1/2)\\ |
---|
356 | \lambda_f &\equiv \text{glamf }= \lambda(i+1/2)& \varphi_f &\equiv \text{gphif }= \varphi(j+1/2) |
---|
357 | \end{flalign*} |
---|
358 | \begin{flalign*} |
---|
359 | e_{1t} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j) |& |
---|
360 | e_{2t} &\equiv \text{e2t} = r_a |\varphi'(j)| \\ |
---|
361 | e_{1u} &\equiv \text{e1t} = r_a |\lambda'(i+1/2) \; \cos\varphi(j) |& |
---|
362 | e_{2u} &\equiv \text{e2t} = r_a |\varphi'(j)|\\ |
---|
363 | e_{1v} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j+1/2) |& |
---|
364 | e_{2v} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)|\\ |
---|
365 | e_{1f} &\equiv \text{e1t} = r_a |\lambda'(i+1/2)\; \cos\varphi(j+1/2) |& |
---|
366 | e_{2f} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)| |
---|
367 | \end{flalign*} |
---|
368 | where the last letter of each computational name indicates the grid point considered and |
---|
369 | $r_a$ is the earth radius (defined in \mdl{phycst} along with all universal constants). |
---|
370 | Note that the horizontal position of and scale factors at $w$-points are exactly equal to those of $t$-points, |
---|
371 | thus no specific arrays are defined at $w$-points. |
---|
372 | |
---|
373 | Note that the definition of the scale factors |
---|
374 | ($i.e.$ as the analytical first derivative of the transformation that |
---|
375 | gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) |
---|
376 | is specific to the \NEMO model \citep{Marti_al_JGR92}. |
---|
377 | As an example, $e_{1t}$ is defined locally at a $t$-point, |
---|
378 | whereas many other models on a C grid choose to define such a scale factor as |
---|
379 | the distance between the $U$-points on each side of the $t$-point. |
---|
380 | Relying on an analytical transformation has two advantages: |
---|
381 | firstly, there is no ambiguity in the scale factors appearing in the discrete equations, |
---|
382 | since they are first introduced in the continuous equations; |
---|
383 | secondly, analytical transformations encourage good practice by the definition of smoothly varying grids |
---|
384 | (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{Treguier1996}. |
---|
385 | An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. |
---|
386 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
387 | \begin{figure}[!t] \begin{center} |
---|
388 | \includegraphics[width=0.90\textwidth]{Fig_zgr_e3} |
---|
389 | \caption{ \protect\label{fig:zgr_e3} |
---|
390 | Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, |
---|
391 | and (b) analytically derived grid-point position and scale factors. |
---|
392 | For both grids here, |
---|
393 | the same $w$-point depth has been chosen but in (a) the $t$-points are set half way between $w$-points while |
---|
394 | in (b) they are defined from an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. |
---|
395 | Note the resulting difference between the value of the grid-size $\Delta_k$ and those of the scale factor $e_k$. } |
---|
396 | \end{center} \end{figure} |
---|
397 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
398 | |
---|
399 | % ------------------------------------------------------------------------------------------------------------- |
---|
400 | % Choice of horizontal grid |
---|
401 | % ------------------------------------------------------------------------------------------------------------- |
---|
402 | \subsection{Choice of horizontal grid} |
---|
403 | \label{subsec:DOM_hgr_msh_choice} |
---|
404 | |
---|
405 | |
---|
406 | % ------------------------------------------------------------------------------------------------------------- |
---|
407 | % Grid files |
---|
408 | % ------------------------------------------------------------------------------------------------------------- |
---|
409 | \subsection{Output grid files} |
---|
410 | \label{subsec:DOM_hgr_files} |
---|
411 | |
---|
412 | All the arrays relating to a particular ocean model configuration (grid-point position, scale factors, masks) |
---|
413 | can be saved in files if \np{nn\_msh} $\not= 0$ (namelist variable in \ngn{namdom}). |
---|
414 | This can be particularly useful for plots and off-line diagnostics. |
---|
415 | In some cases, the user may choose to make a local modification of a scale factor in the code. |
---|
416 | This is the case in global configurations when restricting the width of a specific strait |
---|
417 | (usually a one-grid-point strait that happens to be too wide due to insufficient model resolution). |
---|
418 | An example is Gibraltar Strait in the ORCA2 configuration. |
---|
419 | When such modifications are done, |
---|
420 | the output grid written when \np{nn\_msh} $\not= 0$ is no more equal to the input grid. |
---|
421 | |
---|
422 | $\ $\newline % force a new line |
---|
423 | |
---|
424 | % ================================================================ |
---|
425 | % Domain: Vertical Grid (domzgr) |
---|
426 | % ================================================================ |
---|
427 | \section{Vertical grid (\protect\mdl{domzgr})} |
---|
428 | \label{sec:DOM_zgr} |
---|
429 | %-----------------------------------------nam_zgr & namdom------------------------------------------- |
---|
430 | % |
---|
431 | %\nlst{namzgr} |
---|
432 | |
---|
433 | \nlst{namdom} |
---|
434 | %------------------------------------------------------------------------------------------------------------- |
---|
435 | |
---|
436 | Variables are defined through the \ngn{namzgr} and \ngn{namdom} namelists. |
---|
437 | In the vertical, the model mesh is determined by four things: |
---|
438 | (1) the bathymetry given in meters; |
---|
439 | (2) the number of levels of the model (\jp{jpk}); |
---|
440 | (3) the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and |
---|
441 | (4) the masking system, $i.e.$ the number of wet model levels at each |
---|
442 | $(i,j)$ column of points. |
---|
443 | |
---|
444 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
445 | \begin{figure}[!tb] \begin{center} |
---|
446 | \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} |
---|
447 | \caption{ \protect\label{fig:z_zps_s_sps} |
---|
448 | The ocean bottom as seen by the model: |
---|
449 | (a) $z$-coordinate with full step, |
---|
450 | (b) $z$-coordinate with partial step, |
---|
451 | (c) $s$-coordinate: terrain following representation, |
---|
452 | (d) hybrid $s-z$ coordinate, |
---|
453 | (e) hybrid $s-z$ coordinate with partial step, and |
---|
454 | (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). |
---|
455 | Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).} |
---|
456 | \end{center} \end{figure} |
---|
457 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
458 | |
---|
459 | The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters, |
---|
460 | must be done once of all at the beginning of an experiment. |
---|
461 | It is not intended as an option which can be enabled or disabled in the middle of an experiment. |
---|
462 | Three main choices are offered (\autoref{fig:z_zps_s_sps}a to c): |
---|
463 | $z$-coordinate with full step bathymetry (\np{ln\_zco}\forcode{ = .true.}), |
---|
464 | $z$-coordinate with partial step bathymetry (\np{ln\_zps}\forcode{ = .true.}), |
---|
465 | or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). |
---|
466 | Hybridation of the three main coordinates are available: |
---|
467 | $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps} and \autoref{fig:z_zps_s_sps}e). |
---|
468 | By default a non-linear free surface is used: the coordinate follow the time-variation of the free surface so that |
---|
469 | the transformation is time dependent: $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). |
---|
470 | When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), |
---|
471 | the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface |
---|
472 | (in other words, the top of the ocean in not a rigid-lid). |
---|
473 | The last choice in terms of vertical coordinate concerns the presence (or not) in |
---|
474 | the model domain of ocean cavities beneath ice shelves. |
---|
475 | Setting \np{ln\_isfcav} to true allows to manage ocean cavities, otherwise they are filled in. |
---|
476 | This option is currently only available in $z$- or $zps$-coordinate, |
---|
477 | and partial step are also applied at the ocean/ice shelf interface. |
---|
478 | |
---|
479 | Contrary to the horizontal grid, the vertical grid is computed in the code and |
---|
480 | no provision is made for reading it from a file. |
---|
481 | The only input file is the bathymetry (in meters) (\ifile{bathy\_meter}) |
---|
482 | \footnote{ |
---|
483 | N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the \ifile{bathy\_meter} file, |
---|
484 | so that the computation of the number of wet ocean point in each water column is by-passed}. |
---|
485 | If \np{ln\_isfcav}\forcode{ = .true.}, |
---|
486 | an extra file input file describing the ice shelf draft (in meters) (\ifile{isf\_draft\_meter}) is needed. |
---|
487 | |
---|
488 | After reading the bathymetry, the algorithm for vertical grid definition differs between the different options: |
---|
489 | \begin{description} |
---|
490 | \item[\textit{zco}] |
---|
491 | set a reference coordinate transformation $z_0 (k)$, and set $z(i,j,k,t)=z_0 (k)$. |
---|
492 | \item[\textit{zps}] |
---|
493 | set a reference coordinate transformation $z_0 (k)$, |
---|
494 | and calculate the thickness of the deepest level at each $(i,j)$ point using the bathymetry, |
---|
495 | to obtain the final three-dimensional depth and scale factor arrays. |
---|
496 | \item[\textit{sco}] |
---|
497 | smooth the bathymetry to fulfil the hydrostatic consistency criteria and |
---|
498 | set the three-dimensional transformation. |
---|
499 | \item[\textit{s-z} and \textit{s-zps}] |
---|
500 | smooth the bathymetry to fulfil the hydrostatic consistency criteria and |
---|
501 | set the three-dimensional transformation $z(i,j,k)$, |
---|
502 | and possibly introduce masking of extra land points to better fit the original bathymetry file. |
---|
503 | \end{description} |
---|
504 | %%% |
---|
505 | \gmcomment{ add the description of the smoothing: envelop topography...} |
---|
506 | %%% |
---|
507 | |
---|
508 | Unless a linear free surface is used (\np{ln\_linssh}\forcode{ = .false.}), |
---|
509 | the arrays describing the grid point depths and vertical scale factors are three set of |
---|
510 | three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. |
---|
511 | The time at which they are defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. |
---|
512 | They are updated at each model time step using a fixed reference coordinate system which |
---|
513 | computer names have a $\_0$ suffix. |
---|
514 | When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), |
---|
515 | \textit{before}, \textit{now} and \textit{after} arrays are simply set one for all to their reference counterpart. |
---|
516 | |
---|
517 | |
---|
518 | % ------------------------------------------------------------------------------------------------------------- |
---|
519 | % Meter Bathymetry |
---|
520 | % ------------------------------------------------------------------------------------------------------------- |
---|
521 | \subsection{Meter bathymetry} |
---|
522 | \label{subsec:DOM_bathy} |
---|
523 | |
---|
524 | Three options are possible for defining the bathymetry, according to the namelist variable \np{nn\_bathy} |
---|
525 | (found in \ngn{namdom} namelist): |
---|
526 | \begin{description} |
---|
527 | \item[\np{nn\_bathy}\forcode{ = 0}]: |
---|
528 | a flat-bottom domain is defined. |
---|
529 | The total depth $z_w (jpk)$ is given by the coordinate transformation. |
---|
530 | The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}. |
---|
531 | \item[\np{nn\_bathy}\forcode{ = -1}]: |
---|
532 | a domain with a bump of topography one third of the domain width at the central latitude. |
---|
533 | This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount. |
---|
534 | \item[\np{nn\_bathy}\forcode{ = 1}]: |
---|
535 | read a bathymetry and ice shelf draft (if needed). |
---|
536 | The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at |
---|
537 | each grid point of the model grid. |
---|
538 | The bathymetry is usually built by interpolating a standard bathymetry product ($e.g.$ ETOPO2) onto |
---|
539 | the horizontal ocean mesh. |
---|
540 | Defining the bathymetry also defines the coastline: where the bathymetry is zero, |
---|
541 | no model levels are defined (all levels are masked). |
---|
542 | |
---|
543 | The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at |
---|
544 | each grid point of the model grid. |
---|
545 | This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}. |
---|
546 | Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. |
---|
547 | \end{description} |
---|
548 | |
---|
549 | When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies |
---|
550 | (e.g, great lakes, Caspian sea...) |
---|
551 | even if the model resolution does not allow their communication with the rest of the ocean. |
---|
552 | This is unnecessary when the ocean is forced by fixed atmospheric conditions, |
---|
553 | so these seas can be removed from the ocean domain. |
---|
554 | The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), |
---|
555 | but the code has to be adapted to the user's configuration. |
---|
556 | |
---|
557 | % ------------------------------------------------------------------------------------------------------------- |
---|
558 | % z-coordinate and reference coordinate transformation |
---|
559 | % ------------------------------------------------------------------------------------------------------------- |
---|
560 | \subsection[$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and ref. coordinate] |
---|
561 | {$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate} |
---|
562 | \label{subsec:DOM_zco} |
---|
563 | |
---|
564 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
565 | \begin{figure}[!tb] \begin{center} |
---|
566 | \includegraphics[width=0.90\textwidth]{Fig_zgr} |
---|
567 | \caption{ \protect\label{fig:zgr} |
---|
568 | Default vertical mesh for ORCA2: 30 ocean levels (L30). |
---|
569 | Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from |
---|
570 | \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.} |
---|
571 | \end{center} \end{figure} |
---|
572 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
573 | |
---|
574 | The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$ and $gdepw_0$ for |
---|
575 | $t$- and $w$-points, respectively. |
---|
576 | As indicated on \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the ocean surface. |
---|
577 | There are at most \jp{jpk}-1 $t$-points inside the ocean, |
---|
578 | the additional $t$-point at $jk=jpk$ is below the sea floor and is not used. |
---|
579 | The vertical location of $w$- and $t$-levels is defined from the analytic expression of the depth $z_0(k)$ whose |
---|
580 | analytical derivative with respect to $k$ provides the vertical scale factors. |
---|
581 | The user must provide the analytical expression of both $z_0$ and its first derivative with respect to $k$. |
---|
582 | This is done in routine \mdl{domzgr} through statement functions, |
---|
583 | using parameters provided in the \ngn{namcfg} namelist. |
---|
584 | |
---|
585 | It is possible to define a simple regular vertical grid by giving zero stretching (\np{ppacr=0}). |
---|
586 | In that case, |
---|
587 | the parameters \jp{jpk} (number of $w$-levels) and \np{pphmax} (total ocean depth in meters) fully define the grid. |
---|
588 | |
---|
589 | For climate-related studies it is often desirable to concentrate the vertical resolution near the ocean surface. |
---|
590 | The following function is proposed as a standard for a $z$-coordinate (with either full or partial steps): |
---|
591 | \begin{equation} \label{eq:DOM_zgr_ana_1} |
---|
592 | \begin{split} |
---|
593 | z_0 (k) &= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\ |
---|
594 | e_3^0 (k) &= \left| -h_0 -h_1 \;\tanh \left( {{(k-h_{th} )} / {h_{cr} }} \right) \right| |
---|
595 | \end{split} |
---|
596 | \end{equation} |
---|
597 | where $k=1$ to \jp{jpk} for $w$-levels and $k=1$ to $k=1$ for $T-$levels. |
---|
598 | Such an expression allows us to define a nearly uniform vertical location of levels at the ocean top and bottom with |
---|
599 | a smooth hyperbolic tangent transition in between (\autoref{fig:zgr}). |
---|
600 | |
---|
601 | If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. |
---|
602 | However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: |
---|
603 | \begin{equation} \label{eq:DOM_zgr_ana_2} |
---|
604 | \begin{split} |
---|
605 | e_3^T(k) &= z_W (k+1) - z_W (k) \\ |
---|
606 | e_3^W(k) &= z_T (k) - z_T (k-1) \\ |
---|
607 | \end{split} |
---|
608 | \end{equation} |
---|
609 | This formulation decrease the self-generated circulation into the ice shelf cavity |
---|
610 | (which can, in extreme case, leads to blow up).\\ |
---|
611 | |
---|
612 | |
---|
613 | The most used vertical grid for ORCA2 has $10~m$ ($500~m)$ resolution in the surface (bottom) layers and |
---|
614 | a depth which varies from 0 at the sea surface to a minimum of $-5000~m$. |
---|
615 | This leads to the following conditions: |
---|
616 | \begin{equation} \label{eq:DOM_zgr_coef} |
---|
617 | \begin{split} |
---|
618 | e_3 (1+1/2) &=10. \\ |
---|
619 | e_3 (jpk-1/2) &=500. \\ |
---|
620 | z(1) &=0. \\ |
---|
621 | z(jpk) &=-5000. \\ |
---|
622 | \end{split} |
---|
623 | \end{equation} |
---|
624 | |
---|
625 | With the choice of the stretching $h_{cr} =3$ and the number of levels \jp{jpk}=$31$, |
---|
626 | the four coefficients $h_{sur}$, $h_{0}$, $h_{1}$, and $h_{th}$ in |
---|
627 | \autoref{eq:DOM_zgr_ana_2} have been determined such that |
---|
628 | \autoref{eq:DOM_zgr_coef} is satisfied, through an optimisation procedure using a bisection method. |
---|
629 | For the first standard ORCA2 vertical grid this led to the following values: |
---|
630 | $h_{sur} =4762.96$, $h_0 =255.58, h_1 =245.5813$, and $h_{th} =21.43336$. |
---|
631 | The resulting depths and scale factors as a function of the model levels are shown in |
---|
632 | \autoref{fig:zgr} and given in \autoref{tab:orca_zgr}. |
---|
633 | Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. |
---|
634 | |
---|
635 | Rather than entering parameters $h_{sur}$, $h_{0}$, and $h_{1}$ directly, it is possible to recalculate them. |
---|
636 | In that case the user sets \np{ppsur}\forcode{ = }\np{ppa0}\forcode{ = }\np{ppa1}\forcode{ = 999999}., |
---|
637 | in \ngn{namcfg} namelist, and specifies instead the four following parameters: |
---|
638 | \begin{itemize} |
---|
639 | \item |
---|
640 | \np{ppacr}=$h_{cr} $: stretching factor (nondimensional). |
---|
641 | The larger \np{ppacr}, the smaller the stretching. |
---|
642 | Values from $3$ to $10$ are usual. |
---|
643 | \item |
---|
644 | \np{ppkth}=$h_{th} $: is approximately the model level at which maximum stretching occurs |
---|
645 | (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk}) |
---|
646 | \item |
---|
647 | \np{ppdzmin}: minimum thickness for the top layer (in meters). |
---|
648 | \item |
---|
649 | \np{pphmax}: total depth of the ocean (meters). |
---|
650 | \end{itemize} |
---|
651 | As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are: |
---|
652 | \jp{jpk}\forcode{ = 46}, \np{ppacr}\forcode{ = 9}, \np{ppkth}\forcode{ = 23.563}, |
---|
653 | \np{ppdzmin}\forcode{ = 6}m, \np{pphmax}\forcode{ = 5750}m. |
---|
654 | |
---|
655 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
656 | \begin{table} \begin{center} \begin{tabular}{c||r|r|r|r} |
---|
657 | \hline |
---|
658 | \textbf{LEVEL}& \textbf{gdept\_1d}& \textbf{gdepw\_1d}& \textbf{e3t\_1d }& \textbf{e3w\_1d } \\ \hline |
---|
659 | 1 & \textbf{ 5.00} & 0.00 & \textbf{ 10.00} & 10.00 \\ \hline |
---|
660 | 2 & \textbf{15.00} & 10.00 & \textbf{ 10.00} & 10.00 \\ \hline |
---|
661 | 3 & \textbf{25.00} & 20.00 & \textbf{ 10.00} & 10.00 \\ \hline |
---|
662 | 4 & \textbf{35.01} & 30.00 & \textbf{ 10.01} & 10.00 \\ \hline |
---|
663 | 5 & \textbf{45.01} & 40.01 & \textbf{ 10.01} & 10.01 \\ \hline |
---|
664 | 6 & \textbf{55.03} & 50.02 & \textbf{ 10.02} & 10.02 \\ \hline |
---|
665 | 7 & \textbf{65.06} & 60.04 & \textbf{ 10.04} & 10.03 \\ \hline |
---|
666 | 8 & \textbf{75.13} & 70.09 & \textbf{ 10.09} & 10.06 \\ \hline |
---|
667 | 9 & \textbf{85.25} & 80.18 & \textbf{ 10.17} & 10.12 \\ \hline |
---|
668 | 10 & \textbf{95.49} & 90.35 & \textbf{ 10.33} & 10.24 \\ \hline |
---|
669 | 11 & \textbf{105.97} & 100.69 & \textbf{ 10.65} & 10.47 \\ \hline |
---|
670 | 12 & \textbf{116.90} & 111.36 & \textbf{ 11.27} & 10.91 \\ \hline |
---|
671 | 13 & \textbf{128.70} & 122.65 & \textbf{ 12.47} & 11.77 \\ \hline |
---|
672 | 14 & \textbf{142.20} & 135.16 & \textbf{ 14.78} & 13.43 \\ \hline |
---|
673 | 15 & \textbf{158.96} & 150.03 & \textbf{ 19.23} & 16.65 \\ \hline |
---|
674 | 16 & \textbf{181.96} & 169.42 & \textbf{ 27.66} & 22.78 \\ \hline |
---|
675 | 17 & \textbf{216.65} & 197.37 & \textbf{ 43.26} & 34.30 \\ \hline |
---|
676 | 18 & \textbf{272.48} & 241.13 & \textbf{ 70.88} & 55.21 \\ \hline |
---|
677 | 19 & \textbf{364.30} & 312.74 & \textbf{116.11} & 90.99 \\ \hline |
---|
678 | 20 & \textbf{511.53} & 429.72 & \textbf{181.55} & 146.43 \\ \hline |
---|
679 | 21 & \textbf{732.20} & 611.89 & \textbf{261.03} & 220.35 \\ \hline |
---|
680 | 22 & \textbf{1033.22}& 872.87 & \textbf{339.39} & 301.42 \\ \hline |
---|
681 | 23 & \textbf{1405.70}& 1211.59 & \textbf{402.26} & 373.31 \\ \hline |
---|
682 | 24 & \textbf{1830.89}& 1612.98 & \textbf{444.87} & 426.00 \\ \hline |
---|
683 | 25 & \textbf{2289.77}& 2057.13 & \textbf{470.55} & 459.47 \\ \hline |
---|
684 | 26 & \textbf{2768.24}& 2527.22 & \textbf{484.95} & 478.83 \\ \hline |
---|
685 | 27 & \textbf{3257.48}& 3011.90 & \textbf{492.70} & 489.44 \\ \hline |
---|
686 | 28 & \textbf{3752.44}& 3504.46 & \textbf{496.78} & 495.07 \\ \hline |
---|
687 | 29 & \textbf{4250.40}& 4001.16 & \textbf{498.90} & 498.02 \\ \hline |
---|
688 | 30 & \textbf{4749.91}& 4500.02 & \textbf{500.00} & 499.54 \\ \hline |
---|
689 | 31 & \textbf{5250.23}& 5000.00 & \textbf{500.56} & 500.33 \\ \hline |
---|
690 | \end{tabular} \end{center} |
---|
691 | \caption{ \protect\label{tab:orca_zgr} |
---|
692 | Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from |
---|
693 | \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef}} |
---|
694 | \end{table} |
---|
695 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
696 | |
---|
697 | % ------------------------------------------------------------------------------------------------------------- |
---|
698 | % z-coordinate with partial step |
---|
699 | % ------------------------------------------------------------------------------------------------------------- |
---|
700 | \subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})} |
---|
701 | \label{subsec:DOM_zps} |
---|
702 | %--------------------------------------------namdom------------------------------------------------------- |
---|
703 | |
---|
704 | \nlst{namdom} |
---|
705 | %-------------------------------------------------------------------------------------------------------------- |
---|
706 | |
---|
707 | In $z$-coordinate partial step, |
---|
708 | the depths of the model levels are defined by the reference analytical function $z_0 (k)$ as described in |
---|
709 | the previous section, \emph{except} in the bottom layer. |
---|
710 | The thickness of the bottom layer is allowed to vary as a function of geographical location $(\lambda,\varphi)$ to |
---|
711 | allow a better representation of the bathymetry, especially in the case of small slopes |
---|
712 | (where the bathymetry varies by less than one level thickness from one grid point to the next). |
---|
713 | The reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry. |
---|
714 | With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than $e_{3t}(jk)$. |
---|
715 | The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger thickness than $e_{3t}(jpk)$: |
---|
716 | the maximum thickness allowed is $2*e_{3t}(jpk-1)$. |
---|
717 | This has to be kept in mind when specifying values in \ngn{namdom} namelist, |
---|
718 | as the maximum depth \np{pphmax} in partial steps: |
---|
719 | for example, with \np{pphmax}$=5750~m$ for the DRAKKAR 45 layer grid, |
---|
720 | the maximum ocean depth allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk-1)$ being $250~m$). |
---|
721 | Two variables in the namdom namelist are used to define the partial step vertical grid. |
---|
722 | The mimimum water thickness (in meters) allowed for a cell partially filled with bathymetry at level jk is |
---|
723 | the minimum of \np{rn\_e3zps\_min} (thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} |
---|
724 | (a fraction, usually 10\%, of the default thickness $e_{3t}(jk)$). |
---|
725 | |
---|
726 | \gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level } } |
---|
727 | |
---|
728 | % ------------------------------------------------------------------------------------------------------------- |
---|
729 | % s-coordinate |
---|
730 | % ------------------------------------------------------------------------------------------------------------- |
---|
731 | \subsection{$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})} |
---|
732 | \label{subsec:DOM_sco} |
---|
733 | %------------------------------------------nam_zgr_sco--------------------------------------------------- |
---|
734 | % |
---|
735 | %\nlst{namzgr_sco} |
---|
736 | %-------------------------------------------------------------------------------------------------------------- |
---|
737 | Options are defined in \ngn{namzgr\_sco}. |
---|
738 | In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from |
---|
739 | the product of a depth field and either a stretching function or its derivative, respectively: |
---|
740 | |
---|
741 | \begin{equation} \label{eq:DOM_sco_ana} |
---|
742 | \begin{split} |
---|
743 | z(k) &= h(i,j) \; z_0(k) \\ |
---|
744 | e_3(k) &= h(i,j) \; z_0'(k) |
---|
745 | \end{split} |
---|
746 | \end{equation} |
---|
747 | |
---|
748 | where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and |
---|
749 | $z_0(k)$ is a function which varies from $0$ at the sea surface to $1$ at the ocean bottom. |
---|
750 | The depth field $h$ is not necessary the ocean depth, |
---|
751 | since a mixed step-like and bottom-following representation of the topography can be used |
---|
752 | (\autoref{fig:z_zps_s_sps}d-e) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}f). |
---|
753 | The namelist parameter \np{rn\_rmax} determines the slope at which |
---|
754 | the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. |
---|
755 | The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as |
---|
756 | the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. |
---|
757 | |
---|
758 | Options for stretching the coordinate are provided as examples, |
---|
759 | but care must be taken to ensure that the vertical stretch used is appropriate for the application. |
---|
760 | |
---|
761 | The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true |
---|
762 | (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). |
---|
763 | This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: |
---|
764 | |
---|
765 | \begin{equation} |
---|
766 | z = s_{min}+C\left(s\right)\left(H-s_{min}\right) |
---|
767 | \label{eq:SH94_1} |
---|
768 | \end{equation} |
---|
769 | |
---|
770 | where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and |
---|
771 | allows a $z$-coordinate to placed on top of the stretched coordinate, |
---|
772 | and $z$ is the depth (negative down from the asea surface). |
---|
773 | |
---|
774 | \begin{equation} |
---|
775 | s = -\frac{k}{n-1} \quad \text{ and } \quad 0 \leq k \leq n-1 |
---|
776 | \label{eq:DOM_s} |
---|
777 | \end{equation} |
---|
778 | |
---|
779 | \begin{equation} \label{eq:DOM_sco_function} |
---|
780 | \begin{split} |
---|
781 | C(s) &= \frac{ \left[ \tanh{ \left( \theta \, (s+b) \right)} |
---|
782 | - \tanh{ \left( \theta \, b \right)} \right]} |
---|
783 | {2\;\sinh \left( \theta \right)} |
---|
784 | \end{split} |
---|
785 | \end{equation} |
---|
786 | |
---|
787 | A stretching function, |
---|
788 | modified from the commonly used \citet{Song_Haidvogel_JCP94} stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), |
---|
789 | is also available and is more commonly used for shelf seas modelling: |
---|
790 | |
---|
791 | \begin{equation} |
---|
792 | C\left(s\right) = \left(1 - b \right)\frac{ \sinh\left( \theta s\right)}{\sinh\left(\theta\right)} + \\ |
---|
793 | b\frac{ \tanh \left[ \theta \left(s + \frac{1}{2} \right)\right] - \tanh\left(\frac{\theta}{2}\right)}{ 2\tanh\left (\frac{\theta}{2}\right)} |
---|
794 | \label{eq:SH94_2} |
---|
795 | \end{equation} |
---|
796 | |
---|
797 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
798 | \begin{figure}[!ht] \begin{center} |
---|
799 | \includegraphics[width=1.0\textwidth]{Fig_sco_function} |
---|
800 | \caption{ \protect\label{fig:sco_function} |
---|
801 | Examples of the stretching function applied to a seamount; |
---|
802 | from left to right: surface, surface and bottom, and bottom intensified resolutions} |
---|
803 | \end{center} \end{figure} |
---|
804 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
805 | |
---|
806 | where $H_c$ is the critical depth (\np{rn\_hc}) at which |
---|
807 | the coordinate transitions from pure $\sigma$ to the stretched coordinate, |
---|
808 | and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and bottom control parameters such that |
---|
809 | $0\leqslant \theta \leqslant 20$, and $0\leqslant b\leqslant 1$. |
---|
810 | $b$ has been designed to allow surface and/or bottom increase of the vertical resolution |
---|
811 | (\autoref{fig:sco_function}). |
---|
812 | |
---|
813 | Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in |
---|
814 | an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}. |
---|
815 | In this case the a stretching function $\gamma$ is defined such that: |
---|
816 | |
---|
817 | \begin{equation} |
---|
818 | z = -\gamma h \quad \text{ with } \quad 0 \leq \gamma \leq 1 |
---|
819 | \label{eq:z} |
---|
820 | \end{equation} |
---|
821 | |
---|
822 | The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate: |
---|
823 | |
---|
824 | \begin{equation} \label{eq:DOM_gamma_deriv} |
---|
825 | \gamma= A\left(\sigma-\frac{1}{2}\left(\sigma^{2}+f\left(\sigma\right)\right)\right)+B\left(\sigma^{3}-f\left(\sigma\right)\right)+f\left(\sigma\right) |
---|
826 | \end{equation} |
---|
827 | |
---|
828 | Where: |
---|
829 | \begin{equation} \label{eq:DOM_gamma} |
---|
830 | f\left(\sigma\right)=\left(\alpha+2\right)\sigma^{\alpha+1}-\left(\alpha+1\right)\sigma^{\alpha+2} \quad \text{ and } \quad \sigma = \frac{k}{n-1} |
---|
831 | \end{equation} |
---|
832 | |
---|
833 | This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of |
---|
834 | the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards |
---|
835 | the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and |
---|
836 | user prescribed surface (\np{rn\_zs}) and bottom depths. |
---|
837 | The bottom cell depth in this example is given as a function of water depth: |
---|
838 | |
---|
839 | \begin{equation} \label{eq:DOM_zb} |
---|
840 | Z_b= h a + b |
---|
841 | \end{equation} |
---|
842 | |
---|
843 | where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively. |
---|
844 | |
---|
845 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
846 | \begin{figure}[!ht] |
---|
847 | \includegraphics[width=1.0\textwidth]{Fig_DOM_compare_coordinates_surface} |
---|
848 | \caption{ |
---|
849 | A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines), |
---|
850 | a 50 level $Z$-coordinate (contoured surfaces) and |
---|
851 | the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in |
---|
852 | the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. |
---|
853 | For clarity every third coordinate surface is shown.} |
---|
854 | \label{fig:fig_compare_coordinates_surface} |
---|
855 | \end{figure} |
---|
856 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
857 | |
---|
858 | This gives a smooth analytical stretching in computational space that is constrained to |
---|
859 | given specified surface and bottom grid cell thicknesses in real space. |
---|
860 | This is not to be confused with the hybrid schemes that |
---|
861 | superimpose geopotential coordinates on terrain following coordinates thus |
---|
862 | creating a non-analytical vertical coordinate that |
---|
863 | therefore may suffer from large gradients in the vertical resolutions. |
---|
864 | This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching, |
---|
865 | but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes. |
---|
866 | |
---|
867 | As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than |
---|
868 | the critical depth $h_c$. |
---|
869 | In this example two options are available in depths shallower than $h_c$, |
---|
870 | with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false |
---|
871 | (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$). |
---|
872 | |
---|
873 | Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as |
---|
874 | large slopes lead to hydrostatic consistency. |
---|
875 | A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented, |
---|
876 | and is output as part of the model mesh file at the start of the run. |
---|
877 | |
---|
878 | % ------------------------------------------------------------------------------------------------------------- |
---|
879 | % z*- or s*-coordinate |
---|
880 | % ------------------------------------------------------------------------------------------------------------- |
---|
881 | \subsection{$Z^*$- or $S^*$-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.}) } |
---|
882 | \label{subsec:DOM_zgr_star} |
---|
883 | |
---|
884 | This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site. |
---|
885 | |
---|
886 | %gm% key advantage: minimise the diffusion/dispertion associated with advection in response to high frequency surface disturbances |
---|
887 | |
---|
888 | % ------------------------------------------------------------------------------------------------------------- |
---|
889 | % level bathymetry and mask |
---|
890 | % ------------------------------------------------------------------------------------------------------------- |
---|
891 | \subsection{Level bathymetry and mask} |
---|
892 | \label{subsec:DOM_msk} |
---|
893 | |
---|
894 | Whatever the vertical coordinate used, |
---|
895 | the model offers the possibility of representing the bottom topography with steps that |
---|
896 | follow the face of the model cells (step like topography) \citep{Madec_al_JPO96}. |
---|
897 | The distribution of the steps in the horizontal is defined in a 2D integer array, mbathy, |
---|
898 | which gives the number of ocean levels ($i.e.$ those that are not masked) at each $t$-point. |
---|
899 | mbathy is computed from the meter bathymetry using the definiton of gdept as |
---|
900 | the number of $t$-points which gdept $\leq$ bathy. |
---|
901 | |
---|
902 | Modifications of the model bathymetry are performed in the \textit{bat\_ctl} routine (see \mdl{domzgr} module) after |
---|
903 | mbathy is computed. |
---|
904 | Isolated grid points that do not communicate with another ocean point at the same level are eliminated. |
---|
905 | |
---|
906 | As for the representation of bathymetry, a 2D integer array, misfdep, is created. |
---|
907 | misfdep defines the level of the first wet $t$-point. |
---|
908 | All the cells between $k=1$ and $misfdep(i,j)-1$ are masked. |
---|
909 | By default, misfdep(:,:)=1 and no cells are masked. |
---|
910 | |
---|
911 | In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into |
---|
912 | the cavities are performed in the \textit{zgr\_isf} routine. |
---|
913 | The compatibility between ice shelf draft and bathymetry is checked. |
---|
914 | All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked). |
---|
915 | If only one cell on the water column is opened at $t$-, $u$- or $v$-points, |
---|
916 | the bathymetry or the ice shelf draft is dug to fit this constrain. |
---|
917 | If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.\\ |
---|
918 | |
---|
919 | From the \textit{mbathy} and \textit{misfdep} array, the mask fields are defined as follows: |
---|
920 | \begin{align*} |
---|
921 | tmask(i,j,k) &= \begin{cases} \; 0& \text{ if $k < misfdep(i,j) $ } \\ |
---|
922 | \; 1& \text{ if $misfdep(i,j) \leq k\leq mbathy(i,j)$ } \\ |
---|
923 | \; 0& \text{ if $k > mbathy(i,j)$ } \end{cases} \\ |
---|
924 | umask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ |
---|
925 | vmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j+1,k) \\ |
---|
926 | fmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ |
---|
927 | & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ |
---|
928 | wmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1) |
---|
929 | \end{align*} |
---|
930 | |
---|
931 | Note that, without ice shelves cavities, |
---|
932 | masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}). |
---|
933 | Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) |
---|
934 | exactly in the same way as for the bottom boundary. |
---|
935 | |
---|
936 | The specification of closed lateral boundaries requires that at least |
---|
937 | the first and last rows and columns of the \textit{mbathy} array are set to zero. |
---|
938 | In the particular case of an east-west cyclical boundary condition, |
---|
939 | \textit{mbathy} has its last column equal to the second one and its first column equal to the last but one |
---|
940 | (and so too the mask arrays) (see \autoref{fig:LBC_jperio}). |
---|
941 | |
---|
942 | |
---|
943 | % ================================================================ |
---|
944 | % Domain: Initial State (dtatsd & istate) |
---|
945 | % ================================================================ |
---|
946 | \section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} |
---|
947 | \label{sec:DTA_tsd} |
---|
948 | %-----------------------------------------namtsd------------------------------------------- |
---|
949 | |
---|
950 | \nlst{namtsd} |
---|
951 | %------------------------------------------------------------------------------------------ |
---|
952 | |
---|
953 | Options are defined in \ngn{namtsd}. |
---|
954 | By default, the ocean start from rest (the velocity field is set to zero) and the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter. |
---|
955 | \begin{description} |
---|
956 | \item[\np{ln\_tsd\_init}\forcode{ = .true.}] |
---|
957 | use a T and S input files that can be given on the model grid itself or on their native input data grid. |
---|
958 | In the latter case, |
---|
959 | the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid |
---|
960 | (see \autoref{subsec:SBC_iof}). |
---|
961 | The information relative to the input files are given in the \np{sn\_tem} and \np{sn\_sal} structures. |
---|
962 | The computation is done in the \mdl{dtatsd} module. |
---|
963 | \item[\np{ln\_tsd\_init}\forcode{ = .false.}] |
---|
964 | use constant salinity value of 35.5 psu and an analytical profile of temperature (typical of the tropical ocean), |
---|
965 | see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. |
---|
966 | \end{description} |
---|
967 | \end{document} |
---|