/[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.6 - (hide annotations) (download) (as text)
Fri Feb 25 17:26:17 2011 UTC (14 years, 5 months ago) by mlosch
Branch: MAIN
Changes since 1.5: +136 -42 lines
File MIME type: application/x-tex
add description of more runtime parameters, add test about reading
boundary values from a file and the new and incomplete Stevens
boundary conditions.

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    
15    
16     %----------------------------------------------------------------------
17    
18     \subsubsection{OBCS configuration and compiling
19 jmc 1.4 \label{sec:pkg:obcs:comp}}
20 heimbach 1.1
21     As with all MITgcm packages, OBCS can be turned on or off
22     at compile time
23     %
24     \begin{itemize}
25     %
26     \item
27 mlosch 1.6 using the \code{packages.conf} file by adding \code{obcs} to it,
28 heimbach 1.1 %
29     \item
30 mlosch 1.6 or using \code{genmake2} adding
31     \code{-enable=obcs} or \code{-disable=obcs} switches
32 heimbach 1.1 %
33     \item
34     \textit{Required packages and CPP options:} \\
35     %
36     To alternatives are available for prescribing open boundary values,
37     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
39     fixed fequency) is provided through
40 mlosch 1.6 S/R \code{obcs\_external\_fields\_load}.
41 heimbach 1.1 More sophisticated ``real-time'' (i.e. calendar time) management is
42 mlosch 1.6 available through \code{obcs\_prescribe\_read}.
43 heimbach 1.1 The latter case requires
44 mlosch 1.6 packages \code{cal} and \code{exf} to be enabled.
45 heimbach 1.1 %
46     \end{itemize}
47 jmc 1.5 (see also Section \ref{sec:buildingCode}).
48 heimbach 1.1
49     Parts of the OBCS code can be enabled or disabled at compile time
50     via CPP preprocessor flags. These options are set in
51 mlosch 1.6 \code{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them.
52 heimbach 1.1
53 jmc 1.5 \begin{table}[!ht]
54 heimbach 1.1 \centering
55     \label{tab:pkg:obcs:cpp}
56     {\footnotesize
57     \begin{tabular}{|l|l|}
58     \hline
59     \textbf{CPP option} & \textbf{Description} \\
60     \hline \hline
61 mlosch 1.6 \code{ALLOW\_OBCS\_NORTH} &
62 heimbach 1.1 enable Northern OB \\
63 mlosch 1.6 \code{ALLOW\_OBCS\_SOUTH} &
64 heimbach 1.1 enable Southern OB \\
65 mlosch 1.6 \code{ALLOW\_OBCS\_EAST} &
66 heimbach 1.1 enable Eastern OB \\
67 mlosch 1.6 \code{ALLOW\_OBCS\_WEST} &
68 heimbach 1.1 enable Western OB \\
69     \hline
70 mlosch 1.6 \code{ALLOW\_OBCS\_PRESCRIBE} &
71 heimbach 1.1 enable code for prescribing OB's \\
72 mlosch 1.6 \code{ALLOW\_OBCS\_SPONGE} &
73 heimbach 1.1 enable sponge layer code \\
74 mlosch 1.6 \code{ALLOW\_OBCS\_BALANCE} &
75 heimbach 1.1 enable code for balancing transports through OB's \\
76 mlosch 1.6 \code{ALLOW\_ORLANSKI} &
77 heimbach 1.1 enable Orlanski radiation conditions at OB's \\
78 mlosch 1.6 \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 heimbach 1.1 \hline
83     \end{tabular}
84     }
85     \caption{~}
86     \end{table}
87    
88    
89     %----------------------------------------------------------------------
90    
91     \subsubsection{Run-time parameters
92     \label{sec:pkg:obcs:runtime}}
93    
94     Run-time parameters are set in files
95 mlosch 1.6 \code{data.pkg}, \code{data.obcs}, and \code{data.exf}
96 heimbach 1.1 if ``real-time'' prescription is requested
97 mlosch 1.6 (i.e. package \code{exf} enabled).
98 heimbach 1.1 These parameter files are read in S/R
99 mlosch 1.6 \code{packages\_readparms.F}, \code{obcs\_readparms.F}, and
100     \code{exf\_readparms.F}, respectively.
101 heimbach 1.1 Run-time parameters may be broken into 3 categories:
102     (i) switching on/off the package at runtime,
103     (ii) OBCS package flags and parameters,
104 mlosch 1.6 (iii) additional timing flags in \code{data.exf}, if selected.
105 heimbach 1.1
106     \paragraph{Enabling the package}
107     ~ \\
108     %
109     The OBCS package is switched on at runtime by setting
110 mlosch 1.6 \code{useOBCS = .TRUE.} in \code{data.pkg}.
111 heimbach 1.1
112     \paragraph{Package flags and parameters}
113     ~ \\
114     %
115     Table \ref{tab:pkg:obcs:runtime_flags} summarizes the
116 mlosch 1.6 runtime flags that are set in \code{data.obcs}, and
117 heimbach 1.1 their default values.
118    
119 jmc 1.5 \begin{table}[!ht]
120 heimbach 1.1 \centering
121     {\footnotesize
122     \begin{tabular}{|l|c|l|}
123     \hline
124     \textbf{Flag/parameter} & \textbf{default} & \textbf{Description} \\
125     \hline \hline
126 mlosch 1.6 \multicolumn{3}{|c|}{\textit{basic flags \& parameters} (OBCS\_PARM01) } \\
127 heimbach 1.1 \hline
128     OB\_Jnorth & 0 &
129     Nx-vector of J-indices (w.r.t. Ny) of Northern OB
130     at each I-position (w.r.t. Nx) \\
131     OB\_Jsouth & 0 &
132     Nx-vector of J-indices (w.r.t. Ny) of Southern OB
133     at each I-position (w.r.t. Nx) \\
134     OB\_Ieast & 0 &
135     Ny-vector of I-indices (w.r.t. Nx) of Eastern OB
136     at each J-position (w.r.t. Ny) \\
137     OB\_Iwest & 0 &
138     Ny-vector of I-indices (w.r.t. Nx) of Western OB
139     at each J-position (w.r.t. Ny) \\
140 mlosch 1.6 useOBCSprescribe & \code{.FALSE.} &
141 heimbach 1.1 ~ \\
142 mlosch 1.6 useOBCSsponge & \code{.FALSE.} &
143 heimbach 1.1 ~ \\
144 mlosch 1.6 useOBCSbalance & \code{.FALSE.} &
145 heimbach 1.1 ~ \\
146 mlosch 1.6 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 heimbach 1.1 OB\textbf{X}\textbf{y}File & ~ &
151     file name of OB field \\
152     ~ & ~ &
153     \textbf{X}: \textbf{N}(orth), \textbf{S}(outh),
154     \textbf{E}(ast), \textbf{W}(est) \\
155     ~ & ~ &
156     \textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity),
157 mlosch 1.6 \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 heimbach 1.1 \hline
164 mlosch 1.6 \multicolumn{3}{|c|}{\textit{Orlanski parameters} (OBCS\_PARM02) } \\
165 heimbach 1.1 \hline
166     cvelTimeScale & 2000 sec &
167     averaging period for phase speed \\
168     CMAX & 0.45 m/s &
169     maximum allowable phase speed-CFL for AB-II \\
170     CFIX & 0.8 m/s &
171     fixed boundary phase speed \\
172 mlosch 1.6 useFixedCEast & \code{.FALSE.} &
173 heimbach 1.1 ~ \\
174 mlosch 1.6 useFixedCWest & \code{.FALSE.} &
175 heimbach 1.1 ~ \\
176     \hline
177 mlosch 1.6 \multicolumn{3}{|c|}{\textit{Sponge-layer parameters} (OBCS\_PARM03)} \\
178 heimbach 1.1 \hline
179     spongeThickness & 0 &
180     sponge layer thickness (in \# grid points) \\
181     Urelaxobcsinner & 0 sec &
182     relaxation time scale at the
183     innermost sponge layer point of a meridional OB \\
184     Vrelaxobcsinner & 0 sec &
185     relaxation time scale at the
186     innermost sponge layer point of a zonal OB \\
187     Urelaxobcsbound & 0 sec &
188     relaxation time scale at the
189     outermost sponge layer point of a meridional OB \\
190     Vrelaxobcsbound & 0 sec &
191     relaxation time scale at the
192     outermost sponge layer point of a zonal OB \\
193 mlosch 1.6 \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 heimbach 1.1 \hline
201     \hline
202     \end{tabular}
203     }
204 jmc 1.5 \caption{pkg OBCS run-time parameters}
205     \label{tab:pkg:obcs:runtime_flags}
206 heimbach 1.1 \end{table}
207    
208    
209    
210     %----------------------------------------------------------------------
211    
212 heimbach 1.2 \subsubsection{Defining open boundary positions
213     \label{sec:pkg:obcs:defining}}
214    
215     There are four open boundaries (OBs), a
216     Northern, Southern, Eastern, and Western.
217     All OB locations are specified by their absolute
218     meridional (Northern/Southern) or zonal (Eastern/Western) indices.
219 mlosch 1.6 Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index
220 heimbach 1.2 $j$ specifies the Northern/Southern OB position,
221 mlosch 1.6 and for each meridional position $j=1,\ldots,N_y$, a zonal index
222 heimbach 1.2 $i$ specifies the Eastern/Western OB position.
223 mlosch 1.6 For Northern/Southern OB this defines an $N_x$-dimensional
224 heimbach 1.2 ``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$,
225 mlosch 1.6 and an $N_y$-dimenisonal
226     ``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$.
227 heimbach 1.2 Positions determined in this way allows Northern/Southern
228     OBs to be at variable $j$ (or $y$) positions, and Eastern/Western
229     OBs at variable $i$ (or $x$) positions.
230     Here, indices refer to tracer points on the C-grid.
231     A zero (0) element in $\tt OB\_I\ldots$, $\tt OB\_J\ldots$
232     means there is no corresponding OB in that column/row.
233     For a Northern/Southern OB, the OB V point is to the South/North.
234     For an Eastern/Western OB, the OB U point is to the West/East.
235    
236     \begin{verbatim}
237     For example
238     OB_Jnorth(3)=34 means that:
239     T( 3 ,34) is a an OB point
240     U(3:4,34) is a an OB point
241     V( 4 ,34) is a an OB point
242     while
243     OB_Jsouth(3)=1 means that:
244     T( 3 ,1) is a an OB point
245     U(3:4,1) is a an OB point
246     V( 4 ,2) is a an OB point
247     \end{verbatim}
248    
249     For convenience, negative values for Jnorth/Ieast refer to
250     points relative to the Northern/Eastern edges of the model
251     eg. $\tt OB\_Jnorth(3)=-1$ means that the point $\tt (3,Ny)$
252     is a northern OB.
253    
254     \noindent
255     \textsf{Add special comments for case \#define NONLIN\_FRSURF,
256     see obcs\_ini\_fixed.F}
257    
258     %----------------------------------------------------------------------
259    
260 heimbach 1.1 \subsubsection{Equations and key routines
261     \label{sec:pkg:obcs:equations}}
262    
263 heimbach 1.2 \paragraph{OBCS\_READPARMS:} ~ \\
264     Set OB positions through arrays
265     {\tt OB\_Jnorth(Ny), OB\_Jsouth(Ny), OB\_Ieast(Nx), OB\_Iwest(Nx)},
266 jmc 1.5 and runtime flags (see Table \ref{tab:pkg:obcs:runtime_flags}).
267 heimbach 1.1
268     \paragraph{OBCS\_CALC:} ~ \\
269 heimbach 1.2 %
270     Top-level routine for filling values to be applied at OB for
271     $T,S,U,V,\eta$ into corresponding
272     ``slice'' arrays $(x,z)$, $(y,z)$ for each OB:
273     $\tt OB[N/S/E/W][t/s/u/v]$; e.g. for salinity array at
274     Southern OB, array name is $\tt OBSt$.
275     Values filled are either
276     %
277     \begin{itemize}
278     %
279     \item
280     constant vertical $T,S$ profiles as specified in file
281     {\tt data} ({\tt tRef(Nr), sRef(Nr)}) with zero velocities $U,V$,
282     %
283     \item
284     $T,S,U,V$ values determined via Orlanski radiation conditions
285     (see below),
286     %
287     \item
288     prescribed time-constant or time-varying fields (see below).
289     %
290 mlosch 1.6 \item
291     use prescribed boundary fields to compute Stevens boundary conditions.
292 heimbach 1.2 \end{itemize}
293    
294 heimbach 1.1
295 mlosch 1.6 \paragraph{ORLANSKI:} ~ \\
296 heimbach 1.2 %
297 mlosch 1.6 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 heimbach 1.1
370 heimbach 1.2 \paragraph{OBCS\_BALANCE} ~ \\
371 heimbach 1.1 %
372     ~
373    
374 heimbach 1.2 \paragraph{OBCS\_APPLY\_*:} ~ \\
375 heimbach 1.1 ~
376    
377 heimbach 1.2 \paragraph{OBCS\_SPONGE} Setting sponge layer characteristics \\
378 heimbach 1.1 %
379     ~
380    
381     \paragraph{OB's with nonlinear free surface} ~ \\
382     %
383     ~
384    
385    
386     %----------------------------------------------------------------------
387    
388     \subsubsection{Flow chart
389     \label{sec:pkg:obcs:flowchart}}
390    
391    
392     {\footnotesize
393     \begin{verbatim}
394    
395     C !CALLING SEQUENCE:
396     c ...
397    
398     \end{verbatim}
399     }
400    
401     %----------------------------------------------------------------------
402    
403     \subsubsection{OBCS diagnostics
404     \label{sec:pkg:obcs:diagnostics}}
405    
406     Diagnostics output is available via the diagnostics package
407     (see Section \ref{sec:pkg:diagnostics}).
408     Available output fields are summarized in
409     Table \ref{tab:pkg:obcs:diagnostics}.
410    
411 jmc 1.5 \begin{table}[!ht]
412 heimbach 1.1 \centering
413     \label{tab:pkg:obcs:diagnostics}
414     {\footnotesize
415     \begin{verbatim}
416     ------------------------------------------------------
417     <-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c)
418     ------------------------------------------------------
419    
420     \end{verbatim}
421     }
422     \caption{~}
423     \end{table}
424    
425     %----------------------------------------------------------------------
426    
427     \subsubsection{Reference experiments}
428    
429    
430    
431     %----------------------------------------------------------------------
432    
433     \subsubsection{References}
434    
435 molod 1.3 \subsubsection{Experiments and tutorials that use obcs}
436     \label{sec:pkg:obcs:experiments}
437    
438     \begin{itemize}
439     \item{Ocean experiment in exp4 verification directory. }
440     \end{itemize}
441    
442 mlosch 1.6
443     %%% Local Variables:
444     %%% mode: latex
445     %%% TeX-master: "../../manual"
446     %%% End:

  ViewVC Help
Powered by ViewVC 1.1.22