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
e5762818
Commit
e5762818
authored
Sep 11, 2012
by
Uwe Schulzweida
Browse files
cdfInqContents: set ntsteps to 0 if no data variable found
parent
0be7a950
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
e5762818
...
...
@@ -5,6 +5,7 @@
2012-09-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfInqContents: set ntsteps to 0 if no data variable found
* netCDF: set 1D arrays to coordiante variables if axis attribute is available
2012-09-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/stream_cdf.c
View file @
e5762818
...
...
@@ -6352,9 +6352,7 @@ int cdfInqContents(int streamID)
else
ntsteps
=
0
;
streamptr
->
ntsteps
=
ntsteps
;
if
(
CDI_Debug
)
Message
(
"Number of timesteps = %d"
,
streamptr
->
ntsteps
);
if
(
CDI_Debug
)
Message
(
"Number of timesteps = %d"
,
ntsteps
);
if
(
CDI_Debug
)
Message
(
"Time dimid = %d"
,
streamptr
->
basetime
.
ncdimid
);
/* read ncdims */
...
...
@@ -6662,11 +6660,17 @@ int cdfInqContents(int streamID)
nvars
=
nvarids
;
if
(
CDI_Debug
)
Message
(
"time varid = %d"
,
streamptr
->
basetime
.
ncvarid
);
if
(
CDI_Debug
)
Message
(
"ntsteps = %d"
,
streamptr
->
ntsteps
);
if
(
CDI_Debug
)
Message
(
"ntsteps = %d"
,
ntsteps
);
if
(
CDI_Debug
)
Message
(
"nvars = %d"
,
nvars
);
if
(
nvars
==
0
)
return
(
CDI_EUFSTRUCT
);
if
(
nvars
==
0
)
{
streamptr
->
ntsteps
=
0
;
return
(
CDI_EUFSTRUCT
);
}
streamptr
->
ntsteps
=
ntsteps
;
/* define all data variables */
define_all_vars
(
fileID
,
streamID
,
vlistID
,
instID
,
modelID
,
varids
,
ncdims
,
nvars
,
ncvars
);
...
...
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