1 |
% $Header$ |
% $Header$ |
2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
\subsection{NetCDF I/O Integration: MNC} |
\section{NetCDF I/O: MNC} |
5 |
\label{sec:pkg:mnc} |
\label{sec:pkg:mnc} |
6 |
\begin{rawhtml} |
\begin{rawhtml} |
7 |
<!-- CMIREDIR:package_mnc: --> |
<!-- CMIREDIR:package_mnc: --> |
31 |
platform. |
platform. |
32 |
|
|
33 |
|
|
34 |
\subsubsection{Using MNC} |
\subsection{Using MNC} |
35 |
|
|
36 |
MNC Configuration: |
\subsubsection{MNC Configuration:} |
37 |
|
|
38 |
As with all MITgcm packages, MNC can be turned on or off at compile time |
As with all MITgcm packages, MNC can be turned on or off at compile time |
39 |
using the \texttt{packages.conf} file or the \texttt{genmake2} |
using the \texttt{packages.conf} file or the \texttt{genmake2} |
75 |
iterative compile--test sequence. |
iterative compile--test sequence. |
76 |
|
|
77 |
|
|
78 |
MNC Inputs: |
\subsubsection{MNC Inputs:} |
79 |
|
|
80 |
Like most MITgcm packages, all of MNC can be turned on/off at runtime |
Like most MITgcm packages, all of MNC can be turned on/off at runtime |
81 |
using a single flag in \texttt{data.pkg} |
using a single flag in \texttt{data.pkg} |
127 |
output directory name \\ |
output directory name \\ |
128 |
\ \ \texttt{mnc\_outdir\_date} & L & \texttt{.FALSE.} & |
\ \ \texttt{mnc\_outdir\_date} & L & \texttt{.FALSE.} & |
129 |
embed date in the outdir name \\ |
embed date in the outdir name \\ |
130 |
\ \ \texttt{mnc\_outdir\_num} & L & \texttt{.FALSE.} & |
\ \ \texttt{mnc\_outdir\_num} & L & \texttt{.TRUE.} & |
131 |
optional \\ |
optional \\ |
132 |
\texttt{pickup\_write\_mnc} & L & \texttt{.FALSE.} & |
\texttt{pickup\_write\_mnc} & L & \texttt{.TRUE.} & |
133 |
use MNC to write pickup files \\ |
use MNC to write pickup files \\ |
134 |
\texttt{pickup\_read\_mnc} & L & \texttt{.FALSE.} & |
\texttt{pickup\_read\_mnc} & L & \texttt{.TRUE.} & |
135 |
use MNC to read pickup files \\ |
use MNC to read pickup files \\ |
136 |
\texttt{mnc\_use\_indir} & L & \texttt{.FALSE.} & |
\texttt{mnc\_use\_indir} & L & \texttt{.FALSE.} & |
137 |
use a directory (path) for input \\ |
use a directory (path) for input \\ |
138 |
\ \ \texttt{mnc\_indir\_str} & S & \texttt{''} & |
\ \ \texttt{mnc\_indir\_str} & S & \texttt{''} & |
139 |
input directory (or path) name \\ |
input directory (or path) name \\ |
140 |
\texttt{snapshot\_mnc} & L & \texttt{.FALSE.} & |
\texttt{snapshot\_mnc} & L & \texttt{.TRUE.} & |
141 |
write \texttt{snapshot} output w/MNC \\ |
write \texttt{snapshot} output w/MNC \\ |
142 |
\texttt{monitor\_mnc} & L & \texttt{.FALSE.} & |
\texttt{monitor\_mnc} & L & \texttt{.TRUE.} & |
143 |
write \texttt{monitor} output w/MNC \\ |
write \texttt{monitor} output w/MNC \\ |
144 |
\texttt{timeave\_mnc} & L & \texttt{.FALSE.} & |
\texttt{timeave\_mnc} & L & \texttt{.TRUE.} & |
145 |
write \texttt{timeave} output w/MNC \\ |
write \texttt{timeave} output w/MNC \\ |
146 |
\texttt{autodiff\_mnc} & L & \texttt{.FALSE.} & |
\texttt{autodiff\_mnc} & L & \texttt{.TRUE.} & |
147 |
write \texttt{autodiff} output w/MNC \\ |
write \texttt{autodiff} output w/MNC \\ |
148 |
\texttt{mnc\_max\_fsize} & R & 2.1e+09 & |
\texttt{mnc\_max\_fsize} & R & 2.1e+09 & |
149 |
max allowable file size \\ |
max allowable file size (<2GB) \\ |
150 |
|
\texttt{mnc\_filefreq} & R & -1 & |
151 |
|
frequency of new file creation (seconds) \\ |
152 |
\texttt{readgrid\_mnc} & L & \texttt{.FALSE.} & |
\texttt{readgrid\_mnc} & L & \texttt{.FALSE.} & |
153 |
read grid quantities using MNC \\ |
read grid quantities using MNC \\ |
154 |
\texttt{mnc\_echo\_gvtypes} & L & \texttt{.FALSE.} & |
\texttt{mnc\_echo\_gvtypes} & L & \texttt{.FALSE.} & |
204 |
\end{verbatim} |
\end{verbatim} |
205 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
206 |
|
|
207 |
|
Another way users can force the splitting of MNC files along the time |
208 |
|
dimension is the \texttt{mnc\_filefreq} option. With it, files that |
209 |
|
contain variables with a temporal dimension can be split at regular |
210 |
|
intervals based solely upon the model time (specified in seconds). |
211 |
|
For some problems, this can be much more convenient than splitting |
212 |
|
based upon file size. |
213 |
|
|
214 |
Additional MNC--related parameters may be contained within each |
Additional MNC--related parameters may be contained within each |
215 |
package. Please see the individual packages for descriptions of their |
package. Please see the individual packages for descriptions of their |
216 |
use of MNC. |
use of MNC. |
217 |
|
|
218 |
|
|
219 |
MNC Output: |
\subsubsection{MNC Output:} |
220 |
|
|
221 |
Depending upon the flags used, MNC will produce zero or more |
Depending upon the flags used, MNC will produce zero or more |
222 |
directories containing one or more netCDF files as output. These |
directories containing one or more netCDF files as output. These |
224 |
convention (v1.0) and any conformance issues will be fixed over time. |
convention (v1.0) and any conformance issues will be fixed over time. |
225 |
The patterns used for file names are: |
The patterns used for file names are: |
226 |
\begin{center} |
\begin{center} |
227 |
\texttt{BASENAME.nIter0.tileNum.seqNum.nc} |
{\footnotesize |
228 |
|
\begin{tabular}[htb]{l} |
229 |
|
\texttt{BASENAME.tileNum.nc} \\ |
230 |
|
\texttt{BASENAME.nIter.faceNum.nc} \\ |
231 |
|
\texttt{BASENAME.nIter.tileNum.nc} |
232 |
|
\end{tabular} |
233 |
|
} |
234 |
\end{center} |
\end{center} |
235 |
and an example is: |
and examples are: |
236 |
\begin{center} |
\begin{center} |
237 |
\texttt{grid.0000000000.000001.0000.nc} |
{\footnotesize |
238 |
|
\begin{tabular}[htb]{l} |
239 |
|
\texttt{grid.t001.nc}, \texttt{grid.t002.nc} \\ |
240 |
|
\texttt{state.0000000000.t001.nc}, |
241 |
|
\texttt{surfDiag.0000036000.t001.nc} \\ |
242 |
|
\texttt{input.0000072000.f001.nc} |
243 |
|
\end{tabular} |
244 |
|
} |
245 |
\end{center} |
\end{center} |
246 |
where \texttt{BASENAME} is the name selected to represent a set of |
where \texttt{BASENAME} is the name selected to represent a set of |
247 |
variables written together, \texttt{nIter0} is the starting iteration |
variables written together, \texttt{nIter} is the current iteration |
248 |
number as specified in the main \texttt{data} namelist input file and |
number as specified in the main \texttt{data} namelist input file and |
249 |
written in a zero-filled 10-digit format, \texttt{tileNum} is the |
written in a zero-filled 10-digit format, \texttt{tileNum} is a |
250 |
six-digit zero-filled tile number, \texttt{seqnum} is a four-digit |
three-or-more-digit zero-filled and ``\texttt{t}''--prefixed tile |
251 |
zero-filled sequence number used when maximum allowable files sizes |
number, \texttt{faceNum} is a three-or-more-digit zero-filled and |
252 |
are too small to contain all of the output for a particular type |
``\texttt{f}''--prefixed face number, and \texttt{.nc} is the file |
|
within one run (new files are created with sequential numbers as files |
|
|
reach the maximum file size limit), and \texttt{.nc} is the file |
|
253 |
suffix specified by the current netCDF ``CF'' conventions. |
suffix specified by the current netCDF ``CF'' conventions. |
254 |
|
|
255 |
Some example \texttt{BASENAME} values are: |
Some example \texttt{BASENAME} values are: |
319 |
\end{enumerate} |
\end{enumerate} |
320 |
|
|
321 |
|
|
322 |
\subsubsection{MNC Troubleshooting} |
\subsection{MNC Troubleshooting} |
323 |
|
|
324 |
Build Troubleshooting: |
\subsubsection{Build Troubleshooting:} |
325 |
|
|
326 |
In order to build MITgcm with MNC enabled, the netCDF v3.x Fortran-77 |
In order to build MITgcm with MNC enabled, the netCDF v3.x Fortran-77 |
327 |
(not Fortran-90) library must be available. This library is compposed |
(not Fortran-90) library must be available. This library is compposed |
340 |
which includes an extensive list of known--good netCDF configurations |
which includes an extensive list of known--good netCDF configurations |
341 |
for various platforms |
for various platforms |
342 |
|
|
343 |
Runtime Troubleshooting: |
\subsubsection{Runtime Troubleshooting:} |
344 |
|
|
345 |
Please be aware of the following: |
Please be aware of the following: |
346 |
|
|
378 |
\end{itemize} |
\end{itemize} |
379 |
|
|
380 |
|
|
381 |
\subsubsection{MNC Internals} |
\subsection{MNC Internals} |
382 |
|
|
383 |
The \texttt{mnc} package is a two-level convenience library (or |
The \texttt{mnc} package is a two-level convenience library (or |
384 |
``wrapper'') for most of the NetCDF Fortran API. Its purpose is to |
``wrapper'') for most of the NetCDF Fortran API. Its purpose is to |
426 |
\end{description} |
\end{description} |
427 |
|
|
428 |
|
|
429 |
MNC Grid--Types and Variable--Types: |
\subsubsection{MNC Grid--Types and Variable--Types:} |
430 |
|
|
431 |
As a convenience for users, the MNC package includes numerous routines |
As a convenience for users, the MNC package includes numerous routines |
432 |
to aid in the writing of data to NetCDF format. Probably the biggest |
to aid in the writing of data to NetCDF format. Probably the biggest |
485 |
and writing variables. |
and writing variables. |
486 |
|
|
487 |
|
|
488 |
Using MNC: Examples: |
\subsubsection{Using MNC: Examples:} |
489 |
|
|
490 |
Writing variables to NetCDF files can be accomplished in as few as two |
Writing variables to NetCDF files can be accomplished in as few as two |
491 |
function calls. The first function call defines a variable type, |
function calls. The first function call defines a variable type, |
495 |
necessary, the current time level within the model. |
necessary, the current time level within the model. |
496 |
|
|
497 |
Examples of the initialization calls can be found in the file |
Examples of the initialization calls can be found in the file |
498 |
\filelink{model/src/ini\_mnc\_io.F}{model-src-ini_mnc_io.F} |
\filelink{model/src/ini\_mnc\_io.F}{model-src-ini_model_io.F} |
499 |
where these function calls: |
where these function calls: |
500 |
{\footnotesize |
{\footnotesize |
501 |
\begin{verbatim} |
\begin{verbatim} |