Commit 4a6002c8 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

split GRIB level type 105 with env var SPLIT_LTYPE_105

parent bc8bcb91
2006-08-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* split GRIB level type 105 with env var SPLIT_LTYPE_105
* file.c: remove declaration of getpagesize (report: Mark Hadfield)
* tableWrite: bug fix for undefined strings
* Version 1.0.1 released
......
......@@ -22,6 +22,7 @@ int cdiDefaultInstID = CDI_UNDEFID;
int cdiDefaultModelID = CDI_UNDEFID;
int cdiDefaultTableID = CDI_UNDEFID;
int cdiNcMissingValue = CDI_UNDEFID;
int cdiSplitLtype105 = CDI_UNDEFID;
double cdiDefaultMissval = -9.E33;
......@@ -157,6 +158,9 @@ void cdiInitialize(void)
envString = getenv("NC_MISSING_VALUE");
if ( envString ) cdiNcMissingValue = atoi(envString);
envString = getenv("SPLIT_LTYPE_105");
if ( envString ) cdiSplitLtype105 = atoi(envString);
}
}
......
......@@ -222,6 +222,7 @@ extern int cdiDefaultModelID;
extern int cdiDefaultTableID;
extern int cdiDefaultLeveltype;
extern int cdiNcMissingValue;
extern int cdiSplitLtype105;
int streamInqFileID(int streamID);
......
......@@ -45,12 +45,14 @@ typedef struct
}
VARTABLE;
int vartableInit = 0;
VARTABLE *vartable;
static int varTablesize = 0;
int nvars = 0;
void codeInitEntry(int varID, int code)
static void codeInitEntry(int varID, int code)
{
vartable[varID].code = code;
vartable[varID].prec = 0;
......@@ -63,7 +65,8 @@ void codeInitEntry(int varID, int code)
vartable[varID].tableID = UNDEFID;
}
int varGetEntry(int code, int leveltype, int codetable)
static int varGetEntry(int code, int leveltype, int codetable)
{
int varID;
......@@ -78,6 +81,7 @@ int varGetEntry(int code, int leveltype, int codetable)
return (UNDEFID);
}
void varFree(void)
{
static char func[] = "varFree";
......@@ -236,10 +240,11 @@ void varAddRecord(int recID, int code, int gridID, int leveltype, int lbounds,
int numavg, int codetable)
{
static char func[] = "varAddRecord";
int varID;
int varID = UNDEFID;
int levelID = -1;
varID = varGetEntry(code, leveltype, codetable);
if ( ! (cdiSplitLtype105 == 1 && leveltype == ZAXIS_HEIGHT) )
varID = varGetEntry(code, leveltype, codetable);
if ( varID == UNDEFID )
{
......
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