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

Added global option CDI_read_cell_corners.

parent 35785c6d
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.1
* Version 1.9.5 released
2018-07-10 Uwe Schulzweida
* Added global option CDI_read_cell_corners
2018-07-09 Uwe Schulzweida
* grib reduced_gg: gribapi gridType detector doesn't like lonIncr
......
......@@ -39,6 +39,7 @@ int cdiSkipRecords = 0;
int cdiConvention = CDI_CONVENTION_ECHAM;
int cdiInventoryMode = 1;
int CDI_Version_Info = 1;
int CDI_read_cell_corners = 1;
int CDI_cmor_mode = 0;
int CDI_reduce_dim = 0;
size_t CDI_netcdf_hdr_pad = 0UL;
......@@ -340,6 +341,9 @@ void cdiInitialize(void)
value = cdiGetenvInt("CDI_GRIBAPI_DEBUG");
if ( value >= 0 ) cdiGribApiDebug = (int) value;
value = cdiGetenvInt("CDI_READ_CELL_CORNERS");
if ( value >= 0 ) CDI_read_cell_corners = (int) value;
value = cdiGetenvInt("CDI_RECOPT");
if ( value >= 0 ) CDI_Recopt = (int) value;
......@@ -478,6 +482,7 @@ void cdiDefGlobal(const char *string, int val)
else if ( strcmp(string, "SORTPARAM") == 0 ) cdiSortParam = val;
else if ( strcmp(string, "HAVE_MISSVAL") == 0 ) cdiHaveMissval = val;
else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 ) cdiNcChunksizehint = val;
else if ( strcmp(string, "READ_CELL_CORNERS")== 0 ) CDI_read_cell_corners = val;
else if ( strcmp(string, "CMOR_MODE") == 0 ) CDI_cmor_mode = val;
else if ( strcmp(string, "REDUCE_DIM") == 0 ) CDI_reduce_dim = val;
else if ( strcmp(string, "NETCDF_HDR_PAD") == 0 ) CDI_netcdf_hdr_pad = (size_t) val;
......
......@@ -346,6 +346,7 @@ extern int cdiSkipRecords;
extern int cdiConvention;
extern int cdiInventoryMode;
extern int CDI_Version_Info;
extern int CDI_read_cell_corners;
extern int CDI_cmor_mode;
extern int CDI_reduce_dim;
extern size_t CDI_netcdf_hdr_pad;
......
......@@ -2420,7 +2420,7 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
grid->size = size;
grid->x.size = xsize;
grid->y.size = ysize;
if ( xvarid != CDI_UNDEFID )
if ( xvarid != CDI_UNDEFID && CDI_read_cell_corners )
{
grid->x.flag = 1;
int bvarid = ncvars[xvarid].bounds;
......@@ -2435,7 +2435,7 @@ bool cdf_read_coordinates(struct cdfLazyGrid *restrict lazyGrid, ncvar_t *ncvar,
}
}
}
if ( yvarid != CDI_UNDEFID )
if ( yvarid != CDI_UNDEFID && CDI_read_cell_corners )
{
grid->y.flag = 1;
int bvarid = ncvars[yvarid].bounds;
......
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