| 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 |
|
|
Authors: Martin Losch and Patrick Heimbach |
| 9 |
|
|
|
| 10 |
|
|
\subsubsection{Introduction |
| 11 |
|
|
\label{sec:pkg:obcs:intro}} |
| 12 |
|
|
|
| 13 |
|
|
|
| 14 |
|
|
|
| 15 |
|
|
%---------------------------------------------------------------------- |
| 16 |
|
|
|
| 17 |
|
|
\subsubsection{OBCS configuration and compiling |
| 18 |
|
|
\label{sec:pkg:kpp:comp}} |
| 19 |
|
|
|
| 20 |
|
|
As with all MITgcm packages, OBCS can be turned on or off |
| 21 |
|
|
at compile time |
| 22 |
|
|
% |
| 23 |
|
|
\begin{itemize} |
| 24 |
|
|
% |
| 25 |
|
|
\item |
| 26 |
|
|
using the \texttt{packages.conf} file by adding \texttt{obcs} to it, |
| 27 |
|
|
% |
| 28 |
|
|
\item |
| 29 |
|
|
or using \texttt{genmake2} adding |
| 30 |
|
|
\texttt{-enable=obcs} or \texttt{-disable=obcs} switches |
| 31 |
|
|
% |
| 32 |
|
|
\item |
| 33 |
|
|
\textit{Required packages and CPP options:} \\ |
| 34 |
|
|
% |
| 35 |
|
|
To alternatives are available for prescribing open boundary values, |
| 36 |
|
|
which differ in the way how OB's are treated in time: |
| 37 |
|
|
A simple time-management (e.g. constant in time, or cyclic with |
| 38 |
|
|
fixed fequency) is provided through |
| 39 |
|
|
S/R \texttt{obcs\_external\_fields\_load}. |
| 40 |
|
|
More sophisticated ``real-time'' (i.e. calendar time) management is |
| 41 |
|
|
available through \texttt{obcs\_prescribe\_read}. |
| 42 |
|
|
The latter case requires |
| 43 |
|
|
packages \texttt{cal} and \texttt{exf} to be enabled. |
| 44 |
|
|
% |
| 45 |
|
|
\end{itemize} |
| 46 |
|
|
(see also Section \ref{sect:buildingCode}). |
| 47 |
|
|
|
| 48 |
|
|
Parts of the OBCS code can be enabled or disabled at compile time |
| 49 |
|
|
via CPP preprocessor flags. These options are set in |
| 50 |
|
|
\texttt{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them. |
| 51 |
|
|
|
| 52 |
|
|
\begin{table}[h!] |
| 53 |
|
|
\centering |
| 54 |
|
|
\label{tab:pkg:obcs:cpp} |
| 55 |
|
|
{\footnotesize |
| 56 |
|
|
\begin{tabular}{|l|l|} |
| 57 |
|
|
\hline |
| 58 |
|
|
\textbf{CPP option} & \textbf{Description} \\ |
| 59 |
|
|
\hline \hline |
| 60 |
|
|
\texttt{ALLOW\_OBCS\_NORTH} & |
| 61 |
|
|
enable Northern OB \\ |
| 62 |
|
|
\texttt{ALLOW\_OBCS\_SOUTH} & |
| 63 |
|
|
enable Southern OB \\ |
| 64 |
|
|
\texttt{ALLOW\_OBCS\_EAST} & |
| 65 |
|
|
enable Eastern OB \\ |
| 66 |
|
|
\texttt{ALLOW\_OBCS\_WEST} & |
| 67 |
|
|
enable Western OB \\ |
| 68 |
|
|
\hline |
| 69 |
|
|
\texttt{ALLOW\_OBCS\_PRESCRIBE} & |
| 70 |
|
|
enable code for prescribing OB's \\ |
| 71 |
|
|
\texttt{ALLOW\_OBCS\_SPONGE} & |
| 72 |
|
|
enable sponge layer code \\ |
| 73 |
|
|
\texttt{ALLOW\_OBCS\_BALANCE} & |
| 74 |
|
|
enable code for balancing transports through OB's \\ |
| 75 |
|
|
\texttt{ALLOW\_ORLANSKI} & |
| 76 |
|
|
enable Orlanski radiation conditions at OB's \\ |
| 77 |
|
|
\hline |
| 78 |
|
|
\end{tabular} |
| 79 |
|
|
} |
| 80 |
|
|
\caption{~} |
| 81 |
|
|
\end{table} |
| 82 |
|
|
|
| 83 |
|
|
|
| 84 |
|
|
%---------------------------------------------------------------------- |
| 85 |
|
|
|
| 86 |
|
|
\subsubsection{Run-time parameters |
| 87 |
|
|
\label{sec:pkg:obcs:runtime}} |
| 88 |
|
|
|
| 89 |
|
|
Run-time parameters are set in files |
| 90 |
|
|
\texttt{data.pkg}, \texttt{data.obcs}, and \texttt{data.exf} |
| 91 |
|
|
if ``real-time'' prescription is requested |
| 92 |
|
|
(i.e. package \texttt{exf} enabled). |
| 93 |
|
|
These parameter files are read in S/R |
| 94 |
|
|
\texttt{packages\_readparms.F}, \texttt{obcs\_readparms.F}, and |
| 95 |
|
|
\texttt{exf\_readparms.F}, respectively. |
| 96 |
|
|
Run-time parameters may be broken into 3 categories: |
| 97 |
|
|
(i) switching on/off the package at runtime, |
| 98 |
|
|
(ii) OBCS package flags and parameters, |
| 99 |
|
|
(iii) additional timing flags in \texttt{data.exf}, if selected. |
| 100 |
|
|
|
| 101 |
|
|
\paragraph{Enabling the package} |
| 102 |
|
|
~ \\ |
| 103 |
|
|
% |
| 104 |
|
|
The OBCS package is switched on at runtime by setting |
| 105 |
|
|
\texttt{useOBCS = .TRUE.} in \texttt{data.pkg}. |
| 106 |
|
|
|
| 107 |
|
|
\paragraph{Package flags and parameters} |
| 108 |
|
|
~ \\ |
| 109 |
|
|
% |
| 110 |
|
|
Table \ref{tab:pkg:obcs:runtime_flags} summarizes the |
| 111 |
|
|
runtime flags that are set in \texttt{data.obcs}, and |
| 112 |
|
|
their default values. |
| 113 |
|
|
|
| 114 |
|
|
\begin{table}[h!] |
| 115 |
|
|
\centering |
| 116 |
|
|
\label{tab:pkg:obcs:runtime_flags} |
| 117 |
|
|
{\footnotesize |
| 118 |
|
|
\begin{tabular}{|l|c|l|} |
| 119 |
|
|
\hline |
| 120 |
|
|
\textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\ |
| 121 |
|
|
\hline \hline |
| 122 |
|
|
\multicolumn{3}{|c|}{\textit{basic flags \& parameters} } \\ |
| 123 |
|
|
\hline |
| 124 |
|
|
OB\_Jnorth & 0 & |
| 125 |
|
|
Nx-vector of J-indices (w.r.t. Ny) of Northern OB |
| 126 |
|
|
at each I-position (w.r.t. Nx) \\ |
| 127 |
|
|
OB\_Jsouth & 0 & |
| 128 |
|
|
Nx-vector of J-indices (w.r.t. Ny) of Southern OB |
| 129 |
|
|
at each I-position (w.r.t. Nx) \\ |
| 130 |
|
|
OB\_Ieast & 0 & |
| 131 |
|
|
Ny-vector of I-indices (w.r.t. Nx) of Eastern OB |
| 132 |
|
|
at each J-position (w.r.t. Ny) \\ |
| 133 |
|
|
OB\_Iwest & 0 & |
| 134 |
|
|
Ny-vector of I-indices (w.r.t. Nx) of Western OB |
| 135 |
|
|
at each J-position (w.r.t. Ny) \\ |
| 136 |
|
|
useOBCSprescribe & \texttt{.FALSE.} & |
| 137 |
|
|
~ \\ |
| 138 |
|
|
useOBCSsponge & \texttt{.FALSE.} & |
| 139 |
|
|
~ \\ |
| 140 |
|
|
useOBCSbalance & \texttt{.FALSE.} & |
| 141 |
|
|
~ \\ |
| 142 |
|
|
OB\textbf{X}\textbf{y}File & ~ & |
| 143 |
|
|
file name of OB field \\ |
| 144 |
|
|
~ & ~ & |
| 145 |
|
|
\textbf{X}: \textbf{N}(orth), \textbf{S}(outh), |
| 146 |
|
|
\textbf{E}(ast), \textbf{W}(est) \\ |
| 147 |
|
|
~ & ~ & |
| 148 |
|
|
\textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity), |
| 149 |
|
|
\textbf{u}(-velocity), \textbf{v}(-velocity) \\ |
| 150 |
|
|
\hline |
| 151 |
|
|
\multicolumn{3}{|c|}{\textit{Orlanski parameters} } \\ |
| 152 |
|
|
\hline |
| 153 |
|
|
cvelTimeScale & 2000 sec & |
| 154 |
|
|
averaging period for phase speed \\ |
| 155 |
|
|
CMAX & 0.45 m/s & |
| 156 |
|
|
maximum allowable phase speed-CFL for AB-II \\ |
| 157 |
|
|
CFIX & 0.8 m/s & |
| 158 |
|
|
fixed boundary phase speed \\ |
| 159 |
|
|
useFixedCEast & .FALSE. & |
| 160 |
|
|
~ \\ |
| 161 |
|
|
useFixedCWest & .FALSE. & |
| 162 |
|
|
~ \\ |
| 163 |
|
|
\hline |
| 164 |
|
|
\multicolumn{3}{|c|}{\textit{Sponge-layer parameters} } \\ |
| 165 |
|
|
\hline |
| 166 |
|
|
spongeThickness & 0 & |
| 167 |
|
|
sponge layer thickness (in \# grid points) \\ |
| 168 |
|
|
Urelaxobcsinner & 0 sec & |
| 169 |
|
|
relaxation time scale at the |
| 170 |
|
|
innermost sponge layer point of a meridional OB \\ |
| 171 |
|
|
Vrelaxobcsinner & 0 sec & |
| 172 |
|
|
relaxation time scale at the |
| 173 |
|
|
innermost sponge layer point of a zonal OB \\ |
| 174 |
|
|
Urelaxobcsbound & 0 sec & |
| 175 |
|
|
relaxation time scale at the |
| 176 |
|
|
outermost sponge layer point of a meridional OB \\ |
| 177 |
|
|
Vrelaxobcsbound & 0 sec & |
| 178 |
|
|
relaxation time scale at the |
| 179 |
|
|
outermost sponge layer point of a zonal OB \\ |
| 180 |
|
|
\hline |
| 181 |
|
|
\hline |
| 182 |
|
|
\end{tabular} |
| 183 |
|
|
} |
| 184 |
|
|
\caption{~} |
| 185 |
|
|
\end{table} |
| 186 |
|
|
|
| 187 |
|
|
|
| 188 |
|
|
|
| 189 |
|
|
%---------------------------------------------------------------------- |
| 190 |
|
|
|
| 191 |
|
|
\subsubsection{Equations and key routines |
| 192 |
|
|
\label{sec:pkg:obcs:equations}} |
| 193 |
|
|
|
| 194 |
|
|
\paragraph{OBCS\_READPARMS:} Setting OB positions \\ |
| 195 |
|
|
~ |
| 196 |
|
|
|
| 197 |
|
|
\paragraph{OBCS\_CALC:} ~ \\ |
| 198 |
|
|
~ |
| 199 |
|
|
|
| 200 |
|
|
\paragraph{OBCS\_APPLY\_*:} ~ \\ |
| 201 |
|
|
~ |
| 202 |
|
|
|
| 203 |
|
|
\paragraph{OBCS\_PRESCRIBE\_READ} Setting OB fields and updates \\ |
| 204 |
|
|
% |
| 205 |
|
|
~ |
| 206 |
|
|
|
| 207 |
|
|
\paragraph{OBCS\_SPONGE} Setting sponge layer characteristics \\ |
| 208 |
|
|
% |
| 209 |
|
|
~ |
| 210 |
|
|
|
| 211 |
|
|
\paragraph{OBCS\_BALANCE} ~ \\ |
| 212 |
|
|
% |
| 213 |
|
|
~ |
| 214 |
|
|
|
| 215 |
|
|
\paragraph{ORLANSKI} Orlanski radiation conditions \\ |
| 216 |
|
|
% |
| 217 |
|
|
~ |
| 218 |
|
|
|
| 219 |
|
|
\paragraph{OB's with nonlinear free surface} ~ \\ |
| 220 |
|
|
% |
| 221 |
|
|
~ |
| 222 |
|
|
|
| 223 |
|
|
|
| 224 |
|
|
%---------------------------------------------------------------------- |
| 225 |
|
|
|
| 226 |
|
|
\subsubsection{Flow chart |
| 227 |
|
|
\label{sec:pkg:obcs:flowchart}} |
| 228 |
|
|
|
| 229 |
|
|
|
| 230 |
|
|
{\footnotesize |
| 231 |
|
|
\begin{verbatim} |
| 232 |
|
|
|
| 233 |
|
|
C !CALLING SEQUENCE: |
| 234 |
|
|
c ... |
| 235 |
|
|
|
| 236 |
|
|
\end{verbatim} |
| 237 |
|
|
} |
| 238 |
|
|
|
| 239 |
|
|
%---------------------------------------------------------------------- |
| 240 |
|
|
|
| 241 |
|
|
\subsubsection{OBCS diagnostics |
| 242 |
|
|
\label{sec:pkg:obcs:diagnostics}} |
| 243 |
|
|
|
| 244 |
|
|
Diagnostics output is available via the diagnostics package |
| 245 |
|
|
(see Section \ref{sec:pkg:diagnostics}). |
| 246 |
|
|
Available output fields are summarized in |
| 247 |
|
|
Table \ref{tab:pkg:obcs:diagnostics}. |
| 248 |
|
|
|
| 249 |
|
|
\begin{table}[h!] |
| 250 |
|
|
\centering |
| 251 |
|
|
\label{tab:pkg:obcs:diagnostics} |
| 252 |
|
|
{\footnotesize |
| 253 |
|
|
\begin{verbatim} |
| 254 |
|
|
------------------------------------------------------ |
| 255 |
|
|
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
| 256 |
|
|
------------------------------------------------------ |
| 257 |
|
|
|
| 258 |
|
|
\end{verbatim} |
| 259 |
|
|
} |
| 260 |
|
|
\caption{~} |
| 261 |
|
|
\end{table} |
| 262 |
|
|
|
| 263 |
|
|
%---------------------------------------------------------------------- |
| 264 |
|
|
|
| 265 |
|
|
\subsubsection{Reference experiments} |
| 266 |
|
|
|
| 267 |
|
|
|
| 268 |
|
|
|
| 269 |
|
|
%---------------------------------------------------------------------- |
| 270 |
|
|
|
| 271 |
|
|
\subsubsection{References} |
| 272 |
|
|
|