1 | \documentclass[../main/NEMO_manual]{subfiles} |
---|
2 | |
---|
3 | \begin{document} |
---|
4 | % ================================================================ |
---|
5 | % Chapter — Lateral Boundary Condition (LBC) |
---|
6 | % ================================================================ |
---|
7 | \chapter{Lateral Boundary Condition (LBC)} |
---|
8 | \label{chap:LBC} |
---|
9 | |
---|
10 | \chaptertoc |
---|
11 | |
---|
12 | \newpage |
---|
13 | |
---|
14 | %gm% add here introduction to this chapter |
---|
15 | |
---|
16 | % ================================================================ |
---|
17 | % Boundary Condition at the Coast |
---|
18 | % ================================================================ |
---|
19 | \section[Boundary condition at the coast (\texttt{rn\_shlat})] |
---|
20 | {Boundary condition at the coast (\protect\np{rn\_shlat})} |
---|
21 | \label{sec:LBC_coast} |
---|
22 | %--------------------------------------------nam_lbc------------------------------------------------------- |
---|
23 | |
---|
24 | \nlst{namlbc} |
---|
25 | %-------------------------------------------------------------------------------------------------------------- |
---|
26 | |
---|
27 | %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt |
---|
28 | %(no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). |
---|
29 | %They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). |
---|
30 | |
---|
31 | %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, |
---|
32 | %and includes the use of a full or partial step representation of bottom topography. |
---|
33 | %The computation is performed over the whole domain, \ie\ we do not try to restrict the computation to ocean-only points. |
---|
34 | %This choice has two motivations. |
---|
35 | %Firstly, working on ocean only grid points overloads the code and harms the code readability. |
---|
36 | %Secondly, and more importantly, it drastically reduces the vector portion of the computation, |
---|
37 | %leading to a dramatic increase of CPU time requirement on vector computers. |
---|
38 | %The current section describes how the masking affects the computation of the various terms of the equations |
---|
39 | %with respect to the boundary condition at solid walls. |
---|
40 | %The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. |
---|
41 | |
---|
42 | Options are defined through the \nam{lbc} namelist variables. |
---|
43 | The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to |
---|
44 | arrays that include large portions where a computation is not required as the model variables remain at zero. |
---|
45 | Nevertheless, vectorial supercomputers are far more efficient when computing over a whole array, |
---|
46 | and the readability of a code is greatly improved when boundary conditions are applied in |
---|
47 | an automatic way rather than by a specific computation before or after each computational loop. |
---|
48 | An efficient way to work over the whole domain while specifying the boundary conditions, |
---|
49 | is to use multiplication by mask arrays in the computation. |
---|
50 | A mask array is a matrix whose elements are $1$ in the ocean domain and $0$ elsewhere. |
---|
51 | A simple multiplication of a variable by its own mask ensures that it will remain zero over land areas. |
---|
52 | Since most of the boundary conditions consist of a zero flux across the solid boundaries, |
---|
53 | they can be simply applied by multiplying variables by the correct mask arrays, |
---|
54 | \ie\ the mask array of the grid point where the flux is evaluated. |
---|
55 | For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points. |
---|
56 | Evaluating this quantity as, |
---|
57 | |
---|
58 | \[ |
---|
59 | % \label{eq:lbc_aaaa} |
---|
60 | \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} |
---|
61 | }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u |
---|
62 | \] |
---|
63 | (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and |
---|
64 | at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points |
---|
65 | (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). |
---|
66 | |
---|
67 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
68 | \begin{figure}[!t] |
---|
69 | \begin{center} |
---|
70 | \includegraphics[width=\textwidth]{Fig_LBC_uv} |
---|
71 | \caption{ |
---|
72 | \protect\label{fig:LBC_uv} |
---|
73 | Lateral boundary (thick line) at T-level. |
---|
74 | The velocity normal to the boundary is set to zero. |
---|
75 | } |
---|
76 | \end{center} |
---|
77 | \end{figure} |
---|
78 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
79 | |
---|
80 | For momentum the situation is a bit more complex as two boundary conditions must be provided along the coast |
---|
81 | (one each for the normal and tangential velocities). |
---|
82 | The boundary of the ocean in the C-grid is defined by the velocity-faces. |
---|
83 | For example, at a given $T$-level, |
---|
84 | the lateral boundary (a coastline or an intersection with the bottom topography) is made of |
---|
85 | segments joining $f$-points, and normal velocity points are located between two $f-$points (\autoref{fig:LBC_uv}). |
---|
86 | The boundary condition on the normal velocity (no flux through solid boundaries) |
---|
87 | can thus be easily implemented using the mask system. |
---|
88 | The boundary condition on the tangential velocity requires a more specific treatment. |
---|
89 | This boundary condition influences the relative vorticity and momentum diffusive trends, |
---|
90 | and is required in order to compute the vorticity at the coast. |
---|
91 | Four different types of lateral boundary condition are available, |
---|
92 | controlled by the value of the \np{rn\_shlat} namelist parameter |
---|
93 | (The value of the mask$_{f}$ array along the coastline is set equal to this parameter). |
---|
94 | These are: |
---|
95 | |
---|
96 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
97 | \begin{figure}[!p] |
---|
98 | \begin{center} |
---|
99 | \includegraphics[width=\textwidth]{Fig_LBC_shlat} |
---|
100 | \caption{ |
---|
101 | \protect\label{fig:LBC_shlat} |
---|
102 | lateral boundary condition |
---|
103 | (a) free-slip ($rn\_shlat=0$); |
---|
104 | (b) no-slip ($rn\_shlat=2$); |
---|
105 | (c) "partial" free-slip ($0<rn\_shlat<2$) and |
---|
106 | (d) "strong" no-slip ($2<rn\_shlat$). |
---|
107 | Implied "ghost" velocity inside land area is display in grey. |
---|
108 | } |
---|
109 | \end{center} |
---|
110 | \end{figure} |
---|
111 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
112 | |
---|
113 | \begin{description} |
---|
114 | |
---|
115 | \item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at |
---|
116 | the coastline is equal to the offshore velocity, |
---|
117 | \ie\ the normal derivative of the tangential velocity is zero at the coast, |
---|
118 | so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast |
---|
119 | (\autoref{fig:LBC_shlat}-a). |
---|
120 | |
---|
121 | \item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}):] the tangential velocity vanishes at the coastline. |
---|
122 | Assuming that the tangential velocity decreases linearly from |
---|
123 | the closest ocean velocity grid point to the coastline, |
---|
124 | the normal derivative is evaluated as if the velocities at the closest land velocity gridpoint and |
---|
125 | the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction |
---|
126 | (\autoref{fig:LBC_shlat}-b). |
---|
127 | Therefore, the vorticity along the coastlines is given by: |
---|
128 | |
---|
129 | \[ |
---|
130 | \zeta \equiv 2 \left(\delta_{i+1/2} \left[e_{2v} v \right] - \delta_{j+1/2} \left[e_{1u} u \right] \right) / \left(e_{1f} e_{2f} \right) \ , |
---|
131 | \] |
---|
132 | where $u$ and $v$ are masked fields. |
---|
133 | Setting the mask$_{f}$ array to $2$ along the coastline provides a vorticity field computed with |
---|
134 | the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : |
---|
135 | \[ |
---|
136 | % \label{eq:lbc_bbbb} |
---|
137 | \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2} |
---|
138 | \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]} |
---|
139 | \right)\;\mbox{mask}_f |
---|
140 | \] |
---|
141 | |
---|
142 | \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at |
---|
143 | the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but |
---|
144 | not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). |
---|
145 | This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. |
---|
146 | |
---|
147 | \item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}):] the viscous boundary layer is assumed to |
---|
148 | be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). |
---|
149 | The friction is thus larger than in the no-slip case. |
---|
150 | |
---|
151 | \end{description} |
---|
152 | |
---|
153 | Note that when the bottom topography is entirely represented by the $s$-coor-dinates (pure $s$-coordinate), |
---|
154 | the lateral boundary condition on tangential velocity is of much less importance as |
---|
155 | it is only applied next to the coast where the minimum water depth can be quite shallow. |
---|
156 | |
---|
157 | |
---|
158 | % ================================================================ |
---|
159 | % Boundary Condition around the Model Domain |
---|
160 | % ================================================================ |
---|
161 | \section[Model domain boundary condition (\texttt{jperio})] |
---|
162 | {Model domain boundary condition (\protect\jp{jperio})} |
---|
163 | \label{sec:LBC_jperio} |
---|
164 | |
---|
165 | At the model domain boundaries several choices are offered: |
---|
166 | closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or |
---|
167 | bi-cyclic east-west and north-fold. |
---|
168 | The north-fold boundary condition is associated with the 3-pole ORCA mesh. |
---|
169 | |
---|
170 | % ------------------------------------------------------------------------------------------------------------- |
---|
171 | % Closed, cyclic (\jp{jperio}\forcode{ = 0..2}) |
---|
172 | % ------------------------------------------------------------------------------------------------------------- |
---|
173 | \subsection[Closed, cyclic (\forcode{jperio = [0127]})] |
---|
174 | {Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})} |
---|
175 | \label{subsec:LBC_jperio012} |
---|
176 | |
---|
177 | The choice of closed or cyclic model domain boundary condition is made by |
---|
178 | setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}. |
---|
179 | Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. |
---|
180 | The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, |
---|
181 | \ie\ in the model interior. |
---|
182 | To choose a lateral model boundary condition is to specify the first and last rows and columns of |
---|
183 | the model variables. |
---|
184 | |
---|
185 | \begin{description} |
---|
186 | |
---|
187 | \item[For closed boundary (\jp{jperio}\forcode{ = 0})], |
---|
188 | solid walls are imposed at all model boundaries: |
---|
189 | first and last rows and columns are set to zero. |
---|
190 | |
---|
191 | \item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})], |
---|
192 | first and last rows are set to zero (closed) whilst the first column is set to |
---|
193 | the value of the last-but-one column and the last column to the value of the second one |
---|
194 | (\autoref{fig:LBC_jperio}-a). |
---|
195 | Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. |
---|
196 | |
---|
197 | \item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})], |
---|
198 | first and last columns are set to zero (closed) whilst the first row is set to |
---|
199 | the value of the last-but-one row and the last row to the value of the second one |
---|
200 | (\autoref{fig:LBC_jperio}-a). |
---|
201 | Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. |
---|
202 | |
---|
203 | \item[Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ = 7})] combines cases 1 and 2. |
---|
204 | |
---|
205 | \end{description} |
---|
206 | |
---|
207 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
208 | \begin{figure}[!t] |
---|
209 | \begin{center} |
---|
210 | \includegraphics[width=\textwidth]{Fig_LBC_jperio} |
---|
211 | \caption{ |
---|
212 | \protect\label{fig:LBC_jperio} |
---|
213 | setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions. |
---|
214 | } |
---|
215 | \end{center} |
---|
216 | \end{figure} |
---|
217 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
218 | |
---|
219 | % ------------------------------------------------------------------------------------------------------------- |
---|
220 | % North fold (\textit{jperio = 3 }to $6)$ |
---|
221 | % ------------------------------------------------------------------------------------------------------------- |
---|
222 | \subsection[North-fold (\forcode{jperio = [3-6]})] |
---|
223 | {North-fold (\protect\jp{jperio}\forcode{ = [3-6]})} |
---|
224 | \label{subsec:LBC_north_fold} |
---|
225 | |
---|
226 | The north fold boundary condition has been introduced in order to handle the north boundary of |
---|
227 | a three-polar ORCA grid. |
---|
228 | Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, |
---|
229 | and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. |
---|
230 | Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. |
---|
231 | |
---|
232 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
233 | \begin{figure}[!t] |
---|
234 | \begin{center} |
---|
235 | \includegraphics[width=\textwidth]{Fig_North_Fold_T} |
---|
236 | \caption{ |
---|
237 | \protect\label{fig:North_Fold_T} |
---|
238 | North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), |
---|
239 | as used in ORCA 2, 1/4, and 1/12. |
---|
240 | Pink shaded area corresponds to the inner domain mask (see text). |
---|
241 | } |
---|
242 | \end{center} |
---|
243 | \end{figure} |
---|
244 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
245 | |
---|
246 | % ==================================================================== |
---|
247 | % Exchange with neighbouring processors |
---|
248 | % ==================================================================== |
---|
249 | \section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})] |
---|
250 | {Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} |
---|
251 | \label{sec:LBC_mpp} |
---|
252 | |
---|
253 | For massively parallel processing (mpp), a domain decomposition method is used. |
---|
254 | The basic idea of the method is to split the large computation domain of a numerical experiment into |
---|
255 | several smaller domains and solve the set of equations by addressing independent local problems. |
---|
256 | Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. |
---|
257 | The subdomain boundary conditions are specified through communications between processors which |
---|
258 | are organized by explicit statements (message passing method). |
---|
259 | |
---|
260 | A big advantage is that the method does not need many modifications of the initial \fortran code. |
---|
261 | From the modeller's point of view, each sub domain running on a processor is identical to the "mono-domain" code. |
---|
262 | In addition, the programmer manages the communications between subdomains, |
---|
263 | and the code is faster when the number of processors is increased. |
---|
264 | The porting of OPA code on an iPSC860 was achieved during Guyon's PhD [Guyon et al. 1994, 1995] |
---|
265 | in collaboration with CETIIS and ONERA. |
---|
266 | The implementation in the operational context and the studies of performance on |
---|
267 | a T3D and T3E Cray computers have been made in collaboration with IDRIS and CNRS. |
---|
268 | The present implementation is largely inspired by Guyon's work [Guyon 1995]. |
---|
269 | |
---|
270 | The parallelization strategy is defined by the physical characteristics of the ocean model. |
---|
271 | Second order finite difference schemes lead to local discrete operators that |
---|
272 | depend at the very most on one neighbouring point. |
---|
273 | The only non-local computations concern the vertical physics |
---|
274 | (implicit diffusion, turbulent closure scheme, ...) (delocalization over the whole water column), |
---|
275 | and the solving of the elliptic equation associated with the surface pressure gradient computation |
---|
276 | (delocalization over the whole horizontal domain). |
---|
277 | Therefore, a pencil strategy is used for the data sub-structuration: |
---|
278 | the 3D initial domain is laid out on local processor memories following a 2D horizontal topological splitting. |
---|
279 | Each sub-domain computes its own surface and bottom boundary conditions and |
---|
280 | has a side wall overlapping interface which defines the lateral boundary conditions for |
---|
281 | computations in the inner sub-domain. |
---|
282 | The overlapping area consists of the two rows at each edge of the sub-domain. |
---|
283 | After a computation, a communication phase starts: |
---|
284 | each processor sends to its neighbouring processors the update values of the points corresponding to |
---|
285 | the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). |
---|
286 | The communication is done through the Message Passing Interface (MPI). |
---|
287 | The data exchanges between processors are required at the very place where |
---|
288 | lateral domain boundary conditions are set in the mono-domain computation: |
---|
289 | the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with |
---|
290 | routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined). |
---|
291 | It has to be pointed out that when using the MPP version of the model, |
---|
292 | the east-west cyclic boundary condition is done implicitly, |
---|
293 | whilst the south-symmetric boundary condition option is not available. |
---|
294 | |
---|
295 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
296 | \begin{figure}[!t] |
---|
297 | \begin{center} |
---|
298 | \includegraphics[width=\textwidth]{Fig_mpp} |
---|
299 | \caption{ |
---|
300 | \protect\label{fig:mpp} |
---|
301 | Positioning of a sub-domain when massively parallel processing is used. |
---|
302 | } |
---|
303 | \end{center} |
---|
304 | \end{figure} |
---|
305 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
306 | |
---|
307 | In the standard version of \NEMO, the splitting is regular and arithmetic. |
---|
308 | The i-axis is divided by \jp{jpni} and |
---|
309 | the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ |
---|
310 | (parameters set in \nam{mpp} namelist). |
---|
311 | Each processor is independent and without message passing or synchronous process, |
---|
312 | programs run alone and access just its own local memory. |
---|
313 | For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that |
---|
314 | are named \jp{jpi}, \jp{jpj}, \jp{jpk}. |
---|
315 | These dimensions include the internal domain and the overlapping rows. |
---|
316 | The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). |
---|
317 | The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. |
---|
318 | The relationship between the whole domain and a sub-domain is: |
---|
319 | \[ |
---|
320 | jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci |
---|
321 | jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj |
---|
322 | \] |
---|
323 | where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. |
---|
324 | |
---|
325 | One also defines variables nldi and nlei which correspond to the internal domain bounds, |
---|
326 | and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. |
---|
327 | An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, |
---|
328 | a global array (whole domain) by the relationship: |
---|
329 | \[ |
---|
330 | % \label{eq:lbc_nimpp} |
---|
331 | T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), |
---|
332 | \] |
---|
333 | with $1 \leq i \leq jpi$, $1 \leq j \leq jpj $ , and $1 \leq k \leq jpk$. |
---|
334 | |
---|
335 | Processors are numbered from 0 to $jpnij-1$, the number is saved in the variable nproc. |
---|
336 | In the standard version, a processor has no more than |
---|
337 | four neighbouring processors named nono (for north), noea (east), noso (south) and nowe (west) and |
---|
338 | two variables, nbondi and nbondj, indicate the relative position of the processor: |
---|
339 | \begin{itemize} |
---|
340 | \item nbondi = -1 an east neighbour, no west processor, |
---|
341 | \item nbondi = 0 an east neighbour, a west neighbour, |
---|
342 | \item nbondi = 1 no east processor, a west neighbour, |
---|
343 | \item nbondi = 2 no splitting following the i-axis. |
---|
344 | \end{itemize} |
---|
345 | During the simulation, processors exchange data with their neighbours. |
---|
346 | If there is effectively a neighbour, the processor receives variables from this processor on its overlapping row, |
---|
347 | and sends the data issued from internal domain corresponding to the overlapping row of the other processor. |
---|
348 | |
---|
349 | |
---|
350 | The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). |
---|
351 | It is easily readable and very efficient in the context of a computer with vectorial architecture. |
---|
352 | However, in the case of a scalar processor, computations over the land regions become more expensive in |
---|
353 | terms of CPU time. |
---|
354 | It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where |
---|
355 | more than 50 \% of points are land points. |
---|
356 | For this reason, a pre-processing tool can be used to choose the mpp domain decomposition with a maximum number of |
---|
357 | only land points processors, which can then be eliminated (\autoref{fig:mppini2}) |
---|
358 | (For example, the mpp\_optimiz tools, available from the DRAKKAR web site). |
---|
359 | This optimisation is dependent on the specific bathymetry employed. |
---|
360 | The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, |
---|
361 | leading to the elimination of $jpni \times jpnj - jpnij$ land processors. |
---|
362 | When those parameters are specified in \nam{mpp} namelist, |
---|
363 | the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that |
---|
364 | the land-only processors are not taken into account. |
---|
365 | |
---|
366 | \gmcomment{Note that the inimpp2 routine is general so that the original inimpp |
---|
367 | routine should be suppressed from the code.} |
---|
368 | |
---|
369 | When land processors are eliminated, |
---|
370 | the value corresponding to these locations in the model output files is undefined. |
---|
371 | Note that this is a problem for the meshmask file which requires to be defined over the whole domain. |
---|
372 | Therefore, user should not eliminate land processors when creating a meshmask file |
---|
373 | (\ie\ when setting a non-zero value to \np{nn\_msh}). |
---|
374 | |
---|
375 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
376 | \begin{figure}[!ht] |
---|
377 | \begin{center} |
---|
378 | \includegraphics[width=\textwidth]{Fig_mppini2} |
---|
379 | \caption { |
---|
380 | \protect\label{fig:mppini2} |
---|
381 | Example of Atlantic domain defined for the CLIPPER projet. |
---|
382 | Initial grid is composed of 773 x 1236 horizontal points. |
---|
383 | (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). |
---|
384 | 52 subdomains are land areas. |
---|
385 | (b) 52 subdomains are eliminated (white rectangles) and |
---|
386 | the resulting number of processors really used during the computation is jpnij=128. |
---|
387 | } |
---|
388 | \end{center} |
---|
389 | \end{figure} |
---|
390 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
391 | |
---|
392 | |
---|
393 | % ==================================================================== |
---|
394 | % Unstructured open boundaries BDY |
---|
395 | % ==================================================================== |
---|
396 | \section{Unstructured open boundary conditions (BDY)} |
---|
397 | \label{sec:LBC_bdy} |
---|
398 | |
---|
399 | %-----------------------------------------nambdy-------------------------------------------- |
---|
400 | |
---|
401 | \nlst{nambdy} |
---|
402 | %----------------------------------------------------------------------------------------------- |
---|
403 | %-----------------------------------------nambdy_dta-------------------------------------------- |
---|
404 | |
---|
405 | \nlst{nambdy_dta} |
---|
406 | %----------------------------------------------------------------------------------------------- |
---|
407 | |
---|
408 | Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables. |
---|
409 | The BDY module is the core implementation of open boundary conditions for regional configurations on |
---|
410 | temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses). |
---|
411 | |
---|
412 | The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and |
---|
413 | a similar coding structure \citep{chanut_rpt05}. |
---|
414 | The specification of the location of the open boundary is completely flexible and |
---|
415 | allows for example the open boundary to follow an isobath or other irregular contour. |
---|
416 | Boundary data files used with versions of \NEMO\ prior to Version 3.4 may need to be re-ordered to work with this version. |
---|
417 | See the section on the Input Boundary Data Files for details. |
---|
418 | |
---|
419 | %---------------------------------------------- |
---|
420 | \subsection{Namelists} |
---|
421 | \label{subsec:BDY_namelist} |
---|
422 | |
---|
423 | The BDY module is activated by setting \np{ln\_bdy}\forcode{ = .true.} . |
---|
424 | It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set. |
---|
425 | The number of boundary sets is defined by \np{nb\_bdy}. |
---|
426 | Each boundary set may be defined as a set of straight line segments in a namelist |
---|
427 | (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). |
---|
428 | If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set. |
---|
429 | If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. |
---|
430 | The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. |
---|
431 | In the example above, there are two boundary sets, the first of which is defined via a file and |
---|
432 | the second is defined in a namelist. |
---|
433 | For more details of the definition of the boundary geometry see section \autoref{subsec:BDY_geometry}. |
---|
434 | |
---|
435 | For each boundary set a boundary condition has to be chosen for the barotropic solution |
---|
436 | (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), |
---|
437 | for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice''). |
---|
438 | For each set of variables there is a choice of algorithm and a choice for the data, |
---|
439 | eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ |
---|
440 | |
---|
441 | The choice of algorithm is currently as follows: |
---|
442 | |
---|
443 | \begin{description} |
---|
444 | \item[\forcode{'none'}:] No boundary condition applied. |
---|
445 | So the solution will ``see'' the land points around the edge of the edge of the domain. |
---|
446 | \item[\forcode{'specified'}:] Specified boundary condition applied (only available for baroclinic velocity and tracer variables). |
---|
447 | \item[\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables. |
---|
448 | \item[\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables. |
---|
449 | \item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. |
---|
450 | \item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. |
---|
451 | \item[\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only. |
---|
452 | \end{description} |
---|
453 | |
---|
454 | The main choice for the boundary data is to use initial conditions as boundary data |
---|
455 | (\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). |
---|
456 | In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), |
---|
457 | the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. } |
---|
458 | For the barotropic solution there is also the option to use tidal harmonic forcing either by |
---|
459 | itself (\np{nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\ |
---|
460 | Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. |
---|
461 | |
---|
462 | If external boundary data is required then the \nam{bdy\_dta} namelist must be defined. |
---|
463 | One \nam{bdy\_dta} namelist is required for each boundary set in the order in which |
---|
464 | the boundary sets are defined in nambdy. |
---|
465 | In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above |
---|
466 | and the second one is using data from intial condition (no namelist bloc needed). |
---|
467 | The boundary data is read in using the fldread module, |
---|
468 | so the \nam{bdy\_dta} namelist is in the format required for fldread. |
---|
469 | For each variable required, the filename, the frequency of the files and |
---|
470 | the frequency of the data in the files is given. |
---|
471 | Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.\\ |
---|
472 | |
---|
473 | There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. |
---|
474 | If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. |
---|
475 | However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, |
---|
476 | a bilinear interpolation onto the native grid will be triggered at runtime. |
---|
477 | For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. |
---|
478 | These correspond to the depths and scale factors of the input data, |
---|
479 | the latter used to make any adjustment to the velocity fields due to differences in the total water depths between the two vertical grids.\\ |
---|
480 | |
---|
481 | In the example namelists given, two boundary sets are defined. |
---|
482 | The first set is defined via a file and applies FRS conditions to temperature and salinity and |
---|
483 | Flather conditions to the barotropic variables. No condition specified for the baroclinic velocity and sea-ice. |
---|
484 | External data is provided in daily files (from a large-scale model). |
---|
485 | Tidal harmonic forcing is also used. |
---|
486 | The second set is defined in a namelist. |
---|
487 | FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. |
---|
488 | |
---|
489 | %---------------------------------------------- |
---|
490 | \subsection{Flow relaxation scheme} |
---|
491 | \label{subsec:BDY_FRS_scheme} |
---|
492 | |
---|
493 | The Flow Relaxation Scheme (FRS) \citep{davies_QJRMS76,engedahl_T95}, |
---|
494 | applies a simple relaxation of the model fields to externally-specified values over |
---|
495 | a zone next to the edge of the model domain. |
---|
496 | Given a model prognostic variable $\Phi$ |
---|
497 | \[ |
---|
498 | % \label{eq:bdy_frs1} |
---|
499 | \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N |
---|
500 | \] |
---|
501 | where $\Phi_{m}$ is the model solution and $\Phi_{e}$ is the specified external field, |
---|
502 | $d$ gives the discrete distance from the model boundary and |
---|
503 | $\alpha$ is a parameter that varies from $1$ at $d=1$ to a small value at $d=N$. |
---|
504 | It can be shown that this scheme is equivalent to adding a relaxation term to |
---|
505 | the prognostic equation for $\Phi$ of the form: |
---|
506 | \[ |
---|
507 | % \label{eq:bdy_frs2} |
---|
508 | -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) |
---|
509 | \] |
---|
510 | where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: |
---|
511 | \[ |
---|
512 | % \label{eq:bdy_frs3} |
---|
513 | \tau = \frac{1-\alpha}{\alpha} \,\rdt |
---|
514 | \] |
---|
515 | Thus the model solution is completely prescribed by the external conditions at the edge of the model domain and |
---|
516 | is relaxed towards the external conditions over the rest of the FRS zone. |
---|
517 | The application of a relaxation zone helps to prevent spurious reflection of |
---|
518 | outgoing signals from the model boundary. |
---|
519 | |
---|
520 | The function $\alpha$ is specified as a $tanh$ function: |
---|
521 | \[ |
---|
522 | % \label{eq:bdy_frs4} |
---|
523 | \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N |
---|
524 | \] |
---|
525 | The width of the FRS zone is specified in the namelist as \np{nn\_rimwidth}. |
---|
526 | This is typically set to a value between 8 and 10. |
---|
527 | |
---|
528 | %---------------------------------------------- |
---|
529 | \subsection{Flather radiation scheme} |
---|
530 | \label{subsec:BDY_flather_scheme} |
---|
531 | |
---|
532 | The \citet{flather_JPO94} scheme is a radiation condition on the normal, |
---|
533 | depth-mean transport across the open boundary. |
---|
534 | It takes the form |
---|
535 | \begin{equation} \label{eq:bdy_fla1} |
---|
536 | U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), |
---|
537 | \end{equation} |
---|
538 | where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height, |
---|
539 | both from the model. |
---|
540 | The subscript $e$ indicates the same fields from external sources. |
---|
541 | The speed of external gravity waves is given by $c = \sqrt{gh}$, and $h$ is the depth of the water column. |
---|
542 | The depth-mean normal velocity along the edge of the model domain is set equal to |
---|
543 | the external depth-mean normal velocity, |
---|
544 | plus a correction term that allows gravity waves generated internally to exit the model boundary. |
---|
545 | Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, |
---|
546 | so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. |
---|
547 | $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. |
---|
548 | |
---|
549 | %---------------------------------------------- |
---|
550 | \subsection{Orlanski radiation scheme} |
---|
551 | \label{subsec:BDY_orlanski_scheme} |
---|
552 | |
---|
553 | The Orlanski scheme is based on the algorithm described by \citep{marchesiello.mcwilliams.ea_OM01}, hereafter MMS. |
---|
554 | |
---|
555 | The adaptive Orlanski condition solves a wave plus relaxation equation at the boundary: |
---|
556 | \begin{equation} |
---|
557 | \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = |
---|
558 | -\frac{1}{\tau}(\phi - \phi^{ext}) |
---|
559 | \label{eq:wave_continuous} |
---|
560 | \end{equation} |
---|
561 | |
---|
562 | where $\phi$ is the model field, $x$ and $y$ refer to the normal and tangential directions to the boundary respectively, and the phase |
---|
563 | velocities are diagnosed from the model fields as: |
---|
564 | |
---|
565 | \begin{equation} \label{eq:cx} |
---|
566 | c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} |
---|
567 | \end{equation} |
---|
568 | \begin{equation} |
---|
569 | \label{eq:cy} |
---|
570 | c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} |
---|
571 | \end{equation} |
---|
572 | |
---|
573 | (As noted by MMS, this is a circular diagnosis of the phase speeds which only makes sense on a discrete grid). |
---|
574 | Equation (\autoref{eq:wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$. |
---|
575 | For $c_x$ outward, we have |
---|
576 | |
---|
577 | \begin{equation} |
---|
578 | \tau = \tau_{out} |
---|
579 | \end{equation} |
---|
580 | |
---|
581 | For $c_x$ inward, the radiation equation is not applied: |
---|
582 | |
---|
583 | \begin{equation} |
---|
584 | \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 |
---|
585 | \label{eq:tau_in} |
---|
586 | \end{equation} |
---|
587 | |
---|
588 | Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation |
---|
589 | points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. |
---|
590 | See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ |
---|
591 | The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming |
---|
592 | that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including |
---|
593 | this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations |
---|
594 | (\autoref{eq:wave_continuous}) - (\autoref{eq:tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\ |
---|
595 | |
---|
596 | %---------------------------------------------- |
---|
597 | \subsection{Relaxation at the boundary} |
---|
598 | \label{subsec:BDY_relaxation} |
---|
599 | |
---|
600 | In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. |
---|
601 | It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set. |
---|
602 | |
---|
603 | The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. |
---|
604 | This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$): |
---|
605 | |
---|
606 | \[ |
---|
607 | \alpha = \frac{1}{\tau}(\frac{N+1-d}{N})^2, \quad d=1,N |
---|
608 | \] |
---|
609 | |
---|
610 | The same scaling is applied in the Orlanski damping. |
---|
611 | |
---|
612 | %---------------------------------------------- |
---|
613 | \subsection{Boundary geometry} |
---|
614 | \label{subsec:BDY_geometry} |
---|
615 | |
---|
616 | Each open boundary set is defined as a list of points. |
---|
617 | The information is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ structure. |
---|
618 | The $nbi$ and $nbj$ arrays define the local $(i,j)$ indices of each point in the boundary zone and |
---|
619 | the $nbr$ array defines the discrete distance from the boundary with $nbr=1$ meaning that |
---|
620 | the point is next to the edge of the model domain and $nbr>1$ showing that |
---|
621 | the point is increasingly further away from the edge of the model domain. |
---|
622 | A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. |
---|
623 | Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. |
---|
624 | |
---|
625 | The boundary geometry for each set may be defined in a namelist nambdy\_index or |
---|
626 | by reading in a ``\ifile{coordinates.bdy}'' file. |
---|
627 | The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries. |
---|
628 | One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes. |
---|
629 | For the northern boundary, \texttt{nbdysegn} gives the number of segments, |
---|
630 | \jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and |
---|
631 | \jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. |
---|
632 | These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). |
---|
633 | The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{ > 1}. |
---|
634 | |
---|
635 | The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. |
---|
636 | Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file. |
---|
637 | The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. |
---|
638 | The arrays must be in order of increasing $nbr$. |
---|
639 | Note that the $nbi$, $nbj$ values in the file are global values and are converted to local values in the code. |
---|
640 | Typically this file will be used to generate external boundary data via interpolation and so |
---|
641 | will also contain the latitudes and longitudes of each point as shown. |
---|
642 | However, this is not necessary to run the model. |
---|
643 | |
---|
644 | For some choices of irregular boundary the model domain may contain areas of ocean which |
---|
645 | are not part of the computational domain. |
---|
646 | For example if an open boundary is defined along an isobath, say at the shelf break, |
---|
647 | then the areas of ocean outside of this boundary will need to be masked out. |
---|
648 | This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist. |
---|
649 | Only one mask file is used even if multiple boundary sets are defined. |
---|
650 | |
---|
651 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
652 | \begin{figure}[!t] |
---|
653 | \begin{center} |
---|
654 | \includegraphics[width=\textwidth]{Fig_LBC_bdy_geom} |
---|
655 | \caption { |
---|
656 | \protect\label{fig:LBC_bdy_geom} |
---|
657 | Example of geometry of unstructured open boundary |
---|
658 | } |
---|
659 | \end{center} |
---|
660 | \end{figure} |
---|
661 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
662 | |
---|
663 | %---------------------------------------------- |
---|
664 | \subsection{Input boundary data files} |
---|
665 | \label{subsec:BDY_data} |
---|
666 | |
---|
667 | The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays. |
---|
668 | The data arrays are dimensioned on: |
---|
669 | a time dimension; |
---|
670 | $xb$ which is the index of the boundary data point in the horizontal; |
---|
671 | and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard \NEMO\ I/O routines. |
---|
672 | The 3D fields also have a depth dimension. |
---|
673 | |
---|
674 | From Version 3.4 there are new restrictions on the order in which the boundary points are defined |
---|
675 | (and therefore restrictions on the order of the data in the file). |
---|
676 | In particular: |
---|
677 | |
---|
678 | \begin{enumerate} |
---|
679 | \item The data points must be in order of increasing $nbr$, |
---|
680 | ie. all the $nbr=1$ points, then all the $nbr=2$ points etc. |
---|
681 | \item All the data for a particular boundary set must be in the same order. |
---|
682 | (Prior to 3.4 it was possible to define barotropic data in a different order to |
---|
683 | the data for tracers and baroclinic velocities). |
---|
684 | \end{enumerate} |
---|
685 | |
---|
686 | These restrictions mean that data files used with versions of the |
---|
687 | model prior to Version 3.4 may not work with Version 3.4 onwards. |
---|
688 | A \fortran utility {\itshape bdy\_reorder} exists in the TOOLS directory which |
---|
689 | will re-order the data in old BDY data files. |
---|
690 | |
---|
691 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
692 | \begin{figure}[!t] |
---|
693 | \begin{center} |
---|
694 | \includegraphics[width=\textwidth]{Fig_LBC_nc_header} |
---|
695 | \caption { |
---|
696 | \protect\label{fig:LBC_nc_header} |
---|
697 | Example of the header for a \protect\ifile{coordinates.bdy} file |
---|
698 | } |
---|
699 | \end{center} |
---|
700 | \end{figure} |
---|
701 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
702 | |
---|
703 | %---------------------------------------------- |
---|
704 | \subsection{Volume correction} |
---|
705 | \label{subsec:BDY_vol_corr} |
---|
706 | |
---|
707 | There is an option to force the total volume in the regional model to be constant. |
---|
708 | This is controlled by the \np{ln\_vol} parameter in the namelist. |
---|
709 | A value of \np{ln\_vol}\forcode{ = .false.} indicates that this option is not used. |
---|
710 | Two options to control the volume are available (\np{nn\_volctl}). |
---|
711 | If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at |
---|
712 | each timestep to ensure that the integrated volume flow through the boundary is zero. |
---|
713 | If \np{nn\_volctl}\forcode{ = 1} then the calculation of the volume change on |
---|
714 | the timestep includes the change due to the freshwater flux across the surface and |
---|
715 | the correction velocity corrects for this as well. |
---|
716 | |
---|
717 | If more than one boundary set is used then volume correction is |
---|
718 | applied to all boundaries at once. |
---|
719 | |
---|
720 | %---------------------------------------------- |
---|
721 | \subsection{Tidal harmonic forcing} |
---|
722 | \label{subsec:BDY_tides} |
---|
723 | |
---|
724 | %-----------------------------------------nambdy_tide-------------------------------------------- |
---|
725 | |
---|
726 | \nlst{nambdy_tide} |
---|
727 | %----------------------------------------------------------------------------------------------- |
---|
728 | |
---|
729 | Tidal forcing at open boundaries requires the activation of surface |
---|
730 | tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to |
---|
731 | \forcode{.true.} and the required constituents need to be activated by |
---|
732 | including their names in the \np{clname} array; see |
---|
733 | \autoref{sec:SBC_tide}). Specific options related to the reading in of |
---|
734 | the complex harmonic amplitudes of elevation (SSH) and barotropic |
---|
735 | velocity (u,v) at open boundaries are defined through the |
---|
736 | \nam{bdy\_tide} namelist parameters.\\ |
---|
737 | |
---|
738 | The tidal harmonic data at open boundaries can be specified in two |
---|
739 | different ways, either on a two-dimensional grid covering the entire |
---|
740 | model domain or along open boundary segments; these two variants can |
---|
741 | be selected by setting \np{ln\_bdytide\_2ddta } to \forcode{.true.} or |
---|
742 | \forcode{.false.}, respectively. In either case, the real and |
---|
743 | imaginary parts of SSH and the two barotropic velocity components for |
---|
744 | each activated tidal constituent \textit{tcname} have to be provided |
---|
745 | separately: when two-dimensional data is used, variables |
---|
746 | \textit{tcname\_z1} and \textit{tcname\_z2} for real and imaginary SSH, |
---|
747 | respectively, are expected in input file \np{filtide} with suffix |
---|
748 | \ifile{\_grid\_T}, variables \textit{tcname\_u1} and |
---|
749 | \textit{tcname\_u2} for real and imaginary u, respectively, are |
---|
750 | expected in input file \np{filtide} with suffix \ifile{\_grid\_U}, and |
---|
751 | \textit{tcname\_v1} and \textit{tcname\_v2} for real and imaginary v, |
---|
752 | respectively, are expected in input file \np{filtide} with suffix |
---|
753 | \ifile{\_grid\_V}; when data along open boundary segments is used, |
---|
754 | variables \textit{z1} and \textit{z2} (real and imaginary part of SSH) |
---|
755 | are expected to be available from file \np{filtide} with suffix |
---|
756 | \ifile{tcname\_grid\_T}, variables \textit{u1} and \textit{u2} (real |
---|
757 | and imaginary part of u) are expected to be available from file |
---|
758 | \np{filtide} with suffix \ifile{tcname\_grid\_U}, and variables |
---|
759 | \textit{v1} and \textit{v2} (real and imaginary part of v) are |
---|
760 | expected to be available from file \np{filtide} with suffix |
---|
761 | \ifile{tcname\_grid\_V}. If \np{ln\_bdytide\_conj} is set to |
---|
762 | \forcode{.true.}, the data is expected to be in complex conjugate |
---|
763 | form. |
---|
764 | |
---|
765 | Note that the barotropic velocity components are assumed to be defined |
---|
766 | on the native model grid and should be rotated accordingly when they |
---|
767 | are converted from their definition on a different source grid. To do |
---|
768 | so, the u, v amplitudes and phases can be converted into tidal |
---|
769 | ellipses, the grid rotation added to the ellipse inclination, and then |
---|
770 | converted back (care should be taken regarding conventions of the |
---|
771 | direction of rotation). %, e.g. anticlockwise or clockwise. |
---|
772 | |
---|
773 | \biblio |
---|
774 | |
---|
775 | \pindex |
---|
776 | |
---|
777 | \end{document} |
---|