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
d3e35563
Commit
d3e35563
authored
May 25, 2011
by
Uwe Schulzweida
Browse files
cdfInqContents: check type of coordinates attribute
parent
26eb0ae5
Changes
2
Show whitespace changes
Inline
Side-by-side
config/default
View file @
d3e35563
...
...
@@ -15,6 +15,8 @@ case "${HOSTNAME}" in
hama
*
)
./configure
--prefix
=
$HOME
/local
\
--enable-maintainer-mode
\
--enable-swig
\
--enable-python
\
--with-jasper
=
/opt/local
\
--with-grib_api
=
$HOME
/local/gribapi-1.9.8
\
--with-netcdf
=
/opt/local
\
...
...
src/stream_cdf.c
View file @
d3e35563
...
...
@@ -4350,8 +4350,6 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
cdfGetAttInt
(
fileID
,
ncvarid
,
attname
,
1
,
&
ncvars
[
ncvarid
].
truncation
);
}
else
if
(
strcmp
(
attname
,
"add_offset"
)
==
0
&&
atttype
!=
NC_CHAR
)
{
if
(
atttype
!=
NC_CHAR
)
{
cdfGetAttDouble
(
fileID
,
ncvarid
,
attname
,
1
,
&
ncvars
[
ncvarid
].
addoffset
);
/*
...
...
@@ -4361,10 +4359,7 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
*/
cdfSetVar
(
ncvars
,
ncvarid
,
TRUE
);
}
}
else
if
(
strcmp
(
attname
,
"scale_factor"
)
==
0
&&
atttype
!=
NC_CHAR
)
{
if
(
atttype
!=
NC_CHAR
)
{
cdfGetAttDouble
(
fileID
,
ncvarid
,
attname
,
1
,
&
ncvars
[
ncvarid
].
scalefactor
);
/*
...
...
@@ -4374,7 +4369,6 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
*/
cdfSetVar
(
ncvars
,
ncvarid
,
TRUE
);
}
}
else
if
(
strcmp
(
attname
,
"bounds"
)
==
0
&&
atttype
==
NC_CHAR
)
{
int
status
,
ncboundsid
;
...
...
@@ -4457,8 +4451,8 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
cdfSetVar(ncvars, ncvarid, TRUE);
}
*/
else
if
(
strcmp
(
attname
,
"associate"
)
==
0
||
strcmp
(
attname
,
"coordinates"
)
==
0
)
else
if
(
(
strcmp
(
attname
,
"associate"
)
==
0
||
strcmp
(
attname
,
"coordinates"
)
==
0
)
&&
atttype
==
NC_CHAR
)
{
int
status
;
char
*
pstring
,
*
varname
=
NULL
;
...
...
@@ -4529,19 +4523,14 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
ncdims
[
ncvars
[
ncvarid
].
dimids
[
0
]].
dimtype
=
Z_AXIS
;
}
}
else
if
(
strcmp
(
attname
,
"_FillValue"
)
==
0
||
strcmp
(
attname
,
"missing_value"
)
==
0
)
{
if
(
atttype
!=
NC_CHAR
)
else
if
(
(
strcmp
(
attname
,
"_FillValue"
)
==
0
||
strcmp
(
attname
,
"missing_value"
)
==
0
)
&&
atttype
!=
NC_CHAR
)
{
cdfGetAttDouble
(
fileID
,
ncvarid
,
attname
,
1
,
&
ncvars
[
ncvarid
].
missval
);
ncvars
[
ncvarid
].
defmiss
=
TRUE
;
/* cdfSetVar(ncvars, ncvarid, TRUE); */
}
}
else
if
(
strcmp
(
attname
,
"cdi"
)
==
0
)
{
if
(
atttype
==
NC_CHAR
)
else
if
(
strcmp
(
attname
,
"cdi"
)
==
0
&&
atttype
==
NC_CHAR
)
{
cdfGetAttText
(
fileID
,
ncvarid
,
attname
,
attstringlen
-
1
,
attstring
);
strtolower
(
attstring
);
...
...
@@ -4552,7 +4541,6 @@ void scanVarAttributes(int fileID, int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
cdfSetVar
(
ncvars
,
ncvarid
,
FALSE
);
}
}
}
else
if
(
strcmp
(
attname
,
"axis"
)
==
0
&&
atttype
==
NC_CHAR
)
{
cdfGetAttText
(
fileID
,
ncvarid
,
attname
,
attstringlen
-
1
,
attstring
);
...
...
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