Commit 7ca61648 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added tabnum to cgribexDefParam (bug fix)

parent 0675f171
......@@ -6128,11 +6128,14 @@ void cdfDefInstitut(int streamID)
if ( longname )
{
len = strlen(longname);
if ( len > 0 )
{
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
cdf_put_att_text(fileID, NC_GLOBAL, "institution", len, longname);
if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
}
}
}
#endif
}
......@@ -6157,11 +6160,14 @@ void cdfDefSource(int streamID)
if ( longname )
{
len = strlen(longname);
if ( len > 0 )
{
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
cdf_put_att_text(fileID, NC_GLOBAL, "source", len, longname);
if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
}
}
}
#endif
}
......
......@@ -1396,7 +1396,7 @@ void cgribexDefModel(int *isec1, int vlistID, int varID)
}
static
void cgribexDefParam(int *isec1, int param)
void cgribexDefParam(int *isec1, int param, int tabnum)
{
static char func[] = "cgribexDefParam";
int pdis, pcat, pnum;
......@@ -1412,6 +1412,8 @@ void cgribexDefParam(int *isec1, int param)
if ( pnum < 0 ) pnum = -pnum;
if ( pcat == 255 ) pcat = tabnum;
ISEC1_CodeTable = pcat;
ISEC1_Parameter = pnum;
}
......@@ -2004,7 +2006,7 @@ size_t cgribexEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
datatype = vlistInqVarDatatype(vlistID, varID);
cgribexDefParam(isec1, param);
cgribexDefParam(isec1, param, tabnum);
cgribexDefTime(isec1, date, time, numavg, vlistInqTaxis(vlistID));
cgribexDefGrid(isec1, isec2, gridID);
cgribexDefLevel(isec1, isec2, fsec2, zaxisID, levelID);
......
Supports Markdown
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