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

grib_api: debug patch from Florian and Daniel

parent af9ea711
2014-02-21 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* grib_api: debug patch from Florian and Daniel
2014-02-20 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* grib2: set stepUnits after changing the template [Bug #4500]
......
......@@ -67,6 +67,7 @@ int CDI_Debug = 0; /* If set to 1, debugging */
static int STREAM_Debug = 0; /* If set to 1, debugging */
int cdiGribApiDebug = 0;
int cdiDefaultLeveltype = -1;
static int cdiDataUnreduced = 0;
static int cdiSortName = 0;
......@@ -178,6 +179,9 @@ void cdiInitialize(void)
gribSetConst(1); // 1: Don't pack constant fields on regular grids
#endif
value = cdiGetenvInt("CDI_GRIBAPI_DEBUG");
if ( value >= 0 ) cdiGribApiDebug = (int) value;
value = cdiGetenvInt("CDI_REGULARGRID");
if ( value >= 0 ) cdiDataUnreduced = (int) value;
......@@ -388,26 +392,12 @@ int streamSize(void)
void cdiDefGlobal(const char *string, int val)
{
if ( strcmp(string, "REGULARGRID") == 0 )
{
cdiDataUnreduced = val;
}
else if ( strcmp(string, "SORTNAME") == 0 )
{
cdiSortName = val;
}
else if ( strcmp(string, "HAVE_MISSVAL") == 0 )
{
cdiHaveMissval = val;
}
else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 )
{
cdiNcChunksizehint = val;
}
else
{
Warning("Unsupported global key: %s", string);
}
if ( strcmp(string, "REGULARGRID") == 0 ) cdiDataUnreduced = val;
else if ( strcmp(string, "GRIBAPI_DEBUG") == 0 ) cdiGribApiDebug = val;
else if ( strcmp(string, "SORTNAME") == 0 ) cdiSortName = val;
else if ( strcmp(string, "HAVE_MISSVAL") == 0 ) cdiHaveMissval = val;
else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 ) cdiNcChunksizehint = val;
else Warning("Unsupported global key: %s", string);
}
......
......@@ -265,6 +265,7 @@ stream_t;
extern int CDI_Debug; /* If set to 1, debuggig (default 0) */
extern int cdiGribApiDebug;
extern double cdiDefaultMissval;
extern int cdiDefaultInstID;
extern int cdiDefaultModelID;
......
This diff is collapsed.
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