formats.tex 3.79 KB
 Uwe Schulzweida committed May 11, 2006 1 2 Every input and output file is a collection of 2D or 3D variables over an unlimited number of time steps.  Uwe Schulzweida committed Mar 03, 2006 3   Uwe Schulzweida committed Mar 03, 2006 4 5 \section{GRIB}  Uwe Schulzweida committed May 11, 2006 6   Uwe Schulzweida committed May 24, 2006 7 \section{NetCDF}  Uwe Schulzweida committed Mar 03, 2006 8   Uwe Schulzweida committed May 24, 2006 9 \htmlref{NetCDF}{NetCDF} (Network Common Data Form) is an interface for array-oriented data  Uwe Schulzweida committed May 11, 2006 10 11 12 13 access and a library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.  Uwe Schulzweida committed May 12, 2006 14   Uwe Schulzweida committed May 11, 2006 15 16 17 CDI supports only 2D, 3D and 4D arrays and the attributes must follow the \href{http://ftp.unidata.ucar.edu/software/netcdf/docs/conventions.html} {GDT, COARDS or CF Conventions}.  Uwe Schulzweida committed May 12, 2006 18 19 NetCDF is an external library and not part of CDI. To use netCDF with CDI the netCDF library must be installed before the configuration  Uwe Schulzweida committed May 24, 2006 20 of the CDI library (see \htmlref{Build}{build}).  Uwe Schulzweida committed May 11, 2006 21   Uwe Schulzweida committed May 12, 2006 22 \subsection{ncdap}  Uwe Schulzweida committed May 11, 2006 23 24   Uwe Schulzweida committed Mar 03, 2006 25 26 \section{SERVICE}  Uwe Schulzweida committed May 11, 2006 27 28 29 30 31 32 33 34 SERVICE is the binary exchange format of the atmospheric general circulation model \htmlref{ECHAM}{ECHAM}. It has a header section with 8 integer values followed by the data section. The header and the data section have the standard Fortran blocking for binary data records. A SERVICE record can have an accuracy of 4 or 8 bytes and the byteorder can be little or big endian. The following Fortran code example can be used to read a  Uwe Schulzweida committed May 24, 2006 35 SERVICE record with an accuracy of 4 bytes:  Uwe Schulzweida committed May 11, 2006 36 37  \begin{lstlisting}[backgroundcolor=\color{zebg}, basicstyle=\footnotesize]  Uwe Schulzweida committed May 12, 2006 38  INTEGER*4 icode,ilevel,idate,itime,nlon,nlat,idispo1,idispo2  Uwe Schulzweida committed May 11, 2006 39  REAL*4 field(mlon,mlat)  Uwe Schulzweida committed May 12, 2006 40 41  ... READ(unit) icode,ilevel,idate,itime,nlon,nlat,idispo1,idispo2  Uwe Schulzweida committed May 11, 2006 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62  READ(unit) ((field(ilon,ilat), ilon=1,nlon), ilat=1,nlat) \end{lstlisting} The constants {\tt mlon} and {\tt mlat} must be greater or equal than {\tt nlon} and {\tt nlat}. The meaning of the variables are: \vspace*{3mm} \hspace*{8mm}\begin{minipage}{10cm} \begin{deflist}{{\tt idispo2 \ \ }} \item[{\tt icode}] The code number \item[{\tt ilevel}] The level \item[{\tt idate}] The date as YYYYMMDD \item[{\tt itime}] The time as HHMM \item[{\tt nlon}] The number of longitudes \item[{\tt nlat}] The number of latitides \item[{\tt idispo1}] For the users disposal (Not used in CDI) \item[{\tt idispo2}] For the users disposal (Not used in CDI) \end{deflist} \end{minipage}  Uwe Schulzweida committed Mar 03, 2006 63 64 \section{EXTRA}  Uwe Schulzweida committed May 11, 2006 65 66 67 68 69 70 71 EXTRA is the standard binary output format of the ocean model \htmlref{MPIOM}{MPIOM}. It has a header section with 4 integer values followed by the data section. The header and the data section have the standard Fortran blocking for binary data records. An EXTRA record can have an accuracy of 4 or 8 bytes and the byteorder can be little or big endian. The following Fortran code example can be used to read an  Uwe Schulzweida committed May 24, 2006 72 EXTRA record with an accuracy of 4 bytes:  Uwe Schulzweida committed May 11, 2006 73 74  \begin{lstlisting}[backgroundcolor=\color{zebg}, basicstyle=\footnotesize]  Uwe Schulzweida committed May 12, 2006 75  INTEGER*4 idate,icode,ilevel,nsize  Uwe Schulzweida committed May 11, 2006 76  REAL*4 field(msize)  Uwe Schulzweida committed May 12, 2006 77 78  ... READ(unit) idate,icode,ilevel,nsize  Uwe Schulzweida committed May 11, 2006 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95  READ(unit) (field(isize),isize=1,nsize) \end{lstlisting} The constant {\tt msize} must be greater or equal than {\tt nsize}. The meaning of the variables are: \vspace*{3mm} \hspace*{8mm}\begin{minipage}{10cm} \begin{deflist}{{\tt idispo2 \ \ }} \item[{\tt idate}] The date as YYYYMMDD \item[{\tt icode}] The code number \item[{\tt ilevel}] The level \item[{\tt nsize}] The size of the field \end{deflist} \end{minipage}  Uwe Schulzweida committed Mar 03, 2006 96 \section{IEG}  Uwe Schulzweida committed May 11, 2006 97   Uwe Schulzweida committed May 12, 2006 98 IEG is the standard binary output format of the regional model \htmlref{REMO}{REMO}.  Uwe Schulzweida committed May 11, 2006 99 It is simple an unpacked GRIB format. The product and grid  Uwe Schulzweida committed May 12, 2006 100 101 description section are coded with 4 byte integer values and the data section can have 4 or 8 byte IEEE floating point values.  Uwe Schulzweida committed May 11, 2006 102 103 104 The header and the data section have the standard Fortran blocking for binary data records. CDI supports only data on an rotated grid for the IEG format.