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

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

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

revision 1.1 by heimbach, Thu Aug 11 23:58:07 2005 UTC revision 1.6 by mlosch, Fri Feb 25 17:26:17 2011 UTC
# Line 5  Line 5 
5  <!-- CMIREDIR:package_obcs: -->  <!-- CMIREDIR:package_obcs: -->
6  \end{rawhtml}  \end{rawhtml}
7    
8  Authors: Martin Losch and Patrick Heimbach  Authors:
9    Alistair Adcroft, Patrick Heimbach, Samar Katiwala, Martin Losch
10    
11  \subsubsection{Introduction  \subsubsection{Introduction
12  \label{sec:pkg:obcs:intro}}  \label{sec:pkg:obcs:intro}}
# Line 15  Authors: Martin Losch and Patrick Heimba Line 16  Authors: Martin Losch and Patrick Heimba
16  %----------------------------------------------------------------------  %----------------------------------------------------------------------
17    
18  \subsubsection{OBCS configuration and compiling  \subsubsection{OBCS configuration and compiling
19  \label{sec:pkg:kpp:comp}}  \label{sec:pkg:obcs:comp}}
20    
21  As with all MITgcm packages, OBCS can be turned on or off  As with all MITgcm packages, OBCS can be turned on or off
22  at compile time  at compile time
# Line 23  at compile time Line 24  at compile time
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:} \\
# Line 36  To alternatives are available for prescr Line 37  To alternatives are available for prescr
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{sect: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}[h!]  \begin{table}[!ht]
54  \centering  \centering
55    \label{tab:pkg:obcs:cpp}    \label{tab:pkg:obcs:cpp}
56    {\footnotesize    {\footnotesize
# Line 57  via CPP preprocessor flags. These option Line 58  via CPP preprocessor flags. These option
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    }    }
# Line 87  via CPP preprocessor flags. These option Line 92  via CPP preprocessor flags. These option
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}[h!]  \begin{table}[!ht]
120  \centering  \centering
   \label{tab:pkg:obcs:runtime_flags}  
121    {\footnotesize    {\footnotesize
122      \begin{tabular}{|l|c|l|}      \begin{tabular}{|l|c|l|}
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
# Line 133  their default values. Line 137  their default values.
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          ~ & ~ &          ~ & ~ &
# Line 146  their default values. Line 154  their default values.
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 \\
# Line 156  their default values. Line 169  their default values.
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) \\
# Line 177  their default values. Line 190  their default values.
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}
203    }    }
204    \caption{~}    \caption{pkg OBCS run-time parameters}
205      \label{tab:pkg:obcs:runtime_flags}
206  \end{table}  \end{table}
207    
208    
209    
210  %----------------------------------------------------------------------  %----------------------------------------------------------------------
211    
212    \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    Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index
220    $j$ specifies the Northern/Southern OB position,
221    and for each meridional position $j=1,\ldots,N_y$, a zonal index
222    $i$ specifies the Eastern/Western OB position.
223    For Northern/Southern OB this defines an $N_x$-dimensional
224    ``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$,
225    and an $N_y$-dimenisonal
226    ``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$.
227    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  \subsubsection{Equations and key routines  \subsubsection{Equations and key routines
261  \label{sec:pkg:obcs:equations}}  \label{sec:pkg:obcs:equations}}
262    
263  \paragraph{OBCS\_READPARMS:} Setting OB positions \\  \paragraph{OBCS\_READPARMS:} ~ \\
264  ~  Set OB positions through arrays
265    {\tt OB\_Jnorth(Ny), OB\_Jsouth(Ny), OB\_Ieast(Nx), OB\_Iwest(Nx)},
266    and runtime flags (see Table \ref{tab:pkg:obcs:runtime_flags}).
267    
268  \paragraph{OBCS\_CALC:} ~ \\  \paragraph{OBCS\_CALC:} ~ \\
269  ~  %
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    \item
291    use prescribed boundary fields to compute Stevens boundary conditions.
292    \end{itemize}
293    
 \paragraph{OBCS\_APPLY\_*:} ~ \\  
 ~  
294    
295  \paragraph{OBCS\_PRESCRIBE\_READ} Setting OB fields and updates \\  \paragraph{ORLANSKI:} ~ \\
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\_SPONGE} Setting sponge layer characteristics \\  \paragraph{OBCS\_BALANCE} ~ \\
371  %  %
372  ~  ~
373    
374  \paragraph{OBCS\_BALANCE} ~ \\  \paragraph{OBCS\_APPLY\_*:} ~ \\
 %  
375  ~  ~
376    
377  \paragraph{ORLANSKI} Orlanski radiation conditions \\  \paragraph{OBCS\_SPONGE} Setting sponge layer characteristics \\
378  %  %
379  ~  ~
380    
# Line 246  Diagnostics output is available via the Line 408  Diagnostics output is available via the
408  Available output fields are summarized in  Available output fields are summarized in
409  Table \ref{tab:pkg:obcs:diagnostics}.  Table \ref{tab:pkg:obcs:diagnostics}.
410    
411  \begin{table}[h!]  \begin{table}[!ht]
412  \centering  \centering
413  \label{tab:pkg:obcs:diagnostics}  \label{tab:pkg:obcs:diagnostics}
414  {\footnotesize  {\footnotesize
# Line 270  Table \ref{tab:pkg:obcs:diagnostics}. Line 432  Table \ref{tab:pkg:obcs:diagnostics}.
432    
433  \subsubsection{References}  \subsubsection{References}
434    
435    \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    
443    %%% Local Variables:
444    %%% mode: latex
445    %%% TeX-master: "../../manual"
446    %%% End:

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22