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

global netCDF attribute source missing (bug fix)

parent 029c9e8f
2013-01-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* global netCDF attribute "source" missing (bug fix)
2012-12-18 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* reshGetValue: added caller function name to error message
......
......@@ -6284,10 +6284,9 @@ void define_all_vars(int streamID, int vlistID, int instID, int modelID, int *va
tableID = cdiDefaultTableID;
}
}
if ( cdiDefaultModelID != UNDEFID )
modelID = cdiDefaultModelID;
if ( cdiDefaultInstID != UNDEFID )
instID = cdiDefaultInstID;
if ( cdiDefaultModelID != UNDEFID ) modelID = cdiDefaultModelID;
if ( cdiDefaultInstID != UNDEFID ) instID = cdiDefaultInstID;
}
if ( instID != UNDEFID ) vlistDefVarInstitut(vlistID, varID, instID);
if ( modelID != UNDEFID ) vlistDefVarModel(vlistID, varID, modelID);
......@@ -6330,6 +6329,8 @@ void read_global_attributtes(int fileID, int vlistID, stream_t *streamptr, int n
else if ( strcmp(attname, "source") == 0 )
{
*modelID = modelInq(-1, 0, attstring);
if ( *modelID == UNDEFID )
*modelID = modelDef(-1, 0, attstring);
}
else if ( strcmp(attname, "Source") == 0 )
{
......
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