Commit 7f808f09 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added support for netCDF timeseries without grid

parent 05a2cb89
2009-??-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.4.0
* change C compiler to ANSI C99
* changed C compiler to ANSI C99
* changed time format from hhmm to hhmmss
* changed encode/decode_time to seconds
* added support for netCDF timeseries without grid
* Version 1.4.0 released
2009-06-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
......@@ -2356,7 +2356,12 @@ void cdfDefGrid(int streamID, int gridID)
gridtype == GRID_LONLAT ||
gridtype == GRID_GENERIC )
{
if ( gridInqXsize(gridID) == 0 || gridInqYsize(gridID) == 0 )
if ( gridtype == GRID_GENERIC && size == 1 &&
gridInqXsize(gridID) == 0 && gridInqYsize(gridID) == 0 )
{
/* no grid information */
}
else if ( gridInqXsize(gridID) == 0 || gridInqYsize(gridID) == 0 )
{
cdfDefGdim(streamID, gridID);
}
......@@ -4696,7 +4701,7 @@ int cdfInqContents(int streamID)
{
if ( ncvars[ncvarid].isvar == TRUE && ncvars[ncvarid].ncoordvars )
{
ndims = ncvars[ncvarid].ndims;
/* ndims = ncvars[ncvarid].ndims; */
ndims = ncvars[ncvarid].ncoordvars;
for ( i = 0; i < ndims; i++ )
{
......@@ -5063,9 +5068,19 @@ int cdfInqContents(int streamID)
if ( grid.size == 0 )
{
Warning(func, "Variable %s has unsupported grid, skipped!", ncvars[ncvarid].name);
ncvars[ncvarid].isvar = -1;
continue;
if ( ncvars[ncvarid].ndims == 1 && ncvars[ncvarid].dimtype[0] == T_AXIS )
{
grid.type = GRID_GENERIC;
grid.size = 1;
grid.xsize = 0;
grid.ysize = 0;
}
else
{
Warning(func, "Variable %s has unsupported grid, skipped!", ncvars[ncvarid].name);
ncvars[ncvarid].isvar = -1;
continue;
}
}
if ( ncvars[ncvarid].gmapid >= 0 && ncvars[ncvarid].gridtype != GRID_CURVILINEAR )
......
Markdown is supported
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