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

netcdf: added support for 2D generic grids which share one dimension (bug fix)

parent af3f542a
2015-10-28 Uwe Schulzweida
* Version 1.7.0 released
* using CGRIBEX library version 1.7.3
* using EXSE library version 1.4.0
2015-10-06 Uwe Schulzweida
* netcdf: added support for 2D generic grids which share one dimension (bug fix)
2015-09-15 Uwe Schulzweida
* gridCompare: check only UUID of unstructured grids if coordinates are missing
......
......@@ -258,11 +258,6 @@
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
......
......@@ -6322,7 +6322,6 @@ static
void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nvars, ncvar_t *ncvars, int timedimid, unsigned char *uuidOfHGrid, char *gridfile, int number_of_grid_used)
{
int ncvarid, ncvarid2;
int ndims;
int nbdims;
int i;
int nvatts;
......@@ -6331,7 +6330,6 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
grid_t grid;
grid_t proj;
int gridindex;
size_t size = 0, xsize, ysize, np;
char name[CDI_MAX_NAME];
int iatt;
int ltwarn = TRUE;
......@@ -6348,13 +6346,11 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
int xvarid = -1, yvarid = -1;
int islon = 0, islat = 0;
int nxdims = 0, nydims = 0;
size_t size = 0, np = 0;
size_t xsize = 0, ysize = 0;
double xinc = 0, yinc = 0;
xsize = 0;
ysize = 0;
np = 0;
ndims = ncvars[ncvarid].ndims;
int ndims = ncvars[ncvarid].ndims;
for ( i = 0; i < ndims; i++ )
{
if ( ncvars[ncvarid].dimtype[i] == X_AXIS && nxdims < 2 )
......@@ -6420,7 +6416,7 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
}
if ( ncvars[ncvarid].gridtype == UNDEFID || ncvars[ncvarid].gridtype == GRID_GENERIC )
if ( xdimid != UNDEFID && xdimid == ydimid ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
if ( xdimid != UNDEFID && xdimid == ydimid && nydims == 0 ) ncvars[ncvarid].gridtype = GRID_UNSTRUCTURED;
grid_init(&grid);
grid_init(&proj);
......
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