Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
4cd16c88
Commit
4cd16c88
authored
Mar 05, 2008
by
Uwe Schulzweida
Browse files
cdfInqContents: bug fix for unsupported grids (dims > 2)
parent
8707ef89
Changes
2
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4cd16c88
2008-04-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2008-04-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfInqContents: bug fix for inconsistent curvilinear grid [report: Holger Goettel]
* cdfInqContents: bug fix for inconsistent curvilinear grid [report: Holger Goettel]
* cdfInqContents: bug fix for unsupported grids (dims > 2) [report: Wolfgang Langhans]
* cdfInqContents: check type of _FillValue
* cdfInqContents: check type of _FillValue
* gridCompare: compare grid.yinc only if set
* gridCompare: compare grid.yinc only if set
* vlist_att.find_att: allocate attribute only if size > 0
* vlist_att.find_att: allocate attribute only if size > 0
...
...
src/stream_cdf.c
View file @
4cd16c88
...
@@ -4266,6 +4266,16 @@ int cdfInqContents(int streamID)
...
@@ -4266,6 +4266,16 @@ int cdfInqContents(int streamID)
xvarid
=
UNDEFID
;
xvarid
=
UNDEFID
;
yvarid
=
UNDEFID
;
yvarid
=
UNDEFID
;
}
}
if
(
ncvars
[
xvarid
].
ndims
>
2
||
ncvars
[
yvarid
].
ndims
>
2
)
{
Warning
(
func
,
"Unsupported grid structure for variable %s (grid dims > 2)!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
xvarid
=
UNDEFID
;
ncvars
[
ncvarid
].
yvarid
=
UNDEFID
;
xvarid
=
UNDEFID
;
yvarid
=
UNDEFID
;
}
}
}
if
(
xvarid
!=
UNDEFID
)
if
(
xvarid
!=
UNDEFID
)
...
@@ -4283,6 +4293,7 @@ int cdfInqContents(int streamID)
...
@@ -4283,6 +4293,7 @@ int cdfInqContents(int streamID)
if
(
ncvars
[
xvarid
].
xtype
==
NC_FLOAT
)
grid
.
prec
=
DATATYPE_FLT32
;
if
(
ncvars
[
xvarid
].
xtype
==
NC_FLOAT
)
grid
.
prec
=
DATATYPE_FLT32
;
grid
.
xvals
=
(
double
*
)
malloc
(
size
*
sizeof
(
double
));
grid
.
xvals
=
(
double
*
)
malloc
(
size
*
sizeof
(
double
));
fprintf
(
stderr
,
">>>>> %d %d %d %s %s
\n
"
,
ncvarid
,
xvarid
,
size
,
ncvars
[
ncvarid
].
name
,
ncvars
[
xvarid
].
name
);
cdf_get_var_double
(
fileID
,
xvarid
,
grid
.
xvals
);
cdf_get_var_double
(
fileID
,
xvarid
,
grid
.
xvals
);
strcpy
(
grid
.
xname
,
ncvars
[
xvarid
].
name
);
strcpy
(
grid
.
xname
,
ncvars
[
xvarid
].
name
);
strcpy
(
grid
.
xlongname
,
ncvars
[
xvarid
].
longname
);
strcpy
(
grid
.
xlongname
,
ncvars
[
xvarid
].
longname
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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