1 |
heimbach |
1.1 |
\subsection{OBCS: Open boundary conditions for regional modeling} |
2 |
|
|
|
3 |
|
|
\label{sec:pkg:obcs} |
4 |
|
|
\begin{rawhtml} |
5 |
|
|
<!-- CMIREDIR:package_obcs: --> |
6 |
|
|
\end{rawhtml} |
7 |
|
|
|
8 |
heimbach |
1.2 |
Authors: |
9 |
|
|
Alistair Adcroft, Patrick Heimbach, Samar Katiwala, Martin Losch |
10 |
heimbach |
1.1 |
|
11 |
|
|
\subsubsection{Introduction |
12 |
|
|
\label{sec:pkg:obcs:intro}} |
13 |
|
|
|
14 |
mlosch |
1.7 |
The OBCS-package is fundamental to regional ocean modelling with the |
15 |
|
|
MITgcm, but because there are so many details to be considered in |
16 |
|
|
regional ocean modelling that this package cannot accomodate all |
17 |
|
|
imaginable and possible options. Therefore, for a regional simulation |
18 |
|
|
with very particular details, it is recommended to familiarize oneself |
19 |
|
|
not only with the compile- and runtime-options of this package, but |
20 |
|
|
also with the code itself. In many cases it will be necessary to adapt |
21 |
|
|
the obcs-code (in particular \code{S/R OBCS\_CALC}) to the application |
22 |
|
|
in question; in these cases the obcs-package (together with the |
23 |
|
|
rbcs-package, section \ref{sec:pkg:rbcs}) is a very |
24 |
|
|
useful infrastructure for implementing special regional models. |
25 |
heimbach |
1.1 |
|
26 |
|
|
%---------------------------------------------------------------------- |
27 |
|
|
|
28 |
|
|
\subsubsection{OBCS configuration and compiling |
29 |
jmc |
1.4 |
\label{sec:pkg:obcs:comp}} |
30 |
heimbach |
1.1 |
|
31 |
|
|
As with all MITgcm packages, OBCS can be turned on or off |
32 |
|
|
at compile time |
33 |
|
|
% |
34 |
|
|
\begin{itemize} |
35 |
|
|
% |
36 |
|
|
\item |
37 |
mlosch |
1.6 |
using the \code{packages.conf} file by adding \code{obcs} to it, |
38 |
heimbach |
1.1 |
% |
39 |
|
|
\item |
40 |
mlosch |
1.6 |
or using \code{genmake2} adding |
41 |
|
|
\code{-enable=obcs} or \code{-disable=obcs} switches |
42 |
heimbach |
1.1 |
% |
43 |
|
|
\item |
44 |
|
|
\textit{Required packages and CPP options:} \\ |
45 |
|
|
% |
46 |
|
|
To alternatives are available for prescribing open boundary values, |
47 |
|
|
which differ in the way how OB's are treated in time: |
48 |
|
|
A simple time-management (e.g. constant in time, or cyclic with |
49 |
|
|
fixed fequency) is provided through |
50 |
mlosch |
1.6 |
S/R \code{obcs\_external\_fields\_load}. |
51 |
heimbach |
1.1 |
More sophisticated ``real-time'' (i.e. calendar time) management is |
52 |
mlosch |
1.6 |
available through \code{obcs\_prescribe\_read}. |
53 |
heimbach |
1.1 |
The latter case requires |
54 |
mlosch |
1.6 |
packages \code{cal} and \code{exf} to be enabled. |
55 |
heimbach |
1.1 |
% |
56 |
|
|
\end{itemize} |
57 |
jmc |
1.5 |
(see also Section \ref{sec:buildingCode}). |
58 |
heimbach |
1.1 |
|
59 |
|
|
Parts of the OBCS code can be enabled or disabled at compile time |
60 |
|
|
via CPP preprocessor flags. These options are set in |
61 |
mlosch |
1.6 |
\code{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them. |
62 |
heimbach |
1.1 |
|
63 |
jmc |
1.5 |
\begin{table}[!ht] |
64 |
heimbach |
1.1 |
\centering |
65 |
|
|
\label{tab:pkg:obcs:cpp} |
66 |
|
|
{\footnotesize |
67 |
|
|
\begin{tabular}{|l|l|} |
68 |
|
|
\hline |
69 |
|
|
\textbf{CPP option} & \textbf{Description} \\ |
70 |
|
|
\hline \hline |
71 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_NORTH} & |
72 |
heimbach |
1.1 |
enable Northern OB \\ |
73 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_SOUTH} & |
74 |
heimbach |
1.1 |
enable Southern OB \\ |
75 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_EAST} & |
76 |
heimbach |
1.1 |
enable Eastern OB \\ |
77 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_WEST} & |
78 |
heimbach |
1.1 |
enable Western OB \\ |
79 |
|
|
\hline |
80 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_PRESCRIBE} & |
81 |
heimbach |
1.1 |
enable code for prescribing OB's \\ |
82 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_SPONGE} & |
83 |
heimbach |
1.1 |
enable sponge layer code \\ |
84 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_BALANCE} & |
85 |
heimbach |
1.1 |
enable code for balancing transports through OB's \\ |
86 |
mlosch |
1.6 |
\code{ALLOW\_ORLANSKI} & |
87 |
heimbach |
1.1 |
enable Orlanski radiation conditions at OB's \\ |
88 |
mlosch |
1.6 |
\code{ALLOW\_OBCS\_STEVENS} & |
89 |
|
|
enable Stevens (1990) boundary conditions at OB's \\ |
90 |
|
|
& (currently only implemented for eastern and western \\ |
91 |
|
|
& boundaries and NOT for ptracers) \\ |
92 |
heimbach |
1.1 |
\hline |
93 |
|
|
\end{tabular} |
94 |
|
|
} |
95 |
|
|
\caption{~} |
96 |
|
|
\end{table} |
97 |
|
|
|
98 |
|
|
|
99 |
|
|
%---------------------------------------------------------------------- |
100 |
|
|
|
101 |
|
|
\subsubsection{Run-time parameters |
102 |
|
|
\label{sec:pkg:obcs:runtime}} |
103 |
|
|
|
104 |
|
|
Run-time parameters are set in files |
105 |
mlosch |
1.6 |
\code{data.pkg}, \code{data.obcs}, and \code{data.exf} |
106 |
heimbach |
1.1 |
if ``real-time'' prescription is requested |
107 |
mlosch |
1.6 |
(i.e. package \code{exf} enabled). |
108 |
heimbach |
1.1 |
These parameter files are read in S/R |
109 |
mlosch |
1.6 |
\code{packages\_readparms.F}, \code{obcs\_readparms.F}, and |
110 |
|
|
\code{exf\_readparms.F}, respectively. |
111 |
heimbach |
1.1 |
Run-time parameters may be broken into 3 categories: |
112 |
|
|
(i) switching on/off the package at runtime, |
113 |
|
|
(ii) OBCS package flags and parameters, |
114 |
mlosch |
1.6 |
(iii) additional timing flags in \code{data.exf}, if selected. |
115 |
heimbach |
1.1 |
|
116 |
|
|
\paragraph{Enabling the package} |
117 |
|
|
~ \\ |
118 |
|
|
% |
119 |
|
|
The OBCS package is switched on at runtime by setting |
120 |
mlosch |
1.6 |
\code{useOBCS = .TRUE.} in \code{data.pkg}. |
121 |
heimbach |
1.1 |
|
122 |
|
|
\paragraph{Package flags and parameters} |
123 |
|
|
~ \\ |
124 |
|
|
% |
125 |
|
|
Table \ref{tab:pkg:obcs:runtime_flags} summarizes the |
126 |
mlosch |
1.6 |
runtime flags that are set in \code{data.obcs}, and |
127 |
heimbach |
1.1 |
their default values. |
128 |
|
|
|
129 |
jmc |
1.5 |
\begin{table}[!ht] |
130 |
heimbach |
1.1 |
\centering |
131 |
|
|
{\footnotesize |
132 |
|
|
\begin{tabular}{|l|c|l|} |
133 |
|
|
\hline |
134 |
|
|
\textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\ |
135 |
|
|
\hline \hline |
136 |
mlosch |
1.6 |
\multicolumn{3}{|c|}{\textit{basic flags \& parameters} (OBCS\_PARM01) } \\ |
137 |
heimbach |
1.1 |
\hline |
138 |
|
|
OB\_Jnorth & 0 & |
139 |
|
|
Nx-vector of J-indices (w.r.t. Ny) of Northern OB |
140 |
|
|
at each I-position (w.r.t. Nx) \\ |
141 |
|
|
OB\_Jsouth & 0 & |
142 |
|
|
Nx-vector of J-indices (w.r.t. Ny) of Southern OB |
143 |
|
|
at each I-position (w.r.t. Nx) \\ |
144 |
|
|
OB\_Ieast & 0 & |
145 |
|
|
Ny-vector of I-indices (w.r.t. Nx) of Eastern OB |
146 |
|
|
at each J-position (w.r.t. Ny) \\ |
147 |
|
|
OB\_Iwest & 0 & |
148 |
|
|
Ny-vector of I-indices (w.r.t. Nx) of Western OB |
149 |
|
|
at each J-position (w.r.t. Ny) \\ |
150 |
mlosch |
1.6 |
useOBCSprescribe & \code{.FALSE.} & |
151 |
heimbach |
1.1 |
~ \\ |
152 |
mlosch |
1.6 |
useOBCSsponge & \code{.FALSE.} & |
153 |
heimbach |
1.1 |
~ \\ |
154 |
mlosch |
1.6 |
useOBCSbalance & \code{.FALSE.} & |
155 |
heimbach |
1.1 |
~ \\ |
156 |
mlosch |
1.6 |
useOrlanskiNorth/South/EastWest & \code{.FALSE.} & |
157 |
|
|
turn on Orlanski boundary conditions for individual boundary\\ |
158 |
|
|
useStevensNorth/South/EastWest & \code{.FALSE.} & |
159 |
|
|
turn on Stevens boundary conditions for individual boundary\\ |
160 |
heimbach |
1.1 |
OB\textbf{X}\textbf{y}File & ~ & |
161 |
|
|
file name of OB field \\ |
162 |
|
|
~ & ~ & |
163 |
|
|
\textbf{X}: \textbf{N}(orth), \textbf{S}(outh), |
164 |
|
|
\textbf{E}(ast), \textbf{W}(est) \\ |
165 |
|
|
~ & ~ & |
166 |
|
|
\textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity), |
167 |
mlosch |
1.6 |
\textbf{u}(-velocity), \textbf{v}(-velocity), \\ |
168 |
|
|
~ & ~ & |
169 |
|
|
\textbf{w}(-velocity), \textbf{eta}(sea surface height)\\ |
170 |
|
|
~ & ~ & |
171 |
|
|
\textbf{a}(sea ice area), \textbf{h}(sea ice thickness), |
172 |
|
|
\textbf{sn}(snow thickness), \textbf{sl}(sea ice salinity)\\ |
173 |
heimbach |
1.1 |
\hline |
174 |
mlosch |
1.6 |
\multicolumn{3}{|c|}{\textit{Orlanski parameters} (OBCS\_PARM02) } \\ |
175 |
heimbach |
1.1 |
\hline |
176 |
|
|
cvelTimeScale & 2000 sec & |
177 |
|
|
averaging period for phase speed \\ |
178 |
|
|
CMAX & 0.45 m/s & |
179 |
|
|
maximum allowable phase speed-CFL for AB-II \\ |
180 |
|
|
CFIX & 0.8 m/s & |
181 |
|
|
fixed boundary phase speed \\ |
182 |
mlosch |
1.6 |
useFixedCEast & \code{.FALSE.} & |
183 |
heimbach |
1.1 |
~ \\ |
184 |
mlosch |
1.6 |
useFixedCWest & \code{.FALSE.} & |
185 |
heimbach |
1.1 |
~ \\ |
186 |
|
|
\hline |
187 |
mlosch |
1.6 |
\multicolumn{3}{|c|}{\textit{Sponge-layer parameters} (OBCS\_PARM03)} \\ |
188 |
heimbach |
1.1 |
\hline |
189 |
|
|
spongeThickness & 0 & |
190 |
|
|
sponge layer thickness (in \# grid points) \\ |
191 |
|
|
Urelaxobcsinner & 0 sec & |
192 |
|
|
relaxation time scale at the |
193 |
|
|
innermost sponge layer point of a meridional OB \\ |
194 |
|
|
Vrelaxobcsinner & 0 sec & |
195 |
|
|
relaxation time scale at the |
196 |
|
|
innermost sponge layer point of a zonal OB \\ |
197 |
|
|
Urelaxobcsbound & 0 sec & |
198 |
|
|
relaxation time scale at the |
199 |
|
|
outermost sponge layer point of a meridional OB \\ |
200 |
|
|
Vrelaxobcsbound & 0 sec & |
201 |
|
|
relaxation time scale at the |
202 |
|
|
outermost sponge layer point of a zonal OB \\ |
203 |
mlosch |
1.6 |
\hline |
204 |
|
|
\multicolumn{3}{|c|}{\textit{Stevens parameters} (OBCS\_PARM04) } \\ |
205 |
|
|
\hline |
206 |
|
|
T/SrelaxStevens & 0~sec & relaxation time scale for |
207 |
|
|
temperature/salinity \\ |
208 |
|
|
useStevensPhaseVel & \code{.TRUE.} & \\ |
209 |
|
|
useStevensAdvection & \code{.TRUE.} & \\ |
210 |
heimbach |
1.1 |
\hline |
211 |
|
|
\hline |
212 |
|
|
\end{tabular} |
213 |
|
|
} |
214 |
jmc |
1.5 |
\caption{pkg OBCS run-time parameters} |
215 |
|
|
\label{tab:pkg:obcs:runtime_flags} |
216 |
heimbach |
1.1 |
\end{table} |
217 |
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
%---------------------------------------------------------------------- |
221 |
|
|
|
222 |
heimbach |
1.2 |
\subsubsection{Defining open boundary positions |
223 |
|
|
\label{sec:pkg:obcs:defining}} |
224 |
|
|
|
225 |
|
|
There are four open boundaries (OBs), a |
226 |
|
|
Northern, Southern, Eastern, and Western. |
227 |
|
|
All OB locations are specified by their absolute |
228 |
|
|
meridional (Northern/Southern) or zonal (Eastern/Western) indices. |
229 |
mlosch |
1.6 |
Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index |
230 |
heimbach |
1.2 |
$j$ specifies the Northern/Southern OB position, |
231 |
mlosch |
1.6 |
and for each meridional position $j=1,\ldots,N_y$, a zonal index |
232 |
heimbach |
1.2 |
$i$ specifies the Eastern/Western OB position. |
233 |
mlosch |
1.6 |
For Northern/Southern OB this defines an $N_x$-dimensional |
234 |
heimbach |
1.2 |
``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$, |
235 |
mlosch |
1.6 |
and an $N_y$-dimenisonal |
236 |
|
|
``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$. |
237 |
heimbach |
1.2 |
Positions determined in this way allows Northern/Southern |
238 |
|
|
OBs to be at variable $j$ (or $y$) positions, and Eastern/Western |
239 |
|
|
OBs at variable $i$ (or $x$) positions. |
240 |
|
|
Here, indices refer to tracer points on the C-grid. |
241 |
|
|
A zero (0) element in $\tt OB\_I\ldots$, $\tt OB\_J\ldots$ |
242 |
|
|
means there is no corresponding OB in that column/row. |
243 |
|
|
For a Northern/Southern OB, the OB V point is to the South/North. |
244 |
|
|
For an Eastern/Western OB, the OB U point is to the West/East. |
245 |
|
|
|
246 |
|
|
\begin{verbatim} |
247 |
|
|
For example |
248 |
|
|
OB_Jnorth(3)=34 means that: |
249 |
|
|
T( 3 ,34) is a an OB point |
250 |
|
|
U(3:4,34) is a an OB point |
251 |
|
|
V( 4 ,34) is a an OB point |
252 |
|
|
while |
253 |
|
|
OB_Jsouth(3)=1 means that: |
254 |
|
|
T( 3 ,1) is a an OB point |
255 |
|
|
U(3:4,1) is a an OB point |
256 |
|
|
V( 4 ,2) is a an OB point |
257 |
|
|
\end{verbatim} |
258 |
|
|
|
259 |
|
|
For convenience, negative values for Jnorth/Ieast refer to |
260 |
|
|
points relative to the Northern/Eastern edges of the model |
261 |
|
|
eg. $\tt OB\_Jnorth(3)=-1$ means that the point $\tt (3,Ny)$ |
262 |
|
|
is a northern OB. |
263 |
|
|
|
264 |
|
|
\noindent |
265 |
|
|
\textsf{Add special comments for case \#define NONLIN\_FRSURF, |
266 |
|
|
see obcs\_ini\_fixed.F} |
267 |
|
|
|
268 |
|
|
%---------------------------------------------------------------------- |
269 |
|
|
|
270 |
heimbach |
1.1 |
\subsubsection{Equations and key routines |
271 |
|
|
\label{sec:pkg:obcs:equations}} |
272 |
|
|
|
273 |
heimbach |
1.2 |
\paragraph{OBCS\_READPARMS:} ~ \\ |
274 |
|
|
Set OB positions through arrays |
275 |
|
|
{\tt OB\_Jnorth(Ny), OB\_Jsouth(Ny), OB\_Ieast(Nx), OB\_Iwest(Nx)}, |
276 |
jmc |
1.5 |
and runtime flags (see Table \ref{tab:pkg:obcs:runtime_flags}). |
277 |
heimbach |
1.1 |
|
278 |
|
|
\paragraph{OBCS\_CALC:} ~ \\ |
279 |
heimbach |
1.2 |
% |
280 |
|
|
Top-level routine for filling values to be applied at OB for |
281 |
|
|
$T,S,U,V,\eta$ into corresponding |
282 |
|
|
``slice'' arrays $(x,z)$, $(y,z)$ for each OB: |
283 |
|
|
$\tt OB[N/S/E/W][t/s/u/v]$; e.g. for salinity array at |
284 |
|
|
Southern OB, array name is $\tt OBSt$. |
285 |
|
|
Values filled are either |
286 |
|
|
% |
287 |
|
|
\begin{itemize} |
288 |
|
|
% |
289 |
|
|
\item |
290 |
|
|
constant vertical $T,S$ profiles as specified in file |
291 |
|
|
{\tt data} ({\tt tRef(Nr), sRef(Nr)}) with zero velocities $U,V$, |
292 |
|
|
% |
293 |
|
|
\item |
294 |
|
|
$T,S,U,V$ values determined via Orlanski radiation conditions |
295 |
|
|
(see below), |
296 |
|
|
% |
297 |
|
|
\item |
298 |
|
|
prescribed time-constant or time-varying fields (see below). |
299 |
|
|
% |
300 |
mlosch |
1.6 |
\item |
301 |
|
|
use prescribed boundary fields to compute Stevens boundary conditions. |
302 |
heimbach |
1.2 |
\end{itemize} |
303 |
|
|
|
304 |
mlosch |
1.6 |
\paragraph{ORLANSKI:} ~ \\ |
305 |
heimbach |
1.2 |
% |
306 |
mlosch |
1.6 |
Orlanski radiation conditions \citep{orl:76}, examples can be found in |
307 |
|
|
\code{verification/dome} and |
308 |
|
|
\code{verification/tutorial\_plume\_on\_slope} |
309 |
|
|
(\ref{sec:eg-gravityplume}). |
310 |
|
|
|
311 |
|
|
\paragraph{OBCS\_PRESCRIBE\_READ:} ~ \\ |
312 |
|
|
% |
313 |
|
|
When \code{useOBCSprescribe = .TRUE.} the model tries to read |
314 |
|
|
temperature, salinity, u- and v-velocities from files specified in the |
315 |
|
|
runtime parameters \code{OB[N/S/E/W][t/s/u/v]File}. These files are |
316 |
|
|
the usual IEEE, big-endian files with dimensions of a section along an |
317 |
|
|
open boundary: |
318 |
|
|
\begin{itemize} |
319 |
|
|
\item For North/South boundary files the dimensions are |
320 |
|
|
$(N_x\times N_r\times\mbox{time levels})$, for East/West boundary |
321 |
|
|
files the dimensions are $(N_y\times N_r\times\mbox{time levels})$. |
322 |
|
|
\item If a non-linear free surface is used |
323 |
|
|
(\ref{sec:nonlinear-freesurface}), additional files |
324 |
|
|
\code{OB[N/S/E/W]etaFile} for the sea surface height $\eta$ with |
325 |
|
|
dimension $(N_{x/y}\times\mbox{time levels})$ may be specified. |
326 |
|
|
\item If non-hydrostatic dynamics are used |
327 |
|
|
(\ref{sec:non-hydrostatic}), additional files |
328 |
|
|
\code{OB[N/S/E/W]wFile} for the vertical velocity $w$ with |
329 |
mlosch |
1.7 |
dimensions $(N_{x/y}\times N_r\times\mbox{time levels})$ can be |
330 |
mlosch |
1.6 |
specified. |
331 |
|
|
\item If \code{useSEAICE=.TRUE.} then additional files |
332 |
|
|
\code{OB[N/S/E/W][a,h,sl,sn,uice,vice]} for sea ice area, thickness |
333 |
|
|
(\code{HEFF}), seaice salinity, snow and ice velocities |
334 |
mlosch |
1.7 |
$(N_{x/y}\times\mbox{time levels})$ can be specified. |
335 |
mlosch |
1.6 |
\end{itemize} |
336 |
mlosch |
1.7 |
As in \code{S/R external\_fields\_load} or the \code{exf}-package, the |
337 |
|
|
code reads two time levels for each variable, e.g.\ \code{OBNu0} and |
338 |
|
|
\code{OBNu1}, and interpolates linearly between these time levels to |
339 |
|
|
obtain the value \code{OBNu} at the current model time (step). When the |
340 |
|
|
\code{exf}-package is used, the time levels are controlled for each |
341 |
|
|
boundary separately in the same way as the \code{exf}-fields in |
342 |
|
|
\code{data.exf}, namelist \code{EXF\_NML\_OBCS}. The runtime flags |
343 |
mlosch |
1.6 |
follow the above naming conventions, e.g. for the western boundary the |
344 |
|
|
corresponding flags are \code{OBCWstartdate1/2} and |
345 |
|
|
\code{OBCWperiod}. Sea-ice boundary values are controlled separately |
346 |
mlosch |
1.7 |
with \code{siobWstartdate1/2} and \code{siobWperiod}. When the |
347 |
|
|
\code{exf}-package is not used, the time levels are controlled by the |
348 |
|
|
runtime flags \code{externForcingPeriod} and \code{externForcingCycle} |
349 |
|
|
in \code{data}, see \code{verification/exp4} for an example. |
350 |
mlosch |
1.6 |
|
351 |
|
|
\paragraph{OBCS\_CALC\_STEVENS:} ~ \\ |
352 |
|
|
(THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT COMPLETE. SO |
353 |
|
|
FAR ONLY EASTERN AND WESTERN BOUNDARIES ARE SUPPORTED.) \\ |
354 |
|
|
The boundary conditions following \citet{stevens:90} require the |
355 |
|
|
vertically averaged normal velocity (originally specified as a stream |
356 |
|
|
function along the open boundary) $\bar{u}_{ob}$ and the tracer fields |
357 |
|
|
$\chi_{ob}$ (note: passive tracers are currently not implemented and |
358 |
|
|
the code stops when package \code{ptracers} is used together with this |
359 |
|
|
option). Currently, the code vertically averages the normal velocity |
360 |
|
|
as specified. From these prescribed values the code computes the |
361 |
|
|
boundary values for the next timestep $n+1$ as follows (as an |
362 |
|
|
example, we use the notation for an eastern or western boundary): |
363 |
|
|
\begin{itemize} |
364 |
|
|
\item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + u'(y,z)$, where $u_{n}'$ is the |
365 |
|
|
deviation from the vertically averaged velocity one grid point |
366 |
|
|
inward from the boundary. |
367 |
|
|
\item If $u^{n+1}$ is directed into the model domain, the boudary |
368 |
|
|
value for tracer $\chi$ is restored to the prescribed values: |
369 |
|
|
\[\chi^{n+1} = \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} - |
370 |
|
|
\chi^{n}),\] where $\tau_\chi$ is the relaxation time |
371 |
|
|
scale \texttt{T/SrelaxStevens}. |
372 |
|
|
\item If $u^{n+1}$ is directed out of the model domain, the tracer is |
373 |
|
|
advected out of the domain with $u^{n+1}+c$, where $c$ is a phase |
374 |
|
|
velocity estimated as |
375 |
|
|
$\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. |
376 |
|
|
For test purposes, the phase velocity contribution or the entire |
377 |
|
|
advection can |
378 |
|
|
be turned off by setting the corresponding parameters |
379 |
|
|
\texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to |
380 |
|
|
\texttt{.FALSE.}.\end{itemize} See \citet{stevens:90} for details. |
381 |
heimbach |
1.1 |
|
382 |
mlosch |
1.7 |
\paragraph{OBCS\_BALANCE:} ~ \\ |
383 |
heimbach |
1.1 |
% |
384 |
mlosch |
1.7 |
This is not (yet) a separate routine in the code, but it may become |
385 |
|
|
one to make this code more transparent. The code is part of |
386 |
|
|
\code{S/R~OBCS\_CALC}. When turned on (\code{ALLOW\_OBCS\_BALANCE} |
387 |
|
|
defined in \code{OBCS\_OPTIONS.h} and \code{useOBCSbalance=.true.} in |
388 |
|
|
\code{data.obcs/OBCS\_PARM01}), the normal velocities across each of |
389 |
|
|
the four boundaries are modified separately, so that the net volume |
390 |
|
|
transport across \emph{each} boundary is zero. For example, for the |
391 |
|
|
western boundary at $i=i_{b}$, the modified velocity is: |
392 |
|
|
\[ |
393 |
|
|
u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k} |
394 |
|
|
OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}. |
395 |
|
|
\] |
396 |
|
|
This also ensures a net total inflow of zero through all boundaries to |
397 |
|
|
make it a useful flag to prevent infinite sea-level change within the |
398 |
|
|
domain, but the flag is \emph{not} useful if you want to simulate, |
399 |
|
|
say, a sector of the Southern Ocean with a strong ACC entering through |
400 |
|
|
the western and leaving through the eastern boundary, because this |
401 |
|
|
flag will make sure that the strong inflow is removed. It is |
402 |
|
|
recommended that this part of the code is adapted to the particular |
403 |
|
|
needs of the simulation in question. |
404 |
heimbach |
1.1 |
|
405 |
heimbach |
1.2 |
\paragraph{OBCS\_APPLY\_*:} ~ \\ |
406 |
heimbach |
1.1 |
~ |
407 |
|
|
|
408 |
heimbach |
1.2 |
\paragraph{OBCS\_SPONGE} Setting sponge layer characteristics \\ |
409 |
heimbach |
1.1 |
% |
410 |
|
|
~ |
411 |
|
|
|
412 |
|
|
\paragraph{OB's with nonlinear free surface} ~ \\ |
413 |
|
|
% |
414 |
|
|
~ |
415 |
|
|
|
416 |
|
|
|
417 |
|
|
%---------------------------------------------------------------------- |
418 |
|
|
|
419 |
|
|
\subsubsection{Flow chart |
420 |
|
|
\label{sec:pkg:obcs:flowchart}} |
421 |
|
|
|
422 |
|
|
|
423 |
|
|
{\footnotesize |
424 |
|
|
\begin{verbatim} |
425 |
|
|
|
426 |
|
|
C !CALLING SEQUENCE: |
427 |
|
|
c ... |
428 |
|
|
|
429 |
|
|
\end{verbatim} |
430 |
|
|
} |
431 |
|
|
|
432 |
|
|
%---------------------------------------------------------------------- |
433 |
|
|
|
434 |
|
|
\subsubsection{OBCS diagnostics |
435 |
|
|
\label{sec:pkg:obcs:diagnostics}} |
436 |
|
|
|
437 |
|
|
Diagnostics output is available via the diagnostics package |
438 |
|
|
(see Section \ref{sec:pkg:diagnostics}). |
439 |
|
|
Available output fields are summarized in |
440 |
|
|
Table \ref{tab:pkg:obcs:diagnostics}. |
441 |
|
|
|
442 |
jmc |
1.5 |
\begin{table}[!ht] |
443 |
heimbach |
1.1 |
\centering |
444 |
|
|
\label{tab:pkg:obcs:diagnostics} |
445 |
|
|
{\footnotesize |
446 |
|
|
\begin{verbatim} |
447 |
|
|
------------------------------------------------------ |
448 |
|
|
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
449 |
|
|
------------------------------------------------------ |
450 |
|
|
|
451 |
|
|
\end{verbatim} |
452 |
|
|
} |
453 |
|
|
\caption{~} |
454 |
|
|
\end{table} |
455 |
|
|
|
456 |
|
|
%---------------------------------------------------------------------- |
457 |
|
|
|
458 |
|
|
\subsubsection{Reference experiments} |
459 |
mlosch |
1.7 |
In the directory \code{verifcation}, the following experiments use |
460 |
|
|
\code{obcs}: |
461 |
|
|
\begin{itemize} |
462 |
|
|
\item \code{exp4}: box with 4 open boundaries, simulating flow over a |
463 |
|
|
Gaussian bump based on \citet{adcroft:97}, also tests |
464 |
|
|
Stevens-boundary conditions; |
465 |
|
|
\item \code{dome}: based on ``Denmark Strait Overflow Model |
466 |
|
|
Experiment'', use Orlanski-BCs; |
467 |
|
|
\item \code{internal\_wave}: uses a heavily modified \code{S/R~OBCS\_CALC} |
468 |
|
|
\item \code{seaice\_obcs}: simple example who to use the sea-ice |
469 |
|
|
related code, based on \code{lab\_sea}; |
470 |
|
|
\item \code{tutorial\_plume\_on\_slope}: uses Orlanski-BCs, see also |
471 |
|
|
section~\ref{sec:eg-gravityplume}. |
472 |
|
|
\end{itemize} |
473 |
heimbach |
1.1 |
|
474 |
|
|
|
475 |
|
|
|
476 |
|
|
%---------------------------------------------------------------------- |
477 |
|
|
|
478 |
|
|
\subsubsection{References} |
479 |
|
|
|
480 |
molod |
1.3 |
\subsubsection{Experiments and tutorials that use obcs} |
481 |
|
|
\label{sec:pkg:obcs:experiments} |
482 |
|
|
|
483 |
|
|
\begin{itemize} |
484 |
mlosch |
1.7 |
\item \code{tutorial\_plume\_on\_slope} (section~\ref{sec:eg-gravityplume}) |
485 |
molod |
1.3 |
\end{itemize} |
486 |
|
|
|
487 |
mlosch |
1.6 |
|
488 |
|
|
%%% Local Variables: |
489 |
|
|
%%% mode: latex |
490 |
|
|
%%% TeX-master: "../../manual" |
491 |
|
|
%%% End: |