32 |
|
|
33 |
\subsubsection {Key subroutines and parameters} |
\subsubsection {Key subroutines and parameters} |
34 |
|
|
35 |
The only change need in the code might be in {RBCS.H}, for |
The only change need in the code might be in {RBCS.h}, for |
36 |
PARAMETER(maskLEN = 3 ), if you need more than 3 |
PARAMETER(maskLEN = 3 ), if you need more than 3 |
37 |
masks (see below). |
masks (see below). |
38 |
|
|
43 |
set in {\it data.rbcs}:\\ |
set in {\it data.rbcs}:\\ |
44 |
These runtime options include\\ |
These runtime options include\\ |
45 |
Set in {RBCS\_PARM01}:\\ |
Set in {RBCS\_PARM01}:\\ |
46 |
$\bullet$ Parameters to set the timing for periodic fields to |
%$\bullet$ Parameters to set the timing for periodic fields to |
47 |
relax to are to |
%relax to are to |
48 |
be loaded are: {\it rbcs\_ForcingPeriod}, {\it rbcs\_ForcingCycle}. |
%be loaded are: |
49 |
|
$\bullet$ {\bf rbcsForcingPeriod}, {\bf rbcsForcingCycle}: timing of |
50 |
|
fields to relax to. |
51 |
The former is how often to load, the latter is how often to cycle |
The former is how often to load, the latter is how often to cycle |
52 |
through those fields (eg. period couple be monthly and cycle one year). |
through those fields (eg. period could be monthly and cycle one year). |
53 |
rbcs\_ForcingCycle=0 meaning no periodic forcing, and the relax field |
rbcs\_ForcingCycle=0 means non-cyclic forcing, and |
54 |
|
rbcs\_ForcingPeriod=0 non-time-varying forcing, where the relax field |
55 |
is only read in at the beginning of the run and kept constant |
is only read in at the beginning of the run and kept constant |
56 |
the rest of the run. Default is 0. |
the rest of the run. Default is 0. |
57 |
\\ |
\\ |
58 |
$\bullet$ {\bf rbcsIniter}: if you want to offset rbcs forcing |
$\bullet$ {\bf rbcsForcingOffset}: time offset of forcing fields (in seconds). |
59 |
timing. Default is nIter0.\\ |
If the forcing fields are time averages over forcing periods, |
60 |
|
then this must be set to the time at the beginning of the |
61 |
|
first forcing period. The fields will then be placed at time |
62 |
|
rbcsForcingOffset+rbcsForcingPeriod/2 for interpolation. Default is 0. |
63 |
|
If you use snapshots and the first snapshot is at $t_1$, you need to set |
64 |
|
\[ |
65 |
|
{\rm rbcsForcingOffset} = t_1 - {\rm rbcsForcingPeriod}/2 |
66 |
|
\] |
67 |
|
(This used to be rbcsInIter and was in units of iterations.)\\ |
68 |
|
$\bullet$ {\bf rbcsSingleTimeFiles}: true or false (default false), |
69 |
|
if true, forcing fields are given 1 file per time labeled by iteration number.\\ |
70 |
|
$\bullet$ {\bf deltaTrbcs}: time step used to compute the iteration numbers |
71 |
|
for rbcsSingleTimeFiles=T.\\ |
72 |
|
$\bullet$ {\bf rbcsIter0}: shift in iteration numbers used to label files if |
73 |
|
rbcsSingleTimeFiles=T (default 0). If the file for the first forcing period |
74 |
|
(as specified by rbcsForcingOffset) has label $i_1$, you need to set |
75 |
|
\[ |
76 |
|
{\rm rbcsIter0} = i_1 - {\rm rbcsForcingPeriod}/{\rm deltaTrbcs} |
77 |
|
\] |
78 |
$\bullet$ {\bf useRBCtemp}: true or false (default false)\\ |
$\bullet$ {\bf useRBCtemp}: true or false (default false)\\ |
79 |
$\bullet$ {\bf useRBCsalt}: true or false (default false)\\ |
$\bullet$ {\bf useRBCsalt}: true or false (default false)\\ |
80 |
$\bullet$ {\bf useRBCptracers}: true or false (default false), must be using |
$\bullet$ {\bf useRBCptracers}: true or false (default false), must be using |
82 |
$\bullet$ {\bf tauRelaxT}: timescale in seconds of relaxing |
$\bullet$ {\bf tauRelaxT}: timescale in seconds of relaxing |
83 |
in temperature ($\tau_T$ in equation above). |
in temperature ($\tau_T$ in equation above). |
84 |
Where mask is 1, relax rate will be |
Where mask is 1, relax rate will be |
85 |
1/tauRelaxT. Default is 1. |
1/tauRelaxT. Default is 1.\\ |
86 |
$\bullet$ {\bf tauRelaxS}: same for salinity. |
$\bullet$ {\bf tauRelaxS}: same for salinity.\\ |
87 |
$\bullet$ {\bf relaxMaskFile(irbc)}: filename of 3-D file |
$\bullet$ {\bf relaxMaskFile(irbc)}: filename of 3-D file |
88 |
with mask ($M_{rbc}$ in equation above. |
with mask ($M_{rbc}$ in equation above. |
89 |
Need a file for each irbc. 1=temperature, |
Need a file for each irbc. 1=temperature, |
106 |
$\bullet$ {\bf relaxPtracerFile(iTrc)}: file with relax |
$\bullet$ {\bf relaxPtracerFile(iTrc)}: file with relax |
107 |
fields.\\ |
fields.\\ |
108 |
|
|
109 |
|
\noindent |
110 |
|
Typical ways of specifying timing of relaxation fields: |
111 |
|
\begin{enumerate} |
112 |
|
\item Constant-in-time forcing: |
113 |
|
\begin{quote} |
114 |
|
rbcsForcingPeriod = 0 |
115 |
|
\end{quote} |
116 |
|
One field is read and used for all times. Use this to emulate the result of |
117 |
|
rbcsForcingCycle=0 before 2010-11-10. |
118 |
|
|
119 |
|
\item Non-cyclic time-varying forcing: |
120 |
|
\begin{quote} |
121 |
|
rbcsForcingPeriod = period in seconds\\ |
122 |
|
rbcsForcingCycle = 0 |
123 |
|
\end{quote} |
124 |
|
When starting the run at time 0 (as usually the case), a period with center before |
125 |
|
or at time 0 is needed for time interpolation. If you are not providing separate |
126 |
|
files for each time (rbcsSingleTimeFiles=F), rbcsForcingOffset needs to be negative. |
127 |
|
For aligned periods (one period starting at time 0) and one extra record before |
128 |
|
time 0 (and ending at time 0), set rbcsForcingOffset${}=-$Period. |
129 |
|
For other situations, see the description of rbcsForcingOffset above. |
130 |
|
|
131 |
|
\item Cyclic Forcing: |
132 |
|
\begin{quote} |
133 |
|
rbcsForcingPeriod = period in seconds\\ |
134 |
|
rbcsForcingCycle = cycle in seconds |
135 |
|
\end{quote} |
136 |
|
The same comment as for non-cyclic forcing applies, but rbcsForcingOffset may now be |
137 |
|
after the time of the first required record even with rbcsSingleTimeFiles=F, in which |
138 |
|
case records from the end of the file will be used (via cyclicity). |
139 |
|
\end{enumerate} |
140 |
|
|
141 |
|
\noindent |
142 |
|
Ways to organize the files: |
143 |
|
\begin{enumerate} |
144 |
|
\item One big file with many time records: |
145 |
|
\begin{quote} |
146 |
|
rbcsSingleTimeFiles = .FALSE. |
147 |
|
\end{quote} |
148 |
|
All time records are in one big file. |
149 |
|
|
150 |
|
\item A separate file for each time: |
151 |
|
\begin{quote} |
152 |
|
rbcsSingleTimeFiles = .TRUE.\\ |
153 |
|
deltaTrbcs = time step used to generate forcing files\\ |
154 |
|
rbcsIter0 = iteration number of first file $-$ rbcsForcingPeriod/deltaTrbcs |
155 |
|
\end{quote} |
156 |
|
The rbcs field for each time needed is in a separate file, labeled by the |
157 |
|
iteration number at the end of the forcing period. If a different timestep |
158 |
|
was used for generating the files (and the file names), set deltaTrbcs to it. |
159 |
|
If there is a shift in time, set rbcsIter0. |
160 |
|
\end{enumerate} |
161 |
|
|
162 |
|
|
163 |
|
|
164 |
\subsubsection{Do's and Don'ts} |
\subsubsection{Do's and Don'ts} |
165 |
|
|
168 |
\subsubsection{Experiments and tutorials that use rbcs} |
\subsubsection{Experiments and tutorials that use rbcs} |
169 |
\label{sec:pkg:rbcs:experiments} |
\label{sec:pkg:rbcs:experiments} |
170 |
|
|
171 |
|
In the directory \code{verifcation}, the following experiments use |
172 |
|
\code{rbcs}: |
173 |
|
\begin{itemize} |
174 |
|
\item \code{exp4}: box with 4 open boundaries, simulating flow over a |
175 |
|
Gaussian bump based on \citet{adcroft:97}. |
176 |
|
\end{itemize} |
177 |
|
|
178 |
|
|
179 |
|
|
180 |
\end{itemize} |
%%% \end{itemize} |
181 |
|
|