--- manual/s_phys_pkgs/rw.tex 2004/01/28 18:12:29 1.1 +++ manual/s_phys_pkgs/rw.tex 2004/01/29 14:43:14 1.3 @@ -1,5 +1,26 @@ \section{Basic binary I/O utilities} -\label{sec:rw} +\label{sec:pkg:rw} +The {\tt rw} package provides a very rudimentary binary I/O capability +for quickly writing {\it single record} direct-access Fortran binary files. +It is primarily used for writing diagnostic output. + +\subsection{Introduction} +Package {\tt rw} is an interface to the more general {\tt mdsio} package. +The {\tt rw} package can be used to write or read direct-access Fortran +binary files for two-dimensional XY and three-dimensional XYZ arrays. +The arrays are assumed to have been decalred according to the standard +MITgcm two-dimensional or the-dimensional floating poit array type e.g +\begin{verbatim} +C Example of declaring a standard two dimensional "long" floating +C point type array (the _RL macro is usually mapped to 64-bit +C floats in most configurations) + _RL anArray(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) +\end{verbatim} +Each call to an {\tt rw} read or write routine will read (or write) to the +first record of a file. To write files with multiple records use the +package {\tt mdsio} (see section) or the package {\tt mnc} (see section {sec:pkg:mnc}) +which produces netCDF \cite{rew:97} based output. + \subsection{Key subroutines, parameters and files} \label{sec:pkg:rw:implementation_synopsis} \subsection{Package Reference}