diff --git a/config/default b/config/default index b46a8540cf46cd74ca065cb8c3a3b7a1a83e0613..3edbf9464da234716a27322de04e7fc3be91d764 100755 --- a/config/default +++ b/config/default @@ -23,9 +23,9 @@ case "${HOSTNAME}" in --enable-dap --with-netcdf=$HOME/local \ CC=g++ CFLAGS="-g -O2 -Wall" CFINT=-Df2cFortran ;; - tolken | gata) + gata) ./configure --prefix=$HOME/local/LINUX \ - --with-netcdf=/scratch/localA/m214003/local \ + --with-netcdf=/client \ CC=gcc CFLAGS="-ansi -g -O2 -Wall" CFINT=-Df2cFortran ;; # sparc-sun-solaris2.8 diff --git a/doc/tex/c_examples.tex b/doc/tex/c_examples.tex index 3eade6c132e54edb49ea7174025efc06ffa933fd..41a9aa8132d644c6d64cf1ec9433b79f7fdb81ee 100644 --- a/doc/tex/c_examples.tex +++ b/doc/tex/c_examples.tex @@ -1,12 +1,12 @@ \chapter{\label{example}Examples} This appendix contains complete examples to write, read -and copy a dataset with the \CDI library. +and copy a dataset with the {\CDI} library. \section{\label{example_write}Write a dataset} -Here is an example using \CDI to write a netCDF dataset with +Here is an example using {\CDI} to write a netCDF dataset with 2 variables on 3 time steps. The first variable is a 2D field on surface level and the second variable is a 3D field on 5 pressure levels. Both variables are on the same lon/lat grid. diff --git a/doc/tex/c_grid.tex b/doc/tex/c_grid.tex index d0e5444708ebb161e1520418302c1d04438738e0..52ac8a903877f3b8917b5e413e2299887758a1df 100644 --- a/doc/tex/c_grid.tex +++ b/doc/tex/c_grid.tex @@ -15,8 +15,8 @@ The function {\tt gridCreate} creates a horizontal Grid. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt gridtype\ } \item[{\tt gridtype}] -The type of the grid, one of the set of predefined \CDI grid types. - The valid \CDI grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, +The type of the grid, one of the set of predefined {\CDI} grid types. + The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, {\tt GRID\_LONLAT}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}. \item[{\tt size}] @@ -122,8 +122,8 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} \subsubsection*{Result} {\tt gridInqType} returns the type of the grid, -one of the set of predefined \CDI grid types. -The valid \CDI grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, +one of the set of predefined {\CDI} grid types. +The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, {\tt GRID\_LONLAT}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}. diff --git a/doc/tex/c_link.tex b/doc/tex/c_link.tex index 3342322aa0f93620f80cf243f2f92268089bf536..650e0835137ba57a9bbfa0857659b11a216501be 100644 --- a/doc/tex/c_link.tex +++ b/doc/tex/c_link.tex @@ -1,4 +1,4 @@ -Every C file that references \CDI functions or constants must contain +Every C file that references {\CDI} functions or constants must contain an appropriate {\tt include} statement before the first such reference: \begin{verbatim} @@ -15,11 +15,11 @@ the compiler, to specify a directory where {\tt cdi.h} is installed, for example Alternatively, you could specify an absolute path name in the {\tt include} statement, but then your program would not compile on another platform -where \CDI is installed in a different location. +where {\CDI} is installed in a different location. -Unless the \CDI library is installed in a standard directory where the linker +Unless the {\CDI} library is installed in a standard directory where the linker always looks, you must use the {\tt -L} and {\tt -l} options to links an object file that -uses the \CDI library. For example: +uses the {\CDI} library. For example: \begin{verbatim} cc -o myprogram myprogram.o -L/usr/local/cdi/lib -lcdi -lm @@ -31,7 +31,7 @@ Alternatively, you could specify an absolute path name for the library: cc -o myprogram myprogram.o -L/usr/local/cdi/lib/libcdi -lm \end{verbatim} -If the \CDI library is using other external libraries, you must add this +If the {\CDI} library is using other external libraries, you must add this libraries in the same way. For example with the netCDF library: diff --git a/doc/tex/c_stream.tex b/doc/tex/c_stream.tex index 1b7e2865841bfbaaba99af0ad5980e3e9e61a5d9..3fd74892212c87e715b87ee70f7fc6b4c9d00a04 100644 --- a/doc/tex/c_stream.tex +++ b/doc/tex/c_stream.tex @@ -16,8 +16,8 @@ The function {\tt streamOpenWrite} creates a new datset. \item[{\tt path}] The name of the new dataset \item[{\tt filetype}] -The type of the file format, one of the set of predefined \CDI file format types. - The valid \CDI file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, +The type of the file format, one of the set of predefined {\CDI} file format types. + The valid {\CDI} file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, {\tt FILETYPE\_NC2}, {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} and {\tt FILETYPE\_IEG}. \end{deflist} @@ -167,8 +167,8 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead} \subsubsection*{Result} {\tt streamInqFiletype} returns the type of the file format, -one of the set of predefined \CDI file format types. -The valid \CDI file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, +one of the set of predefined {\CDI} file format types. +The valid {\CDI} file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, {\tt FILETYPE\_NC2}, {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} and {\tt FILETYPE\_IEG}. @@ -191,7 +191,7 @@ with the file format type {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} or {\tt FILET \item[{\tt streamID}] Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}} \item[{\tt byteorder}] -The byte order of a dataset, one of the \CDI constants {\tt CDI\_BIGENDIAN} and +The byte order of a dataset, one of the {\CDI} constants {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN}. \end{deflist} @@ -222,7 +222,7 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead} \subsubsection*{Result} {\tt streamInqByteorder} returns the type of the byte order. -The valid \CDI byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN} +The valid {\CDI} byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN} diff --git a/doc/tex/c_taxis.tex b/doc/tex/c_taxis.tex index 02ef3b9409c2687f00067e6ed8887104bb0681b9..3a2f34d7f6273d5c347e964281b6058d93063123 100644 --- a/doc/tex/c_taxis.tex +++ b/doc/tex/c_taxis.tex @@ -15,8 +15,8 @@ The function {\tt taxisCreate} creates a Time axis. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt taxistype\ } \item[{\tt taxistype}] -The type of the Time axis, one of the set of predefined \CDI time axis types. - The valid \CDI time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}. +The type of the Time axis, one of the set of predefined {\CDI} time axis types. + The valid {\CDI} time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}. \end{deflist} \end{minipage} @@ -276,8 +276,8 @@ The function {\tt taxisDefCalendar} defines the calendar of a Time axis. \item[{\tt taxisID}] Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} \item[{\tt calendar}] -The type of the calendar, one of the set of predefined \CDI calendar types. - The valid \CDI calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, +The type of the calendar, one of the set of predefined {\CDI} calendar types. + The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}. \end{deflist} @@ -307,7 +307,7 @@ Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} \subsubsection*{Result} {\tt taxisInqCalendar} returns the type of the calendar, -one of the set of predefined \CDI calendar types. -The valid \CDI calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, +one of the set of predefined {\CDI} calendar types. +The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}. diff --git a/doc/tex/c_vlist_var.tex b/doc/tex/c_vlist_var.tex index 7f8bbe18455356ee02d67feea984c8eb388f0cb6..e702afffb0aed2877b60b3f91075caf189e34cf7 100644 --- a/doc/tex/c_vlist_var.tex +++ b/doc/tex/c_vlist_var.tex @@ -21,8 +21,8 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} \item[{\tt zaxisID}] Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}} \item[{\tt timeID}] -One of the set of predefined \CDI time identifiers. - The valid \CDI time identifiers are {\tt TIME\_CONSTANT} and {\tt TIME\_VARIABLE}. +One of the set of predefined {\CDI} time identifiers. + The valid {\CDI} time identifiers are {\tt TIME\_CONSTANT} and {\tt TIME\_VARIABLE}. \end{deflist} \end{minipage} @@ -291,7 +291,7 @@ Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate Variable identifier \item[{\tt datatype}] The data type identifier. - The valid \CDI data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, + The valid {\CDI} data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, {\tt DATATYPE\_REAL4} and {\tt DATATYPE\_REAL8}. @@ -324,7 +324,7 @@ Variable identifier \subsubsection*{Result} {\tt vlistInqVarDatatype} returns an identifier to the data type of the variable. -The valid \CDI data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, +The valid {\CDI} data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, {\tt DATATYPE\_REAL4} and {\tt DATATYPE\_REAL8}. diff --git a/doc/tex/c_zaxis.tex b/doc/tex/c_zaxis.tex index 94c8770f4a0b75b6340db20b9a2f2d21a7a64cc7..43e534c359d27321bc215f47b364f8664e499e42 100644 --- a/doc/tex/c_zaxis.tex +++ b/doc/tex/c_zaxis.tex @@ -15,8 +15,8 @@ The function {\tt zaxisCreate} creates a vertical Z-axis. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt zaxistype\ } \item[{\tt zaxistype}] -The type of the Z-axis, one of the set of predefined \CDI Z-axis types. - The valid \CDI Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, +The type of the Z-axis, one of the set of predefined {\CDI} Z-axis types. + The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, {\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT}, {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}. \item[{\tt size}] @@ -90,8 +90,8 @@ Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}} \subsubsection*{Result} {\tt zaxisInqType} returns the type of the Z-axis, -one of the set of predefined \CDI Z-axis types. -The valid \CDI Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, +one of the set of predefined {\CDI} Z-axis types. +The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, {\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT}, {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}. diff --git a/doc/tex/cdi_cman.tex b/doc/tex/cdi_cman.tex index ba2941496c7e8a4621c0f527919f484059801dee..5d4c4fee8eba089664ad4e018bcee6649b2ac1e1 100644 --- a/doc/tex/cdi_cman.tex +++ b/doc/tex/cdi_cman.tex @@ -3,7 +3,7 @@ \usepackage{graphics} -\newcommand{\CDI}{{\bfseries\sffamily CDI\ }} +\newcommand{\CDI}{\bfseries\sffamily CDI} % To define headers and footers \usepackage{fancyhdr} @@ -115,7 +115,7 @@ \begin{titlepage} \vspace*{50mm} -{\Huge\CDI \bf C Manual} +{\Huge{\CDI} \ \bf C Manual} \setlength{\unitlength}{1cm} \begin{picture}(16,0.4) @@ -159,7 +159,7 @@ \chapter{CDI modules} \input{modules} -\newpage +%\newpage \section{Dataset functions} \input{dataset} \input{c_stream} diff --git a/doc/tex/cdi_fman.tex b/doc/tex/cdi_fman.tex index f7f8a1a3295f90940f9b53aed234e089c2fb28ba..f76c465151d1c3a420f784425474a7fc16ad8061 100644 --- a/doc/tex/cdi_fman.tex +++ b/doc/tex/cdi_fman.tex @@ -3,7 +3,7 @@ \usepackage{graphics} -\newcommand{\CDI}{{\bfseries\sffamily CDI\ }} +\newcommand{\CDI}{\bfseries\sffamily CDI} % To define headers and footers \usepackage{fancyhdr} @@ -114,7 +114,7 @@ \begin{titlepage} \vspace*{50mm} -{\Huge\CDI \bf Fortran Manual} +{\Huge{\CDI} \ \bf Fortran Manual} \setlength{\unitlength}{1cm} \begin{picture}(16,0.4) @@ -158,7 +158,7 @@ \chapter{CDI modules} \input{modules} -\newpage +%\newpage \section{Dataset functions} \input{dataset} \input{f_stream} diff --git a/doc/tex/dataset.tex b/doc/tex/dataset.tex index fc5bfe057c810e8c1327558e358497d5d305289e..95a54258bef06979ea028d0e1fcd15a14da6eae2 100644 --- a/doc/tex/dataset.tex +++ b/doc/tex/dataset.tex @@ -15,7 +15,7 @@ with one of the following predefined file format types: \end{minipage} \vspace*{3mm} -NetCDF is only available if the \CDI library was compiled with netCDF support! +NetCDF is only available if the {\CDI} library was compiled with netCDF support! To set the byte order of a binary dataset with the file format type {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} or {\tt FILETYPE\_IEG} use one of the diff --git a/doc/tex/f_examples.tex b/doc/tex/f_examples.tex index b7b187f462619abb4918214e68f6d87112ed6bfb..1b1f0fa5b56bea77f2f7049906cf27c750ba4770 100644 --- a/doc/tex/f_examples.tex +++ b/doc/tex/f_examples.tex @@ -1,12 +1,12 @@ \chapter{\label{example}Examples} This appendix contains complete examples to write, read -and copy a dataset with the \CDI library. +and copy a dataset with the {\CDI} library. \section{\label{example_write}Write a dataset} -Here is an example using \CDI to write a netCDF dataset with +Here is an example using {\CDI} to write a netCDF dataset with 2 variables on 3 time steps. The first variable is a 2D field on surface level and the second variable is a 3D field on 5 pressure levels. Both variables are on the same lon/lat grid. diff --git a/doc/tex/f_grid.tex b/doc/tex/f_grid.tex index d8b83e976ed39c26e6377f36aaf272cc9ed8b268..003b4a5bec48ce12dd259bb7e7cc3560b65dc0e8 100644 --- a/doc/tex/f_grid.tex +++ b/doc/tex/f_grid.tex @@ -15,8 +15,8 @@ The function {\tt gridCreate} creates a horizontal Grid. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt gridtype\ } \item[{\tt gridtype}] -The type of the grid, one of the set of predefined \CDI grid types. - The valid \CDI grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, +The type of the grid, one of the set of predefined {\CDI} grid types. + The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, {\tt GRID\_LONLAT}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}. \item[{\tt size}] @@ -122,8 +122,8 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} \subsubsection*{Result} {\tt gridInqType} returns the type of the grid, -one of the set of predefined \CDI grid types. -The valid \CDI grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, +one of the set of predefined {\CDI} grid types. +The valid {\CDI} grid types are {\tt GRID\_GENERIC}, {\tt GRID\_GAUSSIAN}, {\tt GRID\_LONLAT}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}. diff --git a/doc/tex/f_link.tex b/doc/tex/f_link.tex index 03540b7ce77cdbc667a066648e4994c5d1e9a313..69cc88a96557d356a66ffa79481bac7a8a43a87c 100644 --- a/doc/tex/f_link.tex +++ b/doc/tex/f_link.tex @@ -1,4 +1,4 @@ -Every FORTRAN file that references \CDI functions or constants must contain +Every FORTRAN file that references {\CDI} functions or constants must contain an appropriate {\tt INCLUDE} statement before the first such reference: \begin{verbatim} @@ -15,11 +15,11 @@ the compiler, to specify a directory where {\tt cdi.inc} is installed, for examp Alternatively, you could specify an absolute path name in the {\tt INCLUDE} statement, but then your program would not compile on another platform -where \CDI is installed in a different location. +where {\CDI} is installed in a different location. -Unless the \CDI library is installed in a standard directory where the linker +Unless the {\CDI} library is installed in a standard directory where the linker always looks, you must use the {\tt -L} and {\tt -l} options to links an object file that -uses the \CDI library. For example: +uses the {\CDI} library. For example: \begin{verbatim} f77 -o myprogram myprogram.o -L/usr/local/cdi/lib -lcdi @@ -31,7 +31,7 @@ Alternatively, you could specify an absolute path name for the library: f77 -o myprogram myprogram.o -L/usr/local/cdi/lib/libcdi \end{verbatim} -If the \CDI library is using other external libraries, you must add this +If the {\CDI} library is using other external libraries, you must add this libraries in the same way. For example with the netCDF library: diff --git a/doc/tex/f_stream.tex b/doc/tex/f_stream.tex index f0a1825b94ffe5c452a25d6baaa631273fb07d7a..d3f64590d153ea4d61a490d84243a1fca99c6d98 100644 --- a/doc/tex/f_stream.tex +++ b/doc/tex/f_stream.tex @@ -16,8 +16,8 @@ The function {\tt streamOpenWrite} creates a new datset. \item[{\tt path}] The name of the new dataset \item[{\tt filetype}] -The type of the file format, one of the set of predefined \CDI file format types. - The valid \CDI file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, +The type of the file format, one of the set of predefined {\CDI} file format types. + The valid {\CDI} file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, {\tt FILETYPE\_NC2}, {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} and {\tt FILETYPE\_IEG}. \end{deflist} @@ -167,8 +167,8 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead} \subsubsection*{Result} {\tt streamInqFiletype} returns the type of the file format, -one of the set of predefined \CDI file format types. -The valid \CDI file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, +one of the set of predefined {\CDI} file format types. +The valid {\CDI} file format types are {\tt FILETYPE\_GRB}, {\tt FILETYPE\_NC}, {\tt FILETYPE\_NC2}, {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} and {\tt FILETYPE\_IEG}. @@ -191,7 +191,7 @@ with the file format type {\tt FILETYPE\_SRV}, {\tt FILETYPE\_EXT} or {\tt FILET \item[{\tt streamID}] Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}} or {\htmlref{\tt streamOpenWrite}{streamOpenWrite}} \item[{\tt byteorder}] -The byte order of a dataset, one of the \CDI constants {\tt CDI\_BIGENDIAN} and +The byte order of a dataset, one of the {\CDI} constants {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN}. \end{deflist} @@ -222,7 +222,7 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead} \subsubsection*{Result} {\tt streamInqByteorder} returns the type of the byte order. -The valid \CDI byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN} +The valid {\CDI} byte order types are {\tt CDI\_BIGENDIAN} and {\tt CDI\_LITTLEENDIAN} diff --git a/doc/tex/f_taxis.tex b/doc/tex/f_taxis.tex index faea16684f7c9e8f4231c63644c5954e4c0a4de5..7241cc315cb4f1ff3795c9044eb777e9c3c6264d 100644 --- a/doc/tex/f_taxis.tex +++ b/doc/tex/f_taxis.tex @@ -15,8 +15,8 @@ The function {\tt taxisCreate} creates a Time axis. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt taxistype\ } \item[{\tt taxistype}] -The type of the Time axis, one of the set of predefined \CDI time axis types. - The valid \CDI time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}. +The type of the Time axis, one of the set of predefined {\CDI} time axis types. + The valid {\CDI} time axis types are {\tt TAXIS\_ABSOLUTE} and {\tt TAXIS\_RELATIVE}. \end{deflist} \end{minipage} @@ -276,8 +276,8 @@ The function {\tt taxisDefCalendar} defines the calendar of a Time axis. \item[{\tt taxisID}] Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} \item[{\tt calendar}] -The type of the calendar, one of the set of predefined \CDI calendar types. - The valid \CDI calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, +The type of the calendar, one of the set of predefined {\CDI} calendar types. + The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}. \end{deflist} @@ -307,7 +307,7 @@ Time axis ID, from a previous call to {\htmlref{\tt taxisCreate}{taxisCreate}} \subsubsection*{Result} {\tt taxisInqCalendar} returns the type of the calendar, -one of the set of predefined \CDI calendar types. -The valid \CDI calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, +one of the set of predefined {\CDI} calendar types. +The valid {\CDI} calendar types are {\tt CALENDAR\_STANDARD}, {\tt CALENDAR\_360DAYS}, {\tt CALENDAR\_365DAYS} and {\tt CALENDAR\_366DAYS}. diff --git a/doc/tex/f_vlist_var.tex b/doc/tex/f_vlist_var.tex index a80efc7b7cc5302292d4a5d7673cee5eb7271929..081d32d69efdc2e75111077aa2dcfb39ce144dfb 100644 --- a/doc/tex/f_vlist_var.tex +++ b/doc/tex/f_vlist_var.tex @@ -22,8 +22,8 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}} \item[{\tt zaxisID}] Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}} \item[{\tt timeID}] -One of the set of predefined \CDI time identifiers. - The valid \CDI time identifiers are {\tt TIME\_CONSTANT} and {\tt TIME\_VARIABLE}. +One of the set of predefined {\CDI} time identifiers. + The valid {\CDI} time identifiers are {\tt TIME\_CONSTANT} and {\tt TIME\_VARIABLE}. \end{deflist} \end{minipage} @@ -294,7 +294,7 @@ Variable list ID, from a previous call to {\htmlref{\tt vlistCreate}{vlistCreate Variable identifier \item[{\tt datatype}] The data type identifier. - The valid \CDI data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, + The valid {\CDI} data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, {\tt DATATYPE\_REAL4} and {\tt DATATYPE\_REAL8}. @@ -327,7 +327,7 @@ Variable identifier \subsubsection*{Result} {\tt vlistInqVarDatatype} returns an identifier to the data type of the variable. -The valid \CDI data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, +The valid {\CDI} data types are {\tt DATATYPE\_PACK1}, {\tt DATATYPE\_PACK2}, {\tt DATATYPE\_PACK3}, {\tt DATATYPE\_REAL4} and {\tt DATATYPE\_REAL8}. diff --git a/doc/tex/f_zaxis.tex b/doc/tex/f_zaxis.tex index 7097b358ea078f18465d00ebdea62c17fdf14ee7..f211cc337931a721162e1bfaa9d4821560f66b26 100644 --- a/doc/tex/f_zaxis.tex +++ b/doc/tex/f_zaxis.tex @@ -15,8 +15,8 @@ The function {\tt zaxisCreate} creates a vertical Z-axis. \hspace*{4mm}\begin{minipage}[]{15cm} \begin{deflist}{\tt zaxistype\ } \item[{\tt zaxistype}] -The type of the Z-axis, one of the set of predefined \CDI Z-axis types. - The valid \CDI Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, +The type of the Z-axis, one of the set of predefined {\CDI} Z-axis types. + The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, {\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT}, {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}. \item[{\tt size}] @@ -90,8 +90,8 @@ Z-axis ID, from a previous call to {\htmlref{\tt zaxisCreate}{zaxisCreate}} \subsubsection*{Result} {\tt zaxisInqType} returns the type of the Z-axis, -one of the set of predefined \CDI Z-axis types. -The valid \CDI Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, +one of the set of predefined {\CDI} Z-axis types. +The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE}, {\tt ZAXIS\_HYBRID}, {\tt ZAXIS\_PRESSURE}, {\tt ZAXIS\_HEIGHT}, {\tt ZAXIS\_DEPTH\_BELOW\_SEA} and {\tt ZAXIS\_DEPTH\_BELOW\_LAND}. diff --git a/doc/tex/formats.tex b/doc/tex/formats.tex index d8d58e8cbb2c87bc1add3de0cebddc061f0f4e4a..8b3687e2ba1a751a91aceab8872dbdf1ba495c04 100644 --- a/doc/tex/formats.tex +++ b/doc/tex/formats.tex @@ -1,5 +1,5 @@ -Every input and output file is a collection of 2D or 3D variables -over an unlimited number of time steps. +%Every input and output file is a collection of 2D or 3D variables +%over an unlimited number of time steps. \section{GRIB edition 1} @@ -23,41 +23,53 @@ of locally used parameters and geometries. Any activity that generates and distributes GRIB records must also make their locally defined GRIB tables available to users. -\CDI does not support the full GRIB standard. The following -data representation and level types are implemented: - -\begin{itemize} -\item Latitude/Longitude Grid -\item Gaussian Latitude/Longitude Grid -\item Spherical Harmonic Coefficients -\item Icosahedral-hexagonal GME Grid -\end{itemize} - -\begin{itemize} -\item Surface level -\item Isobaric level -\item Height above ground -\item Hybrid level -%\item Layer between two hybrid levels -\item Depth below land surface -%\item Layer between two depths below land surface -\item Depth below sea level -\end{itemize} - -%0 Latitude/Longitude Grid -%4 Gaussian Latitude/Longitude Grid -%50 Spherical Harmonic Coefficients -%192 Icosahedral-hexagonal GME Grid -% -%1 Surface level -%100 Isobaric level -%103 fixed height level -%105 Height above ground -%109 Hybrid level -%110 Layer between two hybrid levels -%111 Depth below land surface -%112 Layer between two depths below land surface -%160 Depth below sea level +{\CDI} does not support the full GRIB standard. The following +data representation and level types are implemented: \\ + +\begin{tabular}{rl} +\textbf{Grid type} & \\ + 0 & Latitude/longitude grid \\ + 4 & Gaussian latitude/longitude grid \\ + 10 & Rotated latitude/longitude grid \\ + 50 & Spherical Harmonic Coefficients \\ + 192 & Icosahedral-hexagonal GME grid \\ +\end{tabular} + + +\begin{tabular}{rl} +\textbf{Level type} & \\ + 1 & Surface level \\ + 100 & Isobaric level \\ + 103 & Altitude above mean sea level \\ + 105 & Height above ground \\ + 109 & Hybrid level \\ + 110 & Layer between two hybrid levels \\ + 111 & Depth below land surface \\ + 112 & Layer between two depths below land surface \\ + 113 & Isentropic (theta) level \\ + 160 & Depth below sea level \\ +\end{tabular} + +%\begin{itemize} +%\item 0 Latitude/longitude grid +%\item 4 Gaussian latitude/longitude grid +%\item 10 Rotated latitude/longitude grid +%\item 50 Spherical Harmonic Coefficients +%\item 192 Icosahedral-hexagonal GME grid +%\end{itemize} + +%\begin{itemize} +%\item 1 Surface level +%\item 100 Isobaric level +%\item 103 Altitude above mean sea level +%\item 105 Height above ground +%\item 109 Hybrid level +%\item 110 Layer between two hybrid levels +%\item 111 Depth below land surface +%\item 112 Layer between two depths below land surface +%\item 113 Isentropic (theta) level +%\item 160 Depth below sea level +%\end{itemize} \section{NetCDF} @@ -68,12 +80,12 @@ 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. -\CDI supports only 2D, 3D and 4D arrays and the attributes should follow the +{\CDI} supports only 2D, 3D and 4D arrays and the attributes should follow the \href{http://ftp.unidata.ucar.edu/software/netcdf/docs/conventions.html} {GDT, COARDS or CF Conventions}. -NetCDF is an external library and not part of \CDI. To use netCDF with -\CDI the netCDF library must be installed before the configuration -of the \CDI library (see \htmlref{Build}{build}). +NetCDF is an external library and not part of {\CDI}. To use netCDF with +{\CDI} the netCDF library must be installed before the configuration +of the {\CDI} library (see \htmlref{Build}{build}). %\subsection{ncdap} @@ -110,8 +122,8 @@ The meaning of the variables are: \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) +\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} @@ -157,7 +169,7 @@ description section are coded with 4 byte integer values and the data section can have 4 or 8 byte IEEE floating point values. 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. +{\CDI} supports only data on an rotated grid for the IEG format. %%% Local Variables: %%% mode: latex diff --git a/doc/tex/install.tex b/doc/tex/install.tex index 7541e3567ff9dfcf5515538f542385d2696aa0bb..d3b8e97da2c5226969c50c33b2395a058b7c0976 100644 --- a/doc/tex/install.tex +++ b/doc/tex/install.tex @@ -1,21 +1,21 @@ \section{\label{build}Building from sources} -This section describes how to build the \CDI library from the sources on a UNIX system. -\CDI is using the GNU configure and build system to compile the source code. +This section describes how to build the {\CDI} library from the sources on a UNIX system. +{\CDI} is using the GNU configure and build system to compile the source code. The only requirement is a working ANSI C compiler. First go to the \href{http://www.mpimet.mpg.de/cdi}{\tt download} page ({\tt http://www.mpimet.mpg.de/cdi}) to get the latest distribution, -if you did not have it already. +if you do not already have it. -To take full advantage of \CDI's features the following additional +To take full advantage of {\CDI}'s features the following additional library should be installed. \begin{itemize} \item Unidata \href{http://www.unidata.ucar.edu/packages/netcdf/index.html}{netCDF} library ({\tt http://www.unidata.ucar.edu/packages/netcdf/index.html}) version 3 or higher. - This is needed to read/write netCDF files with \CDI. + This is needed to read/write netCDF files with {\CDI}. \end{itemize} @@ -24,7 +24,7 @@ library should be installed. Compilation is now done by performing the following steps: \begin{enumerate} -\item Unpack the archive, unless you already have done that: +\item Unpack the archive, if you haven't already done that: \begin{verbatim} gunzip cdi-$VERSION.tar.gz # uncompress the archive diff --git a/doc/tex/intro.tex b/doc/tex/intro.tex index 7350b2516ca093b9bca209032b82e632ed7aca35..7c1667a685a000dfa42d7f20c3f0bdfa966c3f71 100644 --- a/doc/tex/intro.tex +++ b/doc/tex/intro.tex @@ -1,7 +1,7 @@ -\CDI is an Interface to access Climate model Data. +{\CDI} is an Interface to access Climate model Data. The interface is independent from a specific data format and has a C and Fortran API. -\CDI was developed for a fast and machine independent access +{\CDI} was developed for a fast and machine independent access to GRIB and netCDF datasets with the same interface. The local data formats SERVICE, EXTRA and IEG are also supported. diff --git a/doc/tex/makedoc b/doc/tex/makedoc index 29ef8a90a5fdbd12ebbaf942e90425d065c6d755..af1303181b0020cb472dbb0a19b82b2c9b0a5bda 100755 --- a/doc/tex/makedoc +++ b/doc/tex/makedoc @@ -403,7 +403,7 @@ sub printcfdoc { if ( $#list >= 0 ) { foreach $tag (@list) { chomp $tag; - $tag =~ s/ CDI / \\CDI /og; + $tag =~ s/ CDI / {\\CDI} /og; $tag =~ s/_/\\_/og; $tag =~ s/\@fref\{([^}]*)\}/{\\htmlref{\\tt \1}{\1}}/og; $tag =~ s/\@func\{([^}]*)\}/{\\tt \1}/og; diff --git a/doc/tex/modules.tex b/doc/tex/modules.tex index c15775f2473981b3e9265cb70100ddf6734bd346..afe8f79f14461f5d9951307cdfccd1c971c1e8ff 100644 --- a/doc/tex/modules.tex +++ b/doc/tex/modules.tex @@ -1,2 +1,2 @@ -Complete examples for write, read and copy a dataset with \CDI -can be found in \htmlref{Appendix B}{example}. +%Complete examples for write, read and copy a dataset with {\CDI} +%can be found in \htmlref{Appendix B}{example}. diff --git a/doc/tex/usage.tex b/doc/tex/usage.tex index b5277016095c7851350ee71354d7eadc024a18c9..af1995faa30a34e7caa951338d27607c0ae2203a 100644 --- a/doc/tex/usage.tex +++ b/doc/tex/usage.tex @@ -1,6 +1,15 @@ +This chapter provides templates of common sequences of {\CDI} calls needed for common uses. +For clarity only the names of routines are used. Declarations and error checking were omitted. +Statements that are typically invoked multiple times were indented and ... is used to +represent arbitrary sequences of other statements. +Full parameter lists are described in later chapters. + +Complete examples for write, read and copy a dataset with {\CDI} +can be found in \htmlref{Appendix B}{example}. + \section{Creating a dataset} -Here is a typical sequence of \CDI calls used to create a new dataset: +Here is a typical sequence of {\CDI} calls used to create a new dataset: \begin{lstlisting}[backgroundcolor=\color{zebg}, basicstyle=\footnotesize] gridCreate ! create a horizontal Grid: from type and size @@ -35,6 +44,8 @@ Here is a typical sequence of \CDI calls used to create a new dataset: \section{Reading a dataset} +Here is a typical sequence of {\CDI} calls used to read a dataset: + \begin{lstlisting}[backgroundcolor=\color{zebg}, basicstyle=\footnotesize] streamOpenRead ! open existing dataset ... @@ -56,14 +67,8 @@ Here is a typical sequence of \CDI calls used to create a new dataset: \section{Compiling and Linking with the CDI library} -Details of how to compile and link a program that uses the \CDI C or FORTRAN +Details of how to compile and link a program that uses the {\CDI} C or FORTRAN interfaces differ, depending on the operating system, the available compilers, -and where the \CDI library and include files are installed. -Here are examples of how to compile and link a program that uses the \CDI library +and where the {\CDI} library and include files are installed. +Here are examples of how to compile and link a program that uses the {\CDI} library on a Unix platform, so that you can adjust these examples to fit your installation. - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/doc/tex/zaxis.tex b/doc/tex/zaxis.tex index 61136f3c2947bf75d45cccdf1869b5f46f0b14b3..bf8f0afa645f33cfec8e6e7c2c4833f3ef01acf3 100644 --- a/doc/tex/zaxis.tex +++ b/doc/tex/zaxis.tex @@ -11,6 +11,7 @@ The following different Z-axis types are available: \item[{\large\tt ZAXIS\_HYBRID }] Hybrid level \item[{\large\tt ZAXIS\_PRESSURE }] Isobaric pressure level in Pasal \item[{\large\tt ZAXIS\_HEIGHT }] Height above ground in meters +\item[{\large\tt ZAXIS\_ALTITUDE }] Altitude above mean sea level in meters \item[{\large\tt ZAXIS\_DEPTH\_BELOW\_SEA }] Depth below sea level in meters \item[{\large\tt ZAXIS\_DEPTH\_BELOW\_LAND}] Depth below land surface in centimeters \end{deflist} diff --git a/src/stream_cdf.c b/src/stream_cdf.c index 36506884ce558a328dd2753c787df4dd0ea0e847..67e7c8d10402bc0c01cf80ec33fd7b81b76564b7 100644 --- a/src/stream_cdf.c +++ b/src/stream_cdf.c @@ -463,6 +463,9 @@ void cdfDefMissval(int streamID, int varID, int dtype) cdf_put_att_double(fileID, ncvarid, "_FillValue", (nc_type) xtype, 1L, &missval); + if ( cdiNcMissingValue == 1 ) + cdf_put_att_double(fileID, ncvarid, "missing_value", (nc_type) xtype, 1L, &missval); + if ( streams[streamID].ncmode == 2 ) cdf_enddef(fileID); streams[streamID].vars[varID].defmiss = TRUE; diff --git a/src/stream_int.c b/src/stream_int.c index 34f450b522da862dc653960504043ad957664bb2..a568e1f283ed35665f84495555dd8d05d81eae16 100644 --- a/src/stream_int.c +++ b/src/stream_int.c @@ -21,6 +21,7 @@ int cdiDefaultInstID = CDI_UNDEFID; int cdiDefaultModelID = CDI_UNDEFID; int cdiDefaultTableID = CDI_UNDEFID; +int cdiNcMissingValue = CDI_UNDEFID; double cdiDefaultMissval = -9.E33; @@ -153,6 +154,9 @@ void cdiInitialize(void) envString = getenv("CD_MISSVAL"); if ( envString ) cdiDefaultMissval = atof(envString); + + envString = getenv("NC_MISSING_VALUE"); + if ( envString ) cdiNcMissingValue = atof(envString); } } diff --git a/src/stream_int.h b/src/stream_int.h index 599ac30afafa8f2a50cbdb4790afbafe0903b561..f909cf84a04c5ac3d2f8a4b9775d018e4f124b04 100644 --- a/src/stream_int.h +++ b/src/stream_int.h @@ -221,6 +221,7 @@ extern int cdiDefaultInstID; extern int cdiDefaultModelID; extern int cdiDefaultTableID; extern int cdiDefaultLeveltype; +extern int cdiNcMissingValue; int streamInqFileID(int streamID);