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
7f808f09
Commit
7f808f09
authored
Jul 21, 2009
by
Uwe Schulzweida
Browse files
added support for netCDF timeseries without grid
parent
05a2cb89
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
7f808f09
2009-??-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.4.0
* change C compiler to ANSI C99
* change
d
C compiler to ANSI C99
* changed time format from hhmm to hhmmss
* changed encode/decode_time to seconds
* added support for netCDF timeseries without grid
* Version 1.4.0 released
2009-06-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/stream_cdf.c
View file @
7f808f09
...
...
@@ -2356,7 +2356,12 @@ void cdfDefGrid(int streamID, int gridID)
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_GENERIC
)
{
if
(
gridInqXsize
(
gridID
)
==
0
||
gridInqYsize
(
gridID
)
==
0
)
if
(
gridtype
==
GRID_GENERIC
&&
size
==
1
&&
gridInqXsize
(
gridID
)
==
0
&&
gridInqYsize
(
gridID
)
==
0
)
{
/* no grid information */
}
else
if
(
gridInqXsize
(
gridID
)
==
0
||
gridInqYsize
(
gridID
)
==
0
)
{
cdfDefGdim
(
streamID
,
gridID
);
}
...
...
@@ -4696,7 +4701,7 @@ int cdfInqContents(int streamID)
{
if
(
ncvars
[
ncvarid
].
isvar
==
TRUE
&&
ncvars
[
ncvarid
].
ncoordvars
)
{
ndims
=
ncvars
[
ncvarid
].
ndims
;
/*
ndims = ncvars[ncvarid].ndims;
*/
ndims
=
ncvars
[
ncvarid
].
ncoordvars
;
for
(
i
=
0
;
i
<
ndims
;
i
++
)
{
...
...
@@ -5063,9 +5068,19 @@ int cdfInqContents(int streamID)
if
(
grid
.
size
==
0
)
{
Warning
(
func
,
"Variable %s has unsupported grid, skipped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
if
(
ncvars
[
ncvarid
].
ndims
==
1
&&
ncvars
[
ncvarid
].
dimtype
[
0
]
==
T_AXIS
)
{
grid
.
type
=
GRID_GENERIC
;
grid
.
size
=
1
;
grid
.
xsize
=
0
;
grid
.
ysize
=
0
;
}
else
{
Warning
(
func
,
"Variable %s has unsupported grid, skipped!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
isvar
=
-
1
;
continue
;
}
}
if
(
ncvars
[
ncvarid
].
gmapid
>=
0
&&
ncvars
[
ncvarid
].
gridtype
!=
GRID_CURVILINEAR
)
...
...
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