Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
6c0386fe
Commit
6c0386fe
authored
Jun 15, 2009
by
Uwe Schulzweida
Browse files
netCDF: reduced number of nc_enddef
parent
587149a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6c0386fe
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
...
...
src/stream_cdf.c
View file @
6c0386fe
...
...
@@ -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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment