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
0b5ac45d
Commit
0b5ac45d
authored
Feb 04, 2013
by
Uwe Schulzweida
Browse files
netCDF: added env IGNORE_VALID_RANGE to ignore the attribute valid_range
parent
02f20818
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
0b5ac45d
...
...
@@ -3,6 +3,10 @@
* Version 1.6.0 released
* using CGRIBEX library version 1.6.0
2013-02-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netCDF: added env IGNORE_VALID_RANGE to ignore the attribute valid_range
2013-01-31 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* stream_cgribex::cgribexGetGrid: add 360 to lastLon, if lastlon <firstLon [Bug #3189]
...
...
src/stream_cdf.c
View file @
0b5ac45d
...
...
@@ -4722,11 +4722,15 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
{
if
(
ncvars
[
ncvarid
].
lvalidrange
==
FALSE
)
{
cdfGetAttDouble
(
ncid
,
ncvarid
,
attname
,
2
,
ncvars
[
ncvarid
].
validrange
);
ncvars
[
ncvarid
].
lvalidrange
=
TRUE
;
if
(
((
int
)
ncvars
[
ncvarid
].
validrange
[
0
])
==
0
&&
((
int
)
ncvars
[
ncvarid
].
validrange
[
1
])
==
255
)
ncvars
[
ncvarid
].
lunsigned
=
TRUE
;
/* cdfSetVar(ncvars, ncvarid, TRUE); */
extern
int
cdiIgnoreValidRange
;
if
(
cdiIgnoreValidRange
==
FALSE
)
{
cdfGetAttDouble
(
ncid
,
ncvarid
,
attname
,
2
,
ncvars
[
ncvarid
].
validrange
);
ncvars
[
ncvarid
].
lvalidrange
=
TRUE
;
if
(
((
int
)
ncvars
[
ncvarid
].
validrange
[
0
])
==
0
&&
((
int
)
ncvars
[
ncvarid
].
validrange
[
1
])
==
255
)
ncvars
[
ncvarid
].
lunsigned
=
TRUE
;
/* cdfSetVar(ncvars, ncvarid, TRUE); */
}
}
}
else
if
(
strcmp
(
attname
,
"valid_min"
)
==
0
&&
attlen
==
1
)
...
...
src/stream_int.c
View file @
0b5ac45d
...
...
@@ -33,6 +33,7 @@ int cdiChunkType = CHUNK_GRID;
int
cdiSplitLtype105
=
CDI_UNDEFID
;
int
cdiIgnoreAttCoordinates
=
FALSE
;
int
cdiIgnoreValidRange
=
FALSE
;
int
cdiSkipRecords
=
0
;
int
cdiInventoryMode
=
1
;
...
...
@@ -207,6 +208,9 @@ void cdiInitialize(void)
envString
=
getenv
(
"IGNORE_ATT_COORDINATES"
);
if
(
envString
)
cdiIgnoreAttCoordinates
=
atoi
(
envString
);
envString
=
getenv
(
"IGNORE_VALID_RANGE"
);
if
(
envString
)
cdiIgnoreValidRange
=
atoi
(
envString
);
envString
=
getenv
(
"CDI_SKIP_RECORDS"
);
if
(
envString
)
{
...
...
@@ -268,7 +272,7 @@ char *strfiletype(int filetype)
if
(
filetype
>
0
&&
filetype
<
size
)
name
=
Filetypes
[
filetype
];
else
name
=
Filetypes
[
0
];
name
=
Filetypes
[
0
];
return
(
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