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

added support for environment variable NC_CHUNKSIZEHINT

parent 00606aa9
......@@ -3,6 +3,10 @@
* Version 1.5.6 released
* using CGRIBEX library version 1.5.3
2012-07-13 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for environment variable NC_CHUNKSIZEHINT [Feature #2142]
2012-07-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* grib scan timestep: changed Error() to Warning() for inconsistent timesteps
......
......@@ -57,6 +57,8 @@ void cdf_create(const char *path, int cmode, int *ncidp)
chunksizehint = 16777216; /* 16 MB */
#endif
if ( cdiNcChunksizehint != CDI_UNDEFID ) chunksizehint = cdiNcChunksizehint;
status = nc__create(path, cmode, initialsz, &chunksizehint, ncidp);
if ( CDF_Debug || status != NC_NOERR )
......
......@@ -1827,7 +1827,7 @@ void cdfDefRgrid(int streamID, int gridID)
break;
}
else
iz++;
iz++;
}
}
}
......
......@@ -24,6 +24,7 @@ int cdiDefaultInstID = CDI_UNDEFID;
int cdiDefaultModelID = CDI_UNDEFID;
int cdiDefaultTableID = CDI_UNDEFID;
int cdiNcMissingValue = CDI_UNDEFID;
int cdiNcChunksizehint = CDI_UNDEFID;
int cdiSplitLtype105 = CDI_UNDEFID;
int cdiIgnoreAttCoordinates = FALSE;
......@@ -144,6 +145,9 @@ void cdiInitialize(void)
envString = getenv("NC_MISSING_VALUE");
if ( envString ) cdiNcMissingValue = atoi(envString);
envString = getenv("NC_CHUNKSIZEHINT");
if ( envString ) cdiNcChunksizehint = atoi(envString);
envString = getenv("SPLIT_LTYPE_105");
if ( envString ) cdiSplitLtype105 = atoi(envString);
......@@ -531,6 +535,10 @@ void cdiDefGlobal(const char *string, int val)
{
cdiHaveMissval = val;
}
else if ( strcmp(string, "NC_CHUNKSIZEHINT") == 0 )
{
cdiNcChunksizehint = val;
}
else
{
Warning("Unsupported global key: %s", string);
......
......@@ -258,6 +258,7 @@ extern int cdiDefaultModelID;
extern int cdiDefaultTableID;
extern int cdiDefaultLeveltype;
extern int cdiNcMissingValue;
extern int cdiNcChunksizehint;
extern int cdiSplitLtype105;
extern char *cdiPartabPath;
......
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