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
62d1d764
Commit
62d1d764
authored
Jan 18, 2013
by
Uwe Schulzweida
Browse files
netCDF: check position of time dimension
parent
d751872b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
62d1d764
...
...
@@ -3,6 +3,10 @@
* Version 1.6.0 released
* using CGRIBEX library version 1.6.0
2013-01-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netCDF: check position of time dimension
2013-01-15 Thomas Jahns <jahns@dkrz.de>
* make_fint.c: added regexec support
...
...
src/stream_cdf.c
View file @
62d1d764
...
...
@@ -4375,11 +4375,24 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
#endif
if
(
nvdims
>
0
)
if
(
timedimid
==
dimidsp
[
0
]
)
{
ncvars
[
ncvarid
].
tsteptype
=
TSTEP_INSTANT
;
cdfSetDim
(
ncvars
,
ncvarid
,
0
,
T_AXIS
);
}
{
if
(
timedimid
==
dimidsp
[
0
]
)
{
ncvars
[
ncvarid
].
tsteptype
=
TSTEP_INSTANT
;
cdfSetDim
(
ncvars
,
ncvarid
,
0
,
T_AXIS
);
}
else
{
for
(
ncdimid
=
1
;
ncdimid
<
nvdims
;
ncdimid
++
)
{
if
(
timedimid
==
dimidsp
[
ncdimid
]
)
{
Warning
(
"Time must be the first dimension! Unsupported array structure, skipped variable %s!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
FALSE
;
}
}
}
}
for
(
iatt
=
0
;
iatt
<
nvatts
;
iatt
++
)
{
...
...
@@ -6450,13 +6463,13 @@ int cdfInqContents(stream_t *streamptr)
{
streamptr
->
basetime
.
ncvarid
=
ncvarid
;
ltimevar
=
TRUE
;
if
(
CDI_Debug
)
if
(
CDI_Debug
)
fprintf
(
stderr
,
"timevar %s
\n
"
,
ncvars
[
ncvarid
].
name
);
}
else
{
if
(
CDI_Debug
)
fprintf
(
stderr
,
"skip timevar %s
\n
"
,
ncvars
[
ncvarid
].
name
);
fprintf
(
stderr
,
"skip
ped
timevar %s
\n
"
,
ncvars
[
ncvarid
].
name
);
}
}
...
...
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