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
fd282195
Commit
fd282195
authored
Apr 27, 2011
by
Uwe Schulzweida
Browse files
netcdf: Skiped time dependent variables if number of time steps is zero
parent
0f265be2
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
fd282195
2011-04-27 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netcdf: Skiped time dependent variables if number of time steps is zero
2011-03-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CGRIBEX library version 1.5.0
...
...
src/stream_cdf.c
View file @
fd282195
...
...
@@ -658,7 +658,6 @@ void cdfDefVarDeflate(int ncid, int ncvarid, int deflate_level)
#endif
#if defined (HAVE_LIBNETCDF)
static
void
cdfDefVarSzip
(
int
ncid
,
int
ncvarid
)
{
...
...
@@ -5040,7 +5039,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
dimsize2
=
ncdims
[
dimid
].
len
;
if
(
dimsize1
*
dimsize2
!=
size
)
{
Warning
(
"Variable %s has unsupported array structure, skip
p
ed!"
,
Warning
(
"Variable %s has unsupported array structure, skiped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
...
...
@@ -5058,7 +5057,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
dimsize
=
ncdims
[
dimid
].
len
;
if
(
dimsize
!=
size
)
{
Warning
(
"Variable %s has unsupported array structure, skip
p
ed!"
,
Warning
(
"Variable %s has unsupported array structure, skiped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
...
...
@@ -5111,7 +5110,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
dimsize2
=
ncdims
[
dimid
].
len
;
if
(
dimsize1
*
dimsize2
!=
size
)
{
Warning
(
"Variable %s has unsupported array structure, skip
p
ed!"
,
Warning
(
"Variable %s has unsupported array structure, skiped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
...
...
@@ -5131,7 +5130,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
dimsize
=
ncdims
[
dimid
].
len
;
if
(
dimsize
!=
size
)
{
Warning
(
"Variable %s has unsupported array structure, skip
p
ed!"
,
Warning
(
"Variable %s has unsupported array structure, skiped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
...
...
@@ -5279,7 +5278,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
}
else
{
Warning
(
"Variable %s has unsupported grid, skip
p
ed!"
,
ncvars
[
ncvarid
].
name
);
Warning
(
"Variable %s has unsupported grid, skiped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
}
...
...
@@ -5728,8 +5727,8 @@ int cdfInqContents(int streamID)
streamptr
->
ntsteps
=
ntsteps
;
if
(
CDI_Debug
)
Message
(
"
t
ime dimid = %d"
,
streamptr
->
basetime
.
ncdimid
);
if
(
CDI_Debug
)
Message
(
"Number of timesteps = %d"
,
streamptr
->
ntsteps
);
if
(
CDI_Debug
)
Message
(
"
T
ime dimid = %d"
,
streamptr
->
basetime
.
ncdimid
);
/* read ncdims */
for
(
ncdimid
=
0
;
ncdimid
<
ndims
;
ncdimid
++
)
...
...
@@ -5867,7 +5866,7 @@ int cdfInqContents(int streamID)
if
(
ncvars
[
ncvarid
].
isvar
==
-
1
)
{
ncvars
[
ncvarid
].
isvar
=
0
;
Warning
(
"Variable %s has unknown type, skip
p
ed!"
,
ncvars
[
ncvarid
].
name
);
Warning
(
"Variable %s has unknown type, skiped!"
,
ncvars
[
ncvarid
].
name
);
continue
;
}
...
...
@@ -5888,9 +5887,19 @@ int cdfInqContents(int streamID)
if
(
cdfInqDatatype
(
ncvars
[
ncvarid
].
xtype
)
==
-
1
)
{
ncvars
[
ncvarid
].
isvar
=
0
;
Warning
(
"Variable %s has an unsupported data type, skip
p
ed!"
,
ncvars
[
ncvarid
].
name
);
Warning
(
"Variable %s has an unsupported data type, skiped!"
,
ncvars
[
ncvarid
].
name
);
continue
;
}
if
(
timedimid
!=
UNDEFID
&&
ntsteps
==
0
&&
ncvars
[
ncvarid
].
ndims
>
0
)
{
if
(
timedimid
==
ncvars
[
ncvarid
].
dimids
[
0
]
)
{
ncvars
[
ncvarid
].
isvar
=
0
;
Warning
(
"Number of time steps undefined, skiped variable %s!"
,
ncvars
[
ncvarid
].
name
);
continue
;
}
}
}
/* verify coordinate vars - first scan (dimname == varname) */
...
...
src/stream_cgribex.c
View file @
fd282195
...
...
@@ -667,7 +667,7 @@ int cgribexScanTimestep1(int streamID)
{
char
paramstr
[
32
];
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
}
...
...
@@ -967,7 +967,7 @@ int cgribexScanTimestep2(int streamID)
if
(
memcmp
(
&
datetime
,
&
datetime0
,
sizeof
(
DateTime
))
!=
0
)
break
;
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
else
...
...
@@ -1249,7 +1249,7 @@ int cgribexScanTimestep(int streamID)
if
(
memcmp
(
&
datetime
,
&
datetime0
,
sizeof
(
DateTime
))
!=
0
)
break
;
if
(
CDI_Debug
)
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
...
...
src/stream_gribapi.c
View file @
fd282195
...
...
@@ -946,7 +946,7 @@ int gribapiScanTimestep1(int streamID)
{
char
paramstr
[
32
];
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
}
...
...
@@ -1295,7 +1295,7 @@ int gribapiScanTimestep2(int streamID)
if
(
memcmp
(
&
datetime
,
&
datetime0
,
sizeof
(
DateTime
))
!=
0
)
break
;
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
else
...
...
@@ -1630,7 +1630,7 @@ int gribapiScanTimestep(int streamID)
if
(
memcmp
(
&
datetime
,
&
datetime0
,
sizeof
(
DateTime
))
!=
0
)
break
;
if
(
CDI_Debug
)
Warning
(
"Param=%s level=%d already exist, skip
p
ed!"
,
paramstr
,
level1
);
Warning
(
"Param=%s level=%d already exist, skiped!"
,
paramstr
,
level1
);
continue
;
}
...
...
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