1 |
|
% $Header$ |
2 |
|
% $Name$ |
3 |
|
|
4 |
|
|
5 |
\section{RW Basic binary I/O utilities} |
\section{RW Basic binary I/O utilities} |
6 |
\label{sec:pkg:rw} |
\label{sec:pkg:rw} |
7 |
The {\tt rw} package provides a very rudimentary binary I/O capability |
The {\tt rw} package provides a very rudimentary binary I/O capability |
12 |
Package {\tt rw} is an interface to the more general {\tt mdsio} package. |
Package {\tt rw} is an interface to the more general {\tt mdsio} package. |
13 |
The {\tt rw} package can be used to write or read direct-access Fortran |
The {\tt rw} package can be used to write or read direct-access Fortran |
14 |
binary files for two-dimensional XY and three-dimensional XYZ arrays. |
binary files for two-dimensional XY and three-dimensional XYZ arrays. |
15 |
The arrays are assumed to have been decalred according to the standard |
The arrays are assumed to have been declared according to the standard |
16 |
MITgcm two-dimensional or the-dimensional floating poit array type |
MITgcm two-dimensional or the-dimensional floating point array type |
17 |
(see figure \ref{fig:pkg:rw:standarddeclaration}). |
(see figure \ref{fig:pkg:rw:standarddeclaration}). |
18 |
|
|
19 |
\begin{figure} |
\begin[h]{figure} |
20 |
|
{\small |
21 |
\begin{verbatim} |
\begin{verbatim} |
22 |
C Example of declaring a standard two dimensional "long" floating |
C Example of declaring a standard two dimensional "long" |
23 |
C point type array (the _RL macro is usually mapped to 64-bit |
C floating point type array (the _RL macro is usually |
24 |
C floats in most configurations) |
C mapped to 64-bit floats in most configurations) |
25 |
_RL anArray(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL anArray(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
26 |
\end{verbatim} |
\end{verbatim} |
27 |
|
} |
28 |
\caption{An example of the fixed form Fortran declaration for a |
\caption{An example of the fixed form Fortran declaration for a |
29 |
standard MITgcm two-dimensional array type. } |
standard MITgcm two-dimensional array type. } |
30 |
\label{fig:pkg:rw:standarddeclaration} |
\label{fig:pkg:rw:standarddeclaration} |
31 |
\end{figure} |
\end{figure} |
32 |
|
|
33 |
Each call to an {\tt rw} read or write routine will read (or write) to the |
Each call to an {\tt rw} read or write routine will read (or write) to |
34 |
first record of a file. To write direct access Fortran files with |
the first record of a file. To write direct access Fortran files with |
35 |
multiple records use the package {\tt mdsio} (see section |
multiple records use the package {\tt mdsio} (see section |
36 |
\ref{sec:pkg:mdsio}). To write self-describing files that contain |
\ref{sec:pkg:mdsio}). To write self-describing files that contain |
37 |
embedded information describing the variables being written and |
embedded information describing the variables being written and the |
38 |
the spatial and temporal locations of those variables use the |
spatial and temporal locations of those variables use the package {\tt |
39 |
package {\tt mnc} (see section \ref{sec:pkg:mnc}) which produces |
mnc} (see section \ref{sec:pkg:mnc}) which produces |
40 |
\htlink{netCDF}{http://www.unidata.ucar.edu/packages/netcdf} |
\htlink{netCDF}{http://www.unidata.ucar.edu/packages/netcdf} |
41 |
\cite{rew:97} based output. |
\cite{rew:97} based output. |
42 |
|
|
43 |
\subsection{Key subroutines, parameters and files} |
\subsection{Key subroutines, parameters and files} |
44 |
\label{sec:pkg:rw:implementation_synopsis} |
\label{sec:pkg:rw:implementation_synopsis} |
45 |
The {\tt rw} package has |
The {\tt rw} package has |
46 |
|
|
47 |
|
|
48 |
\subsection{Package Reference} |
\subsection{Package Reference} |