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
4ca964bd
Commit
4ca964bd
authored
Oct 25, 2010
by
Uwe Schulzweida
Browse files
Added env. CDI_SKIP_RECORDS to skip the first GRIB records
parent
414b20b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/stream_cgribex.c
View file @
4ca964bd
...
...
@@ -602,6 +602,8 @@ void cgribexScanTimestep1(int streamID)
long
unzipsize
;
compvar_t
compVar
,
compVar0
;
stream_t
*
streamptr
;
extern
int
cdiSkipRecords
;
int
nskip
=
cdiSkipRecords
;
streamptr
=
stream_to_pointer
(
streamID
);
...
...
@@ -623,6 +625,13 @@ void cgribexScanTimestep1(int streamID)
fileID
=
streamInqFileID
(
streamID
);
while
(
nskip
--
>
0
)
{
recsize
=
gribGetSize
(
fileID
);
recpos
=
fileGetPos
(
fileID
);
fileSetPos
(
fileID
,
recsize
,
SEEK_CUR
);
}
nrecs
=
0
;
while
(
TRUE
)
{
...
...
@@ -729,7 +738,7 @@ void cgribexScanTimestep1(int streamID)
{
if
(
taxis
->
numavg
&&
warn_numavg
&&
(
taxis
->
numavg
!=
ISEC1_AvgNum
)
)
{
Message
(
func
,
"Chang
e
numavg from %d to %d not
allow
ed!"
,
Warning
(
func
,
"Chang
ing
numavg from %d to %d not
support
ed!"
,
taxis
->
numavg
,
ISEC1_AvgNum
);
warn_numavg
=
FALSE
;
}
...
...
@@ -956,7 +965,7 @@ int cgribexScanTimestep2(int streamID)
(
taxis
->
numavg
!=
ISEC1_AvgNum
)
)
{
/*
Message
(func, "
c
hang
e
numavg from %d to %d not
allow
ed!",
Warning
(func, "
C
hang
ing
numavg from %d to %d not
support
ed!",
taxis->numavg, ISEC1_AvgNum);
*/
warn_numavg
=
FALSE
;
...
...
@@ -1236,7 +1245,7 @@ int cgribexScanTimestep(int streamID)
(
taxis
->
numavg
!=
ISEC1_AvgNum
)
)
{
/*
Message
(func, "Chang
e
numavg from %d to %d not
allow
ed!",
Warning
(func, "Chang
ing
numavg from %d to %d not
support
ed!",
streamptr->tsteps[tsID].taxis.numavg, ISEC1_AvgNum);
*/
warn_numavg
=
FALSE
;
...
...
src/stream_int.c
View file @
4ca964bd
...
...
@@ -27,6 +27,7 @@ int cdiNcMissingValue = CDI_UNDEFID;
int
cdiSplitLtype105
=
CDI_UNDEFID
;
int
cdiIgnoreAttCoordinates
=
FALSE
;
int
cdiSkipRecords
=
0
;
int
cdiInventoryMode
=
1
;
char
*
cdiPartabPath
=
NULL
;
...
...
@@ -151,6 +152,13 @@ void cdiInitialize(void)
envString
=
getenv
(
"IGNORE_ATT_COORDINATES"
);
if
(
envString
)
cdiIgnoreAttCoordinates
=
atoi
(
envString
);
envString
=
getenv
(
"CDI_SKIP_RECORDS"
);
if
(
envString
)
{
cdiSkipRecords
=
atoi
(
envString
);
cdiSkipRecords
=
cdiSkipRecords
>
0
?
cdiSkipRecords
:
0
;
}
envString
=
getenv
(
"GRIB_INVENTORY_MODE"
);
if
(
envString
)
{
...
...
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