Commit 6c0386fe authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

netCDF: reduced number of nc_enddef

parent 587149a9
2009-06-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netCDF: reduced number of nc_enddef
* Version 1.3.3 released
2009-06-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added env CDI_SORTNAME to sort netCDF names
......@@ -5,7 +10,7 @@
* timeval2vtime: bug fix for timeunit TUNIT_MONTH
* streamSync: extent to non netCDF files
* Version 1.3.2 released
2009-04-16 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.3.0
......
......@@ -2528,7 +2528,7 @@ int cdfDefVar(int streamID, int varID)
code = 0;
}
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
/* if ( streamptr->ncmode == 2 ) cdf_redef(fileID); */
xtype = cdfDefDatatype(vlistInqVarDatatype(vlistID, varID));
......@@ -2695,7 +2695,7 @@ int cdfDefVar(int streamID, int varID)
/* Attributes */
defineAttributes(vlistID, varID, fileID, ncvarid);
if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
/* if ( streamptr->ncmode == 2 ) cdf_enddef(fileID); */
#endif
return (ncvarid);
......@@ -5697,20 +5697,26 @@ void cdfEndDef(int streamID)
{
int varID, ncvarid;
int nvars;
int fileID;
STREAM *streamptr;
streamptr = stream_to_pointer(streamID);
fileID = streamInqFileID(streamID);
cdfDefGlobalAtts(streamID);
cdfDefLocalAtts(streamID);
if ( streamptr->accessmode == 0 )
{
nvars = streamptr->nvars;
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
for ( varID = 0; varID < nvars; varID++ )
{
ncvarid = cdfDefVar(streamID, varID);
}
ncvarid = cdfDefVar(streamID, varID);
if ( streamptr->ncmode == 2 ) cdf_enddef(fileID);
streamptr->accessmode = 1;
}
}
......
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