/[MITgcm]/manual/s_phys_pkgs/text/obcs.tex
ViewVC logotype

Annotation of /manual/s_phys_pkgs/text/obcs.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.18 - (hide annotations) (download) (as text)
Wed Jun 15 13:40:53 2016 UTC (9 years, 1 month ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint01, HEAD
Changes since 1.17: +18 -0 lines
File MIME type: application/x-tex
add a simple example for specifying boundary points

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 mlosch 1.9 MITgcm, but there are so many details to be considered in
16 mlosch 1.7 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 mlosch 1.8 vThese 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.10 OBCS\_balanceFacN/S/E/W & 1 & factor(s) determining the details
157 mlosch 1.8 of the balaning code \\
158 mlosch 1.6 useOrlanskiNorth/South/EastWest & \code{.FALSE.} &
159     turn on Orlanski boundary conditions for individual boundary\\
160     useStevensNorth/South/EastWest & \code{.FALSE.} &
161     turn on Stevens boundary conditions for individual boundary\\
162 heimbach 1.1 OB\textbf{X}\textbf{y}File & ~ &
163     file name of OB field \\
164     ~ & ~ &
165     \textbf{X}: \textbf{N}(orth), \textbf{S}(outh),
166     \textbf{E}(ast), \textbf{W}(est) \\
167     ~ & ~ &
168     \textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity),
169 mlosch 1.6 \textbf{u}(-velocity), \textbf{v}(-velocity), \\
170     ~ & ~ &
171     \textbf{w}(-velocity), \textbf{eta}(sea surface height)\\
172     ~ & ~ &
173     \textbf{a}(sea ice area), \textbf{h}(sea ice thickness),
174     \textbf{sn}(snow thickness), \textbf{sl}(sea ice salinity)\\
175 heimbach 1.1 \hline
176 mlosch 1.6 \multicolumn{3}{|c|}{\textit{Orlanski parameters} (OBCS\_PARM02) } \\
177 heimbach 1.1 \hline
178     cvelTimeScale & 2000 sec &
179     averaging period for phase speed \\
180     CMAX & 0.45 m/s &
181     maximum allowable phase speed-CFL for AB-II \\
182     CFIX & 0.8 m/s &
183     fixed boundary phase speed \\
184 mlosch 1.6 useFixedCEast & \code{.FALSE.} &
185 heimbach 1.1 ~ \\
186 mlosch 1.6 useFixedCWest & \code{.FALSE.} &
187 heimbach 1.1 ~ \\
188     \hline
189 mlosch 1.6 \multicolumn{3}{|c|}{\textit{Sponge-layer parameters} (OBCS\_PARM03)} \\
190 heimbach 1.1 \hline
191     spongeThickness & 0 &
192     sponge layer thickness (in \# grid points) \\
193     Urelaxobcsinner & 0 sec &
194     relaxation time scale at the
195     innermost sponge layer point of a meridional OB \\
196     Vrelaxobcsinner & 0 sec &
197     relaxation time scale at the
198     innermost sponge layer point of a zonal OB \\
199     Urelaxobcsbound & 0 sec &
200     relaxation time scale at the
201     outermost sponge layer point of a meridional OB \\
202     Vrelaxobcsbound & 0 sec &
203     relaxation time scale at the
204     outermost sponge layer point of a zonal OB \\
205 mlosch 1.6 \hline
206     \multicolumn{3}{|c|}{\textit{Stevens parameters} (OBCS\_PARM04) } \\
207     \hline
208     T/SrelaxStevens & 0~sec & relaxation time scale for
209     temperature/salinity \\
210     useStevensPhaseVel & \code{.TRUE.} & \\
211     useStevensAdvection & \code{.TRUE.} & \\
212 heimbach 1.1 \hline
213     \hline
214     \end{tabular}
215     }
216 jmc 1.5 \caption{pkg OBCS run-time parameters}
217     \label{tab:pkg:obcs:runtime_flags}
218 heimbach 1.1 \end{table}
219    
220    
221    
222     %----------------------------------------------------------------------
223    
224 heimbach 1.2 \subsubsection{Defining open boundary positions
225     \label{sec:pkg:obcs:defining}}
226    
227     There are four open boundaries (OBs), a
228     Northern, Southern, Eastern, and Western.
229     All OB locations are specified by their absolute
230     meridional (Northern/Southern) or zonal (Eastern/Western) indices.
231 mlosch 1.6 Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index
232 heimbach 1.2 $j$ specifies the Northern/Southern OB position,
233 mlosch 1.6 and for each meridional position $j=1,\ldots,N_y$, a zonal index
234 heimbach 1.2 $i$ specifies the Eastern/Western OB position.
235 mlosch 1.6 For Northern/Southern OB this defines an $N_x$-dimensional
236 mlosch 1.16 ``row'' array $\tt OB\_Jnorth(Nx)$ / $\tt OB\_Jsouth(Nx)$,
237 mlosch 1.6 and an $N_y$-dimenisonal
238 mlosch 1.16 ``column'' array $\tt OB\_Ieast(Ny)$ / $\tt OB\_Iwest(Ny)$.
239 heimbach 1.2 Positions determined in this way allows Northern/Southern
240     OBs to be at variable $j$ (or $y$) positions, and Eastern/Western
241     OBs at variable $i$ (or $x$) positions.
242     Here, indices refer to tracer points on the C-grid.
243     A zero (0) element in $\tt OB\_I\ldots$, $\tt OB\_J\ldots$
244     means there is no corresponding OB in that column/row.
245     For a Northern/Southern OB, the OB V point is to the South/North.
246     For an Eastern/Western OB, the OB U point is to the West/East.
247 mlosch 1.8 For example,
248     \begin{tabbing}
249     \code{OB\_Jnorth(3)=34} \= means that: \= \\
250     \> \code{T(3,34)} \> is a an OB point \\
251     \> \code{U(3,34)} \> is a an OB point \\
252     \> \code{V(3,34)} \> is a an OB point \\
253     \code{OB\_Jsouth(3)=1} \> means that: \\
254     \> \code{T(3,1)} \> is a an OB point \\
255     \> \code{U(3,1)} \> is a an OB point \\
256     \> \code{V(3,2)} \> is a an OB point \\
257     \code{OB\_Ieast(10)=69} \> means that: \> \\
258     \> \code{T(69,10)} \> is a an OB point \\
259     \> \code{U(69,10)} \> is a an OB point \\
260     \> \code{V(69,10)} \> is a an OB point \\
261     \code{OB\_Iwest(10)=1} \> means that: \> \\
262     \> \code{T(1,10)} \> is a an OB point \\
263     \> \code{U(2,10)} \> is a an OB point \\
264     \> \code{V(1,10)} \> is a an OB point
265     \end{tabbing}
266     For convenience, negative values for \code{Jnorth}/\code{Ieast} refer to
267 heimbach 1.2 points relative to the Northern/Eastern edges of the model
268     eg. $\tt OB\_Jnorth(3)=-1$ means that the point $\tt (3,Ny)$
269     is a northern OB.
270    
271 mlosch 1.18 \noindent\textbf{Simple examples:} For a model grid with $ N_{x}\times
272     N_{y} = 120\times144$ horizontal grid points with four open boundaries
273     along the four egdes of the domain, the simplest way of specifying the
274     boundary points in \code{data.obcs} is:
275     \begin{verbatim}
276     OB_Ieast = 144*-1,
277     # or OB_Ieast = 144*120,
278     OB_Iwest = 144*1,
279     OB_Jnorth = 120*-1,
280     # or OB_Jnorth = 120*144,
281     OB_Jsouth = 120*1,
282     \end{verbatim}
283     If only the first $50$ grid points of the southern boundary are
284     boundary points:
285     \begin{verbatim}
286     OB_Jsouth(1:50) = 50*1,
287     \end{verbatim}
288    
289 heimbach 1.2 \noindent
290     \textsf{Add special comments for case \#define NONLIN\_FRSURF,
291     see obcs\_ini\_fixed.F}
292    
293     %----------------------------------------------------------------------
294    
295 heimbach 1.1 \subsubsection{Equations and key routines
296     \label{sec:pkg:obcs:equations}}
297    
298 heimbach 1.2 \paragraph{OBCS\_READPARMS:} ~ \\
299     Set OB positions through arrays
300 mlosch 1.17 {\tt OB\_Jnorth(Nx), OB\_Jsouth(Nx), OB\_Ieast(Ny), OB\_Iwest(Ny)},
301 jmc 1.5 and runtime flags (see Table \ref{tab:pkg:obcs:runtime_flags}).
302 heimbach 1.1
303     \paragraph{OBCS\_CALC:} ~ \\
304 heimbach 1.2 %
305     Top-level routine for filling values to be applied at OB for
306     $T,S,U,V,\eta$ into corresponding
307     ``slice'' arrays $(x,z)$, $(y,z)$ for each OB:
308     $\tt OB[N/S/E/W][t/s/u/v]$; e.g. for salinity array at
309     Southern OB, array name is $\tt OBSt$.
310     Values filled are either
311     %
312     \begin{itemize}
313     %
314     \item
315     constant vertical $T,S$ profiles as specified in file
316     {\tt data} ({\tt tRef(Nr), sRef(Nr)}) with zero velocities $U,V$,
317     %
318     \item
319     $T,S,U,V$ values determined via Orlanski radiation conditions
320     (see below),
321     %
322     \item
323     prescribed time-constant or time-varying fields (see below).
324     %
325 mlosch 1.6 \item
326     use prescribed boundary fields to compute Stevens boundary conditions.
327 heimbach 1.2 \end{itemize}
328    
329 mlosch 1.6 \paragraph{ORLANSKI:} ~ \\
330 heimbach 1.2 %
331 mlosch 1.6 Orlanski radiation conditions \citep{orl:76}, examples can be found in
332     \code{verification/dome} and
333     \code{verification/tutorial\_plume\_on\_slope}
334     (\ref{sec:eg-gravityplume}).
335    
336     \paragraph{OBCS\_PRESCRIBE\_READ:} ~ \\
337     %
338     When \code{useOBCSprescribe = .TRUE.} the model tries to read
339     temperature, salinity, u- and v-velocities from files specified in the
340     runtime parameters \code{OB[N/S/E/W][t/s/u/v]File}. These files are
341     the usual IEEE, big-endian files with dimensions of a section along an
342     open boundary:
343     \begin{itemize}
344     \item For North/South boundary files the dimensions are
345     $(N_x\times N_r\times\mbox{time levels})$, for East/West boundary
346     files the dimensions are $(N_y\times N_r\times\mbox{time levels})$.
347     \item If a non-linear free surface is used
348     (\ref{sec:nonlinear-freesurface}), additional files
349     \code{OB[N/S/E/W]etaFile} for the sea surface height $\eta$ with
350     dimension $(N_{x/y}\times\mbox{time levels})$ may be specified.
351     \item If non-hydrostatic dynamics are used
352     (\ref{sec:non-hydrostatic}), additional files
353     \code{OB[N/S/E/W]wFile} for the vertical velocity $w$ with
354 mlosch 1.7 dimensions $(N_{x/y}\times N_r\times\mbox{time levels})$ can be
355 mlosch 1.6 specified.
356     \item If \code{useSEAICE=.TRUE.} then additional files
357     \code{OB[N/S/E/W][a,h,sl,sn,uice,vice]} for sea ice area, thickness
358     (\code{HEFF}), seaice salinity, snow and ice velocities
359 mlosch 1.7 $(N_{x/y}\times\mbox{time levels})$ can be specified.
360 mlosch 1.6 \end{itemize}
361 mlosch 1.7 As in \code{S/R external\_fields\_load} or the \code{exf}-package, the
362     code reads two time levels for each variable, e.g.\ \code{OBNu0} and
363     \code{OBNu1}, and interpolates linearly between these time levels to
364     obtain the value \code{OBNu} at the current model time (step). When the
365     \code{exf}-package is used, the time levels are controlled for each
366     boundary separately in the same way as the \code{exf}-fields in
367     \code{data.exf}, namelist \code{EXF\_NML\_OBCS}. The runtime flags
368 mlosch 1.6 follow the above naming conventions, e.g. for the western boundary the
369     corresponding flags are \code{OBCWstartdate1/2} and
370     \code{OBCWperiod}. Sea-ice boundary values are controlled separately
371 mlosch 1.7 with \code{siobWstartdate1/2} and \code{siobWperiod}. When the
372     \code{exf}-package is not used, the time levels are controlled by the
373     runtime flags \code{externForcingPeriod} and \code{externForcingCycle}
374     in \code{data}, see \code{verification/exp4} for an example.
375 mlosch 1.6
376     \paragraph{OBCS\_CALC\_STEVENS:} ~ \\
377 mlosch 1.15 (THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT
378     COMPLETE. PASSIVE TRACERS, SEA ICE AND NON-LINEAR FREE SURFACE ARE NOT
379     SUPPORTED PROPERLY.) \\
380 mlosch 1.6 The boundary conditions following \citet{stevens:90} require the
381     vertically averaged normal velocity (originally specified as a stream
382     function along the open boundary) $\bar{u}_{ob}$ and the tracer fields
383     $\chi_{ob}$ (note: passive tracers are currently not implemented and
384     the code stops when package \code{ptracers} is used together with this
385     option). Currently, the code vertically averages the normal velocity
386 mlosch 1.12 as specified in \code{OB[E,W]u} or \code{OB[N,S]v}. From these
387     prescribed values the code computes the boundary values for the next
388     timestep $n+1$ as follows (as an example, we use the notation for an
389     eastern or western boundary):
390 mlosch 1.6 \begin{itemize}
391 mlosch 1.14 \item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + (u')^{n}(y,z)$, where
392     $(u')^{n}$ is the deviation from the vertically averaged velocity at
393     timestep $n$ on the boundary. $(u')^{n}$ is computed in the previous
394     time step $n$ from the intermediate velocity $u^*$ prior to the
395     correction step (see section \ref{sec:time_stepping}, e.g.,
396     eq.\,(\ref{eq:ustar-backward-free-surface})).
397     % and~(\ref{eq:vstar-backward-free-surface})).
398     (This velocity is not
399     available at the beginning of the next time step $n+1$, when
400     S/R~OBCS\_CALC/OBCS\_CALC\_STEVENS are called, therefore it needs to
401     be saved in S/R~DYNAMICS by calling S/R~OBCS\_SAVE\_UV\_N and also
402     stored in a separate restart files
403     \verb+pickup_stevens[N/S/E/W].${iteration}.data+)
404     % Define CPP-flag OBCS\_STEVENS\_USE\_INTERIOR\_VELOCITY to use the
405     % velocity one grid point inward from the boundary.
406 mlosch 1.6 \item If $u^{n+1}$ is directed into the model domain, the boudary
407     value for tracer $\chi$ is restored to the prescribed values:
408     \[\chi^{n+1} = \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} -
409     \chi^{n}),\] where $\tau_\chi$ is the relaxation time
410 mlosch 1.12 scale \texttt{T/SrelaxStevens}. The new $\chi^{n+1}$ is then subject
411     to the advection by $u^{n+1}$.
412     \item If $u^{n+1}$ is directed out of the model domain, the tracer
413     $\chi^{n+1}$ on the boundary at timestep $n+1$ is estimated from
414 mlosch 1.14 advection out of the domain with $u^{n+1}+c$, where $c$ is
415 mlosch 1.12 a phase velocity estimated as
416     $\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. The
417     numerical scheme is (as an example for an eastern boundary):
418 mlosch 1.13 \[\chi_{i_{b},j,k}^{n+1} = \chi_{i_{b},j,k}^{n} + \Delta{t}
419 mlosch 1.12 (u^{n+1}+c)_{i_{b},j,k}\frac{\chi_{i_{b},j,k}^{n}
420     - \chi_{i_{b}-1,j,k}^{n}}{\Delta{x}_{i_{b},j}^{C}}\mbox{, if }u_{i_{b},j,k}^{n+1}>0,
421 mlosch 1.14 \] where $i_{b}$ is the boundary index.\\
422 mlosch 1.6 For test purposes, the phase velocity contribution or the entire
423 mlosch 1.12 advection can be turned off by setting the corresponding parameters
424 mlosch 1.6 \texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to
425 mlosch 1.14 \texttt{.FALSE.}.
426     \end{itemize}
427     See \citet{stevens:90} for details. With this boundary condition
428     specifying the exact net transport across the open boundary is simple,
429     so that balancing the flow with (S/R~OBCS\_BALANCE\_FLOW, see next
430     paragraph) is usually not necessary.
431 heimbach 1.1
432 mlosch 1.10 \paragraph{OBCS\_BALANCE\_FLOW:} ~ \\
433 heimbach 1.1 %
434 mlosch 1.10 When turned on (\code{ALLOW\_OBCS\_BALANCE}
435 mlosch 1.7 defined in \code{OBCS\_OPTIONS.h} and \code{useOBCSbalance=.true.} in
436 mlosch 1.10 \code{data.obcs/OBCS\_PARM01}), this routine balances the net flow
437     across the open boundaries. By default the net flow across the
438     boundaries is computed and all normal velocities on boundaries are
439     adjusted to obtain zero net inflow.
440    
441     This behavior can be controlled with the runtime flags
442     \code{OBCS\_balanceFacN/S/E/W}. The values of these flags determine
443     how the net inflow is redistributed as small correction velocities
444     between the individual sections. A value ``\code{-1}'' balances an
445     individual boundary, values $>0$ determine the relative size of the
446 mlosch 1.11 correction. For example, the values
447 mlosch 1.10 \begin{tabbing}
448 mlosch 1.11 \code{OBCS\_balanceFacE}\code{ = 1.,} \\
449     \code{OBCS\_balanceFacW}\code{ = -1.,} \\
450     \code{OBCS\_balanceFacN}\code{ = 2.,} \\
451     \code{OBCS\_balanceFacS}\code{ = 0.,}
452 mlosch 1.10 \end{tabbing}
453 mlosch 1.11 make the model
454 mlosch 1.10 \begin{itemize}
455     \item correct Western \code{OBWu} by substracting a uniform velocity to
456 mlosch 1.11 ensure zero net transport through the Western open boundary;
457 mlosch 1.10 \item correct Eastern and Northern normal flow, with the Northern
458 mlosch 1.11 velocity correction two times larger than the Eastern correction, but
459     \emph{not} the Southern normal flow, to ensure that the total inflow through
460     East, Northern, and Southern open boundary is balanced.
461 mlosch 1.10 \end{itemize}
462    
463     The old method of balancing the net flow for all sections individually
464     can be recovered by setting all flags to -1. Then the normal
465     velocities across each of the four boundaries are modified separately,
466     so that the net volume transport across \emph{each} boundary is
467     zero. For example, for the western boundary at $i=i_{b}$, the modified
468     velocity is:
469 mlosch 1.7 \[
470     u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k}
471     OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}.
472     \]
473 mlosch 1.11 This also ensures a net total inflow of zero through all boundaries,
474     but this combination of flags is \emph{not} useful if you want to
475     simulate, say, a sector of the Southern Ocean with a strong ACC
476     entering through the western and leaving through the eastern boundary,
477     because the value of ``\code{-1}'' for these flags will make sure that
478     the strong inflow is removed. Clearly, gobal balancing with
479     \code{OBCS\_balanceFacE/W/N/S} $\ge0$ is the preferred method.
480 heimbach 1.1
481 heimbach 1.2 \paragraph{OBCS\_APPLY\_*:} ~ \\
482 heimbach 1.1 ~
483    
484 mlosch 1.10 \paragraph{OBCS\_SPONGE:} ~ \\
485 heimbach 1.1 %
486 mlosch 1.10 The sponge layer code (turned on with \code{ALLOW\_OBCS\_SPONGE} and
487     \code{useOBCSsponge}) adds a relaxation term to the right-hand-side of
488     the momentum and tracer equations. The variables are relaxed towards
489     the boundary values with a relaxation time scale that increases
490     linearly with distance from the boundary
491     \[
492     G_{\chi}^{\mbox{(sponge)}} =
493     - \frac{\chi - [( L - \delta{L} ) \chi_{BC} + \delta{L}\chi]/L}
494     {[(L-\delta{L})\tau_{b}+\delta{L}\tau_{i}]/L}
495     = - \frac{\chi - [( 1 - l ) \chi_{BC} + l\chi]}
496     {[(1-l)\tau_{b}+l\tau_{i}]}
497     \]
498     where $\chi$ is the model variable (U/V/T/S) in the interior,
499     $\chi_{BC}$ the boundary value, $L$ the thickness of the sponge layer
500     (runtime parameter \code{spongeThickness} in number of grid points),
501 mlosch 1.11 $\delta{L}\in[0,L]$ ($\frac{\delta{L}}{L}=l\in[0,1]$) the distance from the boundary (also in grid points), and
502 mlosch 1.10 $\tau_{b}$ (runtime parameters \code{Urelaxobcsbound} and
503     \code{Vrelaxobcsbound}) and $\tau_{i}$ (runtime parameters
504     \code{Urelaxobcsinner} and \code{Vrelaxobcsinner}) the relaxation time
505     scales on the boundary and at the interior termination of the sponge
506     layer. The parameters \code{Urelaxobcsbound/inner} set the relaxation
507     time scales for the Eastern and Western boundaries,
508     \code{Vrelaxobcsbound/inner} for the Northern and Southern boundaries.
509 heimbach 1.1
510     \paragraph{OB's with nonlinear free surface} ~ \\
511     %
512     ~
513    
514    
515     %----------------------------------------------------------------------
516    
517     \subsubsection{Flow chart
518     \label{sec:pkg:obcs:flowchart}}
519    
520    
521     {\footnotesize
522     \begin{verbatim}
523    
524     C !CALLING SEQUENCE:
525     c ...
526    
527     \end{verbatim}
528     }
529    
530     %----------------------------------------------------------------------
531    
532     \subsubsection{OBCS diagnostics
533     \label{sec:pkg:obcs:diagnostics}}
534    
535     Diagnostics output is available via the diagnostics package
536     (see Section \ref{sec:pkg:diagnostics}).
537     Available output fields are summarized in
538     Table \ref{tab:pkg:obcs:diagnostics}.
539    
540 jmc 1.5 \begin{table}[!ht]
541 heimbach 1.1 \centering
542     \label{tab:pkg:obcs:diagnostics}
543     {\footnotesize
544     \begin{verbatim}
545     ------------------------------------------------------
546     <-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c)
547     ------------------------------------------------------
548    
549     \end{verbatim}
550     }
551     \caption{~}
552     \end{table}
553    
554     %----------------------------------------------------------------------
555    
556     \subsubsection{Reference experiments}
557 mlosch 1.7 In the directory \code{verifcation}, the following experiments use
558     \code{obcs}:
559     \begin{itemize}
560     \item \code{exp4}: box with 4 open boundaries, simulating flow over a
561     Gaussian bump based on \citet{adcroft:97}, also tests
562     Stevens-boundary conditions;
563 mlosch 1.8 \item \code{dome}: based on the project ``Dynamics of Overflow Mixing
564     and Entrainment''
565     (\url{http://www.rsmas.miami.edu/personal/tamay/DOME/dome.html}), uses
566     Orlanski-BCs;
567 mlosch 1.7 \item \code{internal\_wave}: uses a heavily modified \code{S/R~OBCS\_CALC}
568     \item \code{seaice\_obcs}: simple example who to use the sea-ice
569     related code, based on \code{lab\_sea};
570     \item \code{tutorial\_plume\_on\_slope}: uses Orlanski-BCs, see also
571     section~\ref{sec:eg-gravityplume}.
572     \end{itemize}
573 heimbach 1.1
574    
575    
576     %----------------------------------------------------------------------
577    
578     \subsubsection{References}
579    
580 molod 1.3 \subsubsection{Experiments and tutorials that use obcs}
581     \label{sec:pkg:obcs:experiments}
582    
583     \begin{itemize}
584 mlosch 1.7 \item \code{tutorial\_plume\_on\_slope} (section~\ref{sec:eg-gravityplume})
585 molod 1.3 \end{itemize}
586    
587 mlosch 1.6
588     %%% Local Variables:
589     %%% mode: latex
590     %%% TeX-master: "../../manual"
591     %%% End:

  ViewVC Help
Powered by ViewVC 1.1.22