24 |
\begin{itemize} |
\begin{itemize} |
25 |
% |
% |
26 |
\item |
\item |
27 |
using the \texttt{packages.conf} file by adding \texttt{obcs} to it, |
using the \code{packages.conf} file by adding \code{obcs} to it, |
28 |
% |
% |
29 |
\item |
\item |
30 |
or using \texttt{genmake2} adding |
or using \code{genmake2} adding |
31 |
\texttt{-enable=obcs} or \texttt{-disable=obcs} switches |
\code{-enable=obcs} or \code{-disable=obcs} switches |
32 |
% |
% |
33 |
\item |
\item |
34 |
\textit{Required packages and CPP options:} \\ |
\textit{Required packages and CPP options:} \\ |
37 |
which differ in the way how OB's are treated in time: |
which differ in the way how OB's are treated in time: |
38 |
A simple time-management (e.g. constant in time, or cyclic with |
A simple time-management (e.g. constant in time, or cyclic with |
39 |
fixed fequency) is provided through |
fixed fequency) is provided through |
40 |
S/R \texttt{obcs\_external\_fields\_load}. |
S/R \code{obcs\_external\_fields\_load}. |
41 |
More sophisticated ``real-time'' (i.e. calendar time) management is |
More sophisticated ``real-time'' (i.e. calendar time) management is |
42 |
available through \texttt{obcs\_prescribe\_read}. |
available through \code{obcs\_prescribe\_read}. |
43 |
The latter case requires |
The latter case requires |
44 |
packages \texttt{cal} and \texttt{exf} to be enabled. |
packages \code{cal} and \code{exf} to be enabled. |
45 |
% |
% |
46 |
\end{itemize} |
\end{itemize} |
47 |
(see also Section \ref{sec:buildingCode}). |
(see also Section \ref{sec:buildingCode}). |
48 |
|
|
49 |
Parts of the OBCS code can be enabled or disabled at compile time |
Parts of the OBCS code can be enabled or disabled at compile time |
50 |
via CPP preprocessor flags. These options are set in |
via CPP preprocessor flags. These options are set in |
51 |
\texttt{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them. |
\code{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them. |
52 |
|
|
53 |
\begin{table}[!ht] |
\begin{table}[!ht] |
54 |
\centering |
\centering |
58 |
\hline |
\hline |
59 |
\textbf{CPP option} & \textbf{Description} \\ |
\textbf{CPP option} & \textbf{Description} \\ |
60 |
\hline \hline |
\hline \hline |
61 |
\texttt{ALLOW\_OBCS\_NORTH} & |
\code{ALLOW\_OBCS\_NORTH} & |
62 |
enable Northern OB \\ |
enable Northern OB \\ |
63 |
\texttt{ALLOW\_OBCS\_SOUTH} & |
\code{ALLOW\_OBCS\_SOUTH} & |
64 |
enable Southern OB \\ |
enable Southern OB \\ |
65 |
\texttt{ALLOW\_OBCS\_EAST} & |
\code{ALLOW\_OBCS\_EAST} & |
66 |
enable Eastern OB \\ |
enable Eastern OB \\ |
67 |
\texttt{ALLOW\_OBCS\_WEST} & |
\code{ALLOW\_OBCS\_WEST} & |
68 |
enable Western OB \\ |
enable Western OB \\ |
69 |
\hline |
\hline |
70 |
\texttt{ALLOW\_OBCS\_PRESCRIBE} & |
\code{ALLOW\_OBCS\_PRESCRIBE} & |
71 |
enable code for prescribing OB's \\ |
enable code for prescribing OB's \\ |
72 |
\texttt{ALLOW\_OBCS\_SPONGE} & |
\code{ALLOW\_OBCS\_SPONGE} & |
73 |
enable sponge layer code \\ |
enable sponge layer code \\ |
74 |
\texttt{ALLOW\_OBCS\_BALANCE} & |
\code{ALLOW\_OBCS\_BALANCE} & |
75 |
enable code for balancing transports through OB's \\ |
enable code for balancing transports through OB's \\ |
76 |
\texttt{ALLOW\_ORLANSKI} & |
\code{ALLOW\_ORLANSKI} & |
77 |
enable Orlanski radiation conditions at OB's \\ |
enable Orlanski radiation conditions at OB's \\ |
78 |
|
\code{ALLOW\_OBCS\_STEVENS} & |
79 |
|
enable Stevens (1990) boundary conditions at OB's \\ |
80 |
|
& (currently only implemented for eastern and western \\ |
81 |
|
& boundaries and NOT for ptracers) \\ |
82 |
\hline |
\hline |
83 |
\end{tabular} |
\end{tabular} |
84 |
} |
} |
92 |
\label{sec:pkg:obcs:runtime}} |
\label{sec:pkg:obcs:runtime}} |
93 |
|
|
94 |
Run-time parameters are set in files |
Run-time parameters are set in files |
95 |
\texttt{data.pkg}, \texttt{data.obcs}, and \texttt{data.exf} |
\code{data.pkg}, \code{data.obcs}, and \code{data.exf} |
96 |
if ``real-time'' prescription is requested |
if ``real-time'' prescription is requested |
97 |
(i.e. package \texttt{exf} enabled). |
(i.e. package \code{exf} enabled). |
98 |
These parameter files are read in S/R |
These parameter files are read in S/R |
99 |
\texttt{packages\_readparms.F}, \texttt{obcs\_readparms.F}, and |
\code{packages\_readparms.F}, \code{obcs\_readparms.F}, and |
100 |
\texttt{exf\_readparms.F}, respectively. |
\code{exf\_readparms.F}, respectively. |
101 |
Run-time parameters may be broken into 3 categories: |
Run-time parameters may be broken into 3 categories: |
102 |
(i) switching on/off the package at runtime, |
(i) switching on/off the package at runtime, |
103 |
(ii) OBCS package flags and parameters, |
(ii) OBCS package flags and parameters, |
104 |
(iii) additional timing flags in \texttt{data.exf}, if selected. |
(iii) additional timing flags in \code{data.exf}, if selected. |
105 |
|
|
106 |
\paragraph{Enabling the package} |
\paragraph{Enabling the package} |
107 |
~ \\ |
~ \\ |
108 |
% |
% |
109 |
The OBCS package is switched on at runtime by setting |
The OBCS package is switched on at runtime by setting |
110 |
\texttt{useOBCS = .TRUE.} in \texttt{data.pkg}. |
\code{useOBCS = .TRUE.} in \code{data.pkg}. |
111 |
|
|
112 |
\paragraph{Package flags and parameters} |
\paragraph{Package flags and parameters} |
113 |
~ \\ |
~ \\ |
114 |
% |
% |
115 |
Table \ref{tab:pkg:obcs:runtime_flags} summarizes the |
Table \ref{tab:pkg:obcs:runtime_flags} summarizes the |
116 |
runtime flags that are set in \texttt{data.obcs}, and |
runtime flags that are set in \code{data.obcs}, and |
117 |
their default values. |
their default values. |
118 |
|
|
119 |
\begin{table}[!ht] |
\begin{table}[!ht] |
123 |
\hline |
\hline |
124 |
\textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\ |
\textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\ |
125 |
\hline \hline |
\hline \hline |
126 |
\multicolumn{3}{|c|}{\textit{basic flags \& parameters} } \\ |
\multicolumn{3}{|c|}{\textit{basic flags \& parameters} (OBCS\_PARM01) } \\ |
127 |
\hline |
\hline |
128 |
OB\_Jnorth & 0 & |
OB\_Jnorth & 0 & |
129 |
Nx-vector of J-indices (w.r.t. Ny) of Northern OB |
Nx-vector of J-indices (w.r.t. Ny) of Northern OB |
137 |
OB\_Iwest & 0 & |
OB\_Iwest & 0 & |
138 |
Ny-vector of I-indices (w.r.t. Nx) of Western OB |
Ny-vector of I-indices (w.r.t. Nx) of Western OB |
139 |
at each J-position (w.r.t. Ny) \\ |
at each J-position (w.r.t. Ny) \\ |
140 |
useOBCSprescribe & \texttt{.FALSE.} & |
useOBCSprescribe & \code{.FALSE.} & |
141 |
~ \\ |
~ \\ |
142 |
useOBCSsponge & \texttt{.FALSE.} & |
useOBCSsponge & \code{.FALSE.} & |
143 |
~ \\ |
~ \\ |
144 |
useOBCSbalance & \texttt{.FALSE.} & |
useOBCSbalance & \code{.FALSE.} & |
145 |
~ \\ |
~ \\ |
146 |
|
useOrlanskiNorth/South/EastWest & \code{.FALSE.} & |
147 |
|
turn on Orlanski boundary conditions for individual boundary\\ |
148 |
|
useStevensNorth/South/EastWest & \code{.FALSE.} & |
149 |
|
turn on Stevens boundary conditions for individual boundary\\ |
150 |
OB\textbf{X}\textbf{y}File & ~ & |
OB\textbf{X}\textbf{y}File & ~ & |
151 |
file name of OB field \\ |
file name of OB field \\ |
152 |
~ & ~ & |
~ & ~ & |
154 |
\textbf{E}(ast), \textbf{W}(est) \\ |
\textbf{E}(ast), \textbf{W}(est) \\ |
155 |
~ & ~ & |
~ & ~ & |
156 |
\textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity), |
\textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity), |
157 |
\textbf{u}(-velocity), \textbf{v}(-velocity) \\ |
\textbf{u}(-velocity), \textbf{v}(-velocity), \\ |
158 |
|
~ & ~ & |
159 |
|
\textbf{w}(-velocity), \textbf{eta}(sea surface height)\\ |
160 |
|
~ & ~ & |
161 |
|
\textbf{a}(sea ice area), \textbf{h}(sea ice thickness), |
162 |
|
\textbf{sn}(snow thickness), \textbf{sl}(sea ice salinity)\\ |
163 |
\hline |
\hline |
164 |
\multicolumn{3}{|c|}{\textit{Orlanski parameters} } \\ |
\multicolumn{3}{|c|}{\textit{Orlanski parameters} (OBCS\_PARM02) } \\ |
165 |
\hline |
\hline |
166 |
cvelTimeScale & 2000 sec & |
cvelTimeScale & 2000 sec & |
167 |
averaging period for phase speed \\ |
averaging period for phase speed \\ |
169 |
maximum allowable phase speed-CFL for AB-II \\ |
maximum allowable phase speed-CFL for AB-II \\ |
170 |
CFIX & 0.8 m/s & |
CFIX & 0.8 m/s & |
171 |
fixed boundary phase speed \\ |
fixed boundary phase speed \\ |
172 |
useFixedCEast & .FALSE. & |
useFixedCEast & \code{.FALSE.} & |
173 |
~ \\ |
~ \\ |
174 |
useFixedCWest & .FALSE. & |
useFixedCWest & \code{.FALSE.} & |
175 |
~ \\ |
~ \\ |
176 |
\hline |
\hline |
177 |
\multicolumn{3}{|c|}{\textit{Sponge-layer parameters} } \\ |
\multicolumn{3}{|c|}{\textit{Sponge-layer parameters} (OBCS\_PARM03)} \\ |
178 |
\hline |
\hline |
179 |
spongeThickness & 0 & |
spongeThickness & 0 & |
180 |
sponge layer thickness (in \# grid points) \\ |
sponge layer thickness (in \# grid points) \\ |
190 |
Vrelaxobcsbound & 0 sec & |
Vrelaxobcsbound & 0 sec & |
191 |
relaxation time scale at the |
relaxation time scale at the |
192 |
outermost sponge layer point of a zonal OB \\ |
outermost sponge layer point of a zonal OB \\ |
193 |
|
\hline |
194 |
|
\multicolumn{3}{|c|}{\textit{Stevens parameters} (OBCS\_PARM04) } \\ |
195 |
|
\hline |
196 |
|
T/SrelaxStevens & 0~sec & relaxation time scale for |
197 |
|
temperature/salinity \\ |
198 |
|
useStevensPhaseVel & \code{.TRUE.} & \\ |
199 |
|
useStevensAdvection & \code{.TRUE.} & \\ |
200 |
\hline |
\hline |
201 |
\hline |
\hline |
202 |
\end{tabular} |
\end{tabular} |
216 |
Northern, Southern, Eastern, and Western. |
Northern, Southern, Eastern, and Western. |
217 |
All OB locations are specified by their absolute |
All OB locations are specified by their absolute |
218 |
meridional (Northern/Southern) or zonal (Eastern/Western) indices. |
meridional (Northern/Southern) or zonal (Eastern/Western) indices. |
219 |
Thus, for each zonal position $i=1,\ldots,Nx$ a meridional index |
Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index |
220 |
$j$ specifies the Northern/Southern OB position, |
$j$ specifies the Northern/Southern OB position, |
221 |
and for each meridional position $j=1,\ldots,Ny$, a zonal index |
and for each meridional position $j=1,\ldots,N_y$, a zonal index |
222 |
$i$ specifies the Eastern/Western OB position. |
$i$ specifies the Eastern/Western OB position. |
223 |
For Northern/Southern OB this defines an $Nx$-dimensional |
For Northern/Southern OB this defines an $N_x$-dimensional |
224 |
``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$, |
``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$, |
225 |
and an $Ny$-dimenisonal |
and an $N_y$-dimenisonal |
226 |
``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$ |
``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$. |
227 |
Positions determined in this way allows Northern/Southern |
Positions determined in this way allows Northern/Southern |
228 |
OBs to be at variable $j$ (or $y$) positions, and Eastern/Western |
OBs to be at variable $j$ (or $y$) positions, and Eastern/Western |
229 |
OBs at variable $i$ (or $x$) positions. |
OBs at variable $i$ (or $x$) positions. |
287 |
\item |
\item |
288 |
prescribed time-constant or time-varying fields (see below). |
prescribed time-constant or time-varying fields (see below). |
289 |
% |
% |
290 |
|
\item |
291 |
|
use prescribed boundary fields to compute Stevens boundary conditions. |
292 |
\end{itemize} |
\end{itemize} |
293 |
|
|
294 |
|
|
295 |
\paragraph{ORLANSKI} ~ \\ |
\paragraph{ORLANSKI:} ~ \\ |
|
% |
|
|
Orlanski radiation conditions \citep{orl:76} |
|
|
|
|
|
\paragraph{OBCS\_PRESCRIBE\_READ} Setting OB fields and updates \\ |
|
296 |
% |
% |
297 |
~ |
Orlanski radiation conditions \citep{orl:76}, examples can be found in |
298 |
|
\code{verification/dome} and |
299 |
|
\code{verification/tutorial\_plume\_on\_slope} |
300 |
|
(\ref{sec:eg-gravityplume}). |
301 |
|
|
302 |
|
\paragraph{OBCS\_PRESCRIBE\_READ:} ~ \\ |
303 |
|
% |
304 |
|
When \code{useOBCSprescribe = .TRUE.} the model tries to read |
305 |
|
temperature, salinity, u- and v-velocities from files specified in the |
306 |
|
runtime parameters \code{OB[N/S/E/W][t/s/u/v]File}. These files are |
307 |
|
the usual IEEE, big-endian files with dimensions of a section along an |
308 |
|
open boundary: |
309 |
|
\begin{itemize} |
310 |
|
\item For North/South boundary files the dimensions are |
311 |
|
$(N_x\times N_r\times\mbox{time levels})$, for East/West boundary |
312 |
|
files the dimensions are $(N_y\times N_r\times\mbox{time levels})$. |
313 |
|
\item If a non-linear free surface is used |
314 |
|
(\ref{sec:nonlinear-freesurface}), additional files |
315 |
|
\code{OB[N/S/E/W]etaFile} for the sea surface height $\eta$ with |
316 |
|
dimension $(N_{x/y}\times\mbox{time levels})$ may be specified. |
317 |
|
\item If non-hydrostatic dynamics are used |
318 |
|
(\ref{sec:non-hydrostatic}), additional files |
319 |
|
\code{OB[N/S/E/W]wFile} for the vertical velocity $w$ with |
320 |
|
dimensions $(N_{x/y}\times N_r\times\mbox{time levels})$ may be |
321 |
|
specified. |
322 |
|
\item If \code{useSEAICE=.TRUE.} then additional files |
323 |
|
\code{OB[N/S/E/W][a,h,sl,sn,uice,vice]} for sea ice area, thickness |
324 |
|
(\code{HEFF}), seaice salinity, snow and ice velocities |
325 |
|
$(N_{x/y}\times\mbox{time levels})$ may be specified. |
326 |
|
\end{itemize} |
327 |
|
When the \code{exf}-package is used, the time levels are controlled |
328 |
|
for each boundary separately in the same way as the \code{exf}-fields |
329 |
|
in \code{data.exf}, namelist \code{EXF\_NML\_OBCS}. The runtime flags |
330 |
|
follow the above naming conventions, e.g. for the western boundary the |
331 |
|
corresponding flags are \code{OBCWstartdate1/2} and |
332 |
|
\code{OBCWperiod}. Sea-ice boundary values are controlled separately |
333 |
|
with \code{siobWstartdate1/2} and \code{siobWperiod}. |
334 |
|
When the \code{exf}-package is not used, the time levels are |
335 |
|
controlled by the runtime flags \code{externForcingPeriod} and |
336 |
|
\code{externForcingCycle} in \code{data}, see \code{verification/exp4} |
337 |
|
for an example. |
338 |
|
|
339 |
|
\paragraph{OBCS\_CALC\_STEVENS:} ~ \\ |
340 |
|
(THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT COMPLETE. SO |
341 |
|
FAR ONLY EASTERN AND WESTERN BOUNDARIES ARE SUPPORTED.) \\ |
342 |
|
The boundary conditions following \citet{stevens:90} require the |
343 |
|
vertically averaged normal velocity (originally specified as a stream |
344 |
|
function along the open boundary) $\bar{u}_{ob}$ and the tracer fields |
345 |
|
$\chi_{ob}$ (note: passive tracers are currently not implemented and |
346 |
|
the code stops when package \code{ptracers} is used together with this |
347 |
|
option). Currently, the code vertically averages the normal velocity |
348 |
|
as specified. From these prescribed values the code computes the |
349 |
|
boundary values for the next timestep $n+1$ as follows (as an |
350 |
|
example, we use the notation for an eastern or western boundary): |
351 |
|
\begin{itemize} |
352 |
|
\item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + u'(y,z)$, where $u_{n}'$ is the |
353 |
|
deviation from the vertically averaged velocity one grid point |
354 |
|
inward from the boundary. |
355 |
|
\item If $u^{n+1}$ is directed into the model domain, the boudary |
356 |
|
value for tracer $\chi$ is restored to the prescribed values: |
357 |
|
\[\chi^{n+1} = \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} - |
358 |
|
\chi^{n}),\] where $\tau_\chi$ is the relaxation time |
359 |
|
scale \texttt{T/SrelaxStevens}. |
360 |
|
\item If $u^{n+1}$ is directed out of the model domain, the tracer is |
361 |
|
advected out of the domain with $u^{n+1}+c$, where $c$ is a phase |
362 |
|
velocity estimated as |
363 |
|
$\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. |
364 |
|
For test purposes, the phase velocity contribution or the entire |
365 |
|
advection can |
366 |
|
be turned off by setting the corresponding parameters |
367 |
|
\texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to |
368 |
|
\texttt{.FALSE.}.\end{itemize} See \citet{stevens:90} for details. |
369 |
|
|
370 |
\paragraph{OBCS\_BALANCE} ~ \\ |
\paragraph{OBCS\_BALANCE} ~ \\ |
371 |
% |
% |
439 |
\item{Ocean experiment in exp4 verification directory. } |
\item{Ocean experiment in exp4 verification directory. } |
440 |
\end{itemize} |
\end{itemize} |
441 |
|
|
442 |
|
|
443 |
|
%%% Local Variables: |
444 |
|
%%% mode: latex |
445 |
|
%%% TeX-master: "../../manual" |
446 |
|
%%% End: |