Commit bc5c9e38 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grid: docu update

parent f90f68b3
......@@ -7,24 +7,41 @@
\href{http://www.mpimet.mpg.de}
{Max Planck Institute for Meteorologie}
\bibitem[GRIB]{GRIB} \ \\
\href{http://www.wmo.ch/web/www/WMOCodes/Guides/GRIB/GRIB1-Contents.html}
{GRIB version 1},
from the World Meteorological Organisation
(\href{http://www.wmo.ch}{WMO})
\bibitem[GRIBAPI]{GRIBAPI} \ \\
\href{http://www.ecmwf.int/products/data/software/grib_api.html}
{GRIB API decoding/encoding},
from the European Centre for Medium-Range Weather Forecasts
(\href{http://www.ecmwf.int}{ECMWF})
\bibitem[HDF5]{HDF5} \ \\
\href{http://hdf.ncsa.uiuc.edu/HDF5/}
{HDF version 5},
from the HDF Group
\bibitem[NetCDF]{NetCDF} \ \\
\href{http://www.unidata.ucar.edu/packages/netcdf/index.html}{NetCDF Software Package},
from the
\href{http://www.unidata.ucar.edu}{UNIDATA}
Program Center of the University Corporation for Atmospheric Research
\bibitem[MPIOM]{MPIOM} \ \\
The ocean model MPIOM,
from the
\href{http://www.mpimet.mpg.de}
{Max Planck Institute for Meteorologie}
\bibitem[REMO]{REMO} \ \\
The regional climate model REMO,
from the
......
......@@ -18,7 +18,8 @@ The function {\tt gridCreate} creates a horizontal Grid.
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\_LCC}, {\tt GRID\_SPECTRAL},
{\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}.
{\tt GRID\_GME}, {\tt GRID\_CURVILINEAR}, {\tt GRID\_UNSTRUCTURED} and
{\tt GRID\_NUMBER}
\item[{\tt size}]
Number of gridpoints.
......@@ -125,7 +126,7 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}
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\_LCC}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME},
{\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}.
{\tt GRID\_CURVILINEAR}, {\tt GRID\_UNSTRUCTURED} and {\tt GRID\_NUMBER}.
......
......@@ -403,8 +403,8 @@ Variable identifier
\item[{\tt datatype}]
The data type identifier.
The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16},
{\tt DATATYPE\_PACK24}, {\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
{\tt DATATYPE\_PACK24}, {\tt DATATYPE\_FLT32}, {\tt DATATYPE\_FLT64},
{\tt DATATYPE\_INT8}, {\tt DATATYPE\_INT16} and {\tt DATATYPE\_INT32}.
\end{deflist}
\end{minipage}
......@@ -436,7 +436,8 @@ Variable identifier
{\tt vlistInqVarDatatype} returns an identifier to the data type of the variable.
The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16}, {\tt DATATYPE\_PACK24},
{\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
{\tt DATATYPE\_FLT32}, {\tt DATATYPE\_FLT64}, {\tt DATATYPE\_INT8}, {\tt DATATYPE\_INT16} and
{\tt DATATYPE\_INT32}.
......
......@@ -18,7 +18,8 @@ The function {\tt gridCreate} creates a horizontal Grid.
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\_LCC}, {\tt GRID\_SPECTRAL},
{\tt GRID\_GME}, {\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}.
{\tt GRID\_GME}, {\tt GRID\_CURVILINEAR}, {\tt GRID\_UNSTRUCTURED} and
{\tt GRID\_NUMBER}
\item[{\tt size}]
Number of gridpoints.
......@@ -125,7 +126,7 @@ Grid ID, from a previous call to {\htmlref{\tt gridCreate}{gridCreate}}
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\_LCC}, {\tt GRID\_SPECTRAL}, {\tt GRID\_GME},
{\tt GRID\_CURVILINEAR} and {\tt GRID\_CELL}.
{\tt GRID\_CURVILINEAR}, {\tt GRID\_UNSTRUCTURED} and {\tt GRID\_NUMBER}.
......
......@@ -408,8 +408,8 @@ Variable identifier
\item[{\tt datatype}]
The data type identifier.
The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16},
{\tt DATATYPE\_PACK24}, {\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
{\tt DATATYPE\_PACK24}, {\tt DATATYPE\_FLT32}, {\tt DATATYPE\_FLT64},
{\tt DATATYPE\_INT8}, {\tt DATATYPE\_INT16} and {\tt DATATYPE\_INT32}.
\end{deflist}
\end{minipage}
......@@ -441,7 +441,8 @@ Variable identifier
{\tt vlistInqVarDatatype} returns an identifier to the data type of the variable.
The valid {\CDI} data types are {\tt DATATYPE\_PACK8}, {\tt DATATYPE\_PACK16}, {\tt DATATYPE\_PACK24},
{\tt DATATYPE\_FLT32} and {\tt DATATYPE\_FLT64}.
{\tt DATATYPE\_FLT32}, {\tt DATATYPE\_FLT64}, {\tt DATATYPE\_INT8}, {\tt DATATYPE\_INT16} and
{\tt DATATYPE\_INT32}.
......
......@@ -5,14 +5,15 @@ The following different Grid types are available:
\vspace*{3mm}
\hspace*{8mm}\begin{minipage}{15cm}
\begin{deflist}{{\large\tt GRID\_CURVILINEAR \ \ }}
\item[{\large\tt GRID\_GENERIC }] Generic user defined grid
\item[{\large\tt GRID\_GAUSSIAN }] Gaussian latitude/longitude grid
\item[{\large\tt GRID\_LONLAT }] Equidistant longitude/latitude grid
\item[{\large\tt GRID\_LCC }] Lambert conformal conic grid
\item[{\large\tt GRID\_SPECTRAL }] Spherical harmonic coefficients
\item[{\large\tt GRID\_GME }] Icosahedral-hexagonal GME grid
\item[{\large\tt GRID\_CURVILINEAR}] Curvilinear grid
\item[{\large\tt GRID\_CELL }] Unstructured grid cells
\begin{deflist}{{\large\tt GRID\_UNSTRUCTURED \ \ }}
\item[{\large\tt GRID\_GENERIC }] Generic user defined grid
\item[{\large\tt GRID\_LONLAT }] Regular longitude/latitude grid
\item[{\large\tt GRID\_GAUSSIAN }] Regular Gaussian lon/lat grid
\item[{\large\tt GRID\_SPECTRAL }] Spherical harmonic coefficients
\item[{\large\tt GRID\_GME }] Icosahedral-hexagonal GME grid
\item[{\large\tt GRID\_CURVILINEAR }] Curvilinear grid
\item[{\large\tt GRID\_UNSTRUCTURED}] Unstructured grid
\item[{\large\tt GRID\_LCC }] Lambert conformal conic grid
\item[{\large\tt GRID\_NUMBER }] Number of grid
\end{deflist}
\end{minipage}
......@@ -112,7 +112,7 @@ The function {\tt gridNew} creates a new Grid.
\item[{\tt gridtype}]
One of the set of predefined CDI grid types.
The valid CDI grid types are GRID\_GENERIC, GRID\_GAUSSIAN,
GRID\_LONLAT, GRID\_SPECTRAL, GRID\_CURVILINEAR and GRID\_CELL.
GRID\_LONLAT, GRID\_SPECTRAL, GRID\_CURVILINEAR and GRID\_UNSTRUCTURED.
\item[{\tt size}]
Number of gridpoints.
\end{deflist}
......@@ -122,7 +122,7 @@ Number of gridpoints.
\makebox[0.75in][l]{\tt gridtype} &
One of the set of predefined CDI grid types.
The valid CDI grid types are GRID\_GENERIC, GRID\_GAUSSIAN,
GRID\_LONLAT, GRID\_SPECTRAL, GRID\_CURVILINEAR and GRID\_CELL. \\
GRID\_LONLAT, GRID\_SPECTRAL, GRID\_CURVILINEAR and GRID\_UNSTRUCTURED. \\
\makebox[0.75in][l]{\tt size} &
Number of gridpoints. \\
\end{tabular*}
......
......@@ -24,6 +24,9 @@ predefined constants:
\item[{\large\tt DATATYPE\_PACK24}] 24 packed bit (only for GRIB)
\item[{\large\tt DATATYPE\_FLT32}] 32 bit floating point
\item[{\large\tt DATATYPE\_FLT64}] 64 bit floating point
\item[{\large\tt DATATYPE\_INT8}] 8 bit integer
\item[{\large\tt DATATYPE\_INT16}] 16 bit integer
\item[{\large\tt DATATYPE\_INT32}] 32 bit integer
\end{deflist}
\end{minipage}
%\vspace*{3mm}
......
......@@ -106,21 +106,21 @@ extern "C" {
/* GRID types */
#define GRID_GENERIC 1
#define GRID_GAUSSIAN 2
#define GRID_GAUSSIAN_REDUCED 3
#define GRID_LONLAT 4
#define GRID_SPECTRAL 5
#define GRID_FOURIER 6
#define GRID_GME 7 /* Icosahedral-hexagonal GME Grid */
#define GRID_GENERIC 1 /* Generic grid */
#define GRID_GAUSSIAN 2 /* Regular Gaussian lon/lat grid */
#define GRID_GAUSSIAN_REDUCED 3 /* Reduced Gaussian lon/lat grid */
#define GRID_LONLAT 4 /* Regular longitude/latitude grid */
#define GRID_SPECTRAL 5 /* Spherical harmonic coefficients */
#define GRID_FOURIER 6 /* Fourier coefficients */
#define GRID_GME 7 /* Icosahedral-hexagonal GME grid */
#define GRID_TRAJECTORY 8
#define GRID_UNSTRUCTURED 9
#define GRID_CURVILINEAR 10
#define GRID_LCC 11 /* Lambert Conformal Conic (GRIB) */
#define GRID_LCC2 12 /* Lambert Conformal Conic (PROJ) */
#define GRID_LAEA 13 /* Lambert Azimuthal Equal Area */
#define GRID_SINUSOIDAL 14 /* Sinusoidal */
#define GRID_NUMBER 15
#define GRID_UNSTRUCTURED 9 /* General unstructured grid */
#define GRID_CURVILINEAR 10 /* Curvilinear grid */
#define GRID_LCC 11 /* Lambert Conformal Conic (GRIB) */
#define GRID_LCC2 12 /* Lambert Conformal Conic (PROJ) */
#define GRID_LAEA 13 /* Lambert Azimuthal Equal Area */
#define GRID_SINUSOIDAL 14 /* Sinusoidal */
#define GRID_NUMBER 15 /* Number of grid */
/* ZAXIS types */
......
......@@ -475,7 +475,8 @@ void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double y
@Item gridtype The type of the grid, one of the set of predefined CDI grid types.
The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_GAUSSIAN},
@func{GRID_LONLAT}, @func{GRID_LCC}, @func{GRID_SPECTRAL},
@func{GRID_GME}, @func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}.
@func{GRID_GME}, @func{GRID_CURVILINEAR}, @func{GRID_UNSTRUCTURED} and
@func{GRID_NUMBER}
@Item size Number of gridpoints.
@Description
......@@ -527,8 +528,8 @@ int gridCreate(int gridtype, int size)
gridptr->size = size;
/* if ( gridtype == GRID_GENERIC ) gridptr->xsize = size; */
if ( gridtype == GRID_UNSTRUCTURED ) gridptr->xsize = size;
if ( gridtype == GRID_CURVILINEAR ) gridptr->nvertex = 4;
if ( gridtype == GRID_UNSTRUCTURED ) gridptr->xsize = size;
if ( gridtype == GRID_CURVILINEAR ) gridptr->nvertex = 4;
switch (gridtype)
{
......@@ -1032,7 +1033,7 @@ The function @func{gridInqType} returns the type of a Grid.
one of the set of predefined CDI grid types.
The valid CDI grid types are @func{GRID_GENERIC}, @func{GRID_GAUSSIAN},
@func{GRID_LONLAT}, @func{GRID_LCC}, @func{GRID_SPECTRAL}, @func{GRID_GME},
@func{GRID_CURVILINEAR} and @func{GRID_UNSTRUCTURED}.
@func{GRID_CURVILINEAR}, @func{GRID_UNSTRUCTURED} and @func{GRID_NUMBER}.
@EndFunction
*/
......
......@@ -732,7 +732,8 @@ The function @func{vlistInqVarDatatype} returns the data type of a variable.
@Result
@func{vlistInqVarDatatype} returns an identifier to the data type of the variable.
The valid CDI data types are @func{DATATYPE_PACK8}, @func{DATATYPE_PACK16}, @func{DATATYPE_PACK24},
@func{DATATYPE_FLT32} and @func{DATATYPE_FLT64}.
@func{DATATYPE_FLT32}, @func{DATATYPE_FLT64}, @func{DATATYPE_INT8}, @func{DATATYPE_INT16} and
@func{DATATYPE_INT32}.
@EndFunction
*/
......@@ -757,7 +758,8 @@ int vlistInqVarNumber(int vlistID, int varID)
vlistCheckVarID(__func__, vlistID, varID);
if ( vlistptr->vars[varID].datatype == DATATYPE_CPX32 || vlistptr->vars[varID].datatype == DATATYPE_CPX64 )
if ( vlistptr->vars[varID].datatype == DATATYPE_CPX32 ||
vlistptr->vars[varID].datatype == DATATYPE_CPX64 )
number = CDI_COMP;
return (number);
......@@ -773,8 +775,8 @@ int vlistInqVarNumber(int vlistID, int varID)
@Item varID Variable identifier
@Item datatype The data type identifier.
The valid CDI data types are @func{DATATYPE_PACK8}, @func{DATATYPE_PACK16},
@func{DATATYPE_PACK24}, @func{DATATYPE_FLT32} and @func{DATATYPE_FLT64}.
@func{DATATYPE_PACK24}, @func{DATATYPE_FLT32}, @func{DATATYPE_FLT64},
@func{DATATYPE_INT8}, @func{DATATYPE_INT16} and @func{DATATYPE_INT32}.
@Description
The function @func{vlistDefVarDatatype} defines the data type of a variable.
......@@ -792,29 +794,15 @@ void vlistDefVarDatatype(int vlistID, int varID, int datatype)
vlistptr->vars[varID].datatype = datatype;
if ( vlistptr->vars[varID].missvalused == FALSE )
{
switch (datatype)
{
case DATATYPE_INT8:
vlistptr->vars[varID].missval = SCHAR_MIN;
break;
case DATATYPE_UINT8:
vlistptr->vars[varID].missval = UCHAR_MAX;
break;
case DATATYPE_INT16:
vlistptr->vars[varID].missval = SHRT_MIN;
break;
case DATATYPE_UINT16:
vlistptr->vars[varID].missval = USHRT_MAX;
break;
case DATATYPE_INT32:
vlistptr->vars[varID].missval = INT_MIN;
break;
case DATATYPE_UINT32:
vlistptr->vars[varID].missval = UINT_MAX;
break;
}
}
switch (datatype)
{
case DATATYPE_INT8: vlistptr->vars[varID].missval = SCHAR_MIN; break;
case DATATYPE_UINT8: vlistptr->vars[varID].missval = UCHAR_MAX; break;
case DATATYPE_INT16: vlistptr->vars[varID].missval = SHRT_MIN; break;
case DATATYPE_UINT16: vlistptr->vars[varID].missval = USHRT_MAX; break;
case DATATYPE_INT32: vlistptr->vars[varID].missval = INT_MIN; break;
case DATATYPE_UINT32: vlistptr->vars[varID].missval = UINT_MAX; break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment