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
927e3a04
Commit
927e3a04
authored
Jan 03, 2011
by
Uwe Schulzweida
Browse files
check status of grbScanTimestep1
parent
164cae77
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/stream_cgribex.c
View file @
927e3a04
...
...
@@ -573,7 +573,7 @@ void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
}
void
cgribexScanTimestep1
(
int
streamID
)
int
cgribexScanTimestep1
(
int
streamID
)
{
int
*
isec0
,
*
isec1
,
*
isec2
,
*
isec3
,
*
isec4
;
double
fsec2
[
512
],
fsec3
[
2
],
*
fsec4
=
NULL
;
...
...
@@ -765,6 +765,8 @@ void cgribexScanTimestep1(int streamID)
streamptr
->
rtsteps
=
1
;
if
(
nrecs
==
0
)
return
(
CDI_EUFSTRUCT
);
cdiGenVars
(
streamID
);
if
(
fcast
)
...
...
@@ -825,6 +827,8 @@ void cgribexScanTimestep1(int streamID)
}
}
}
return
(
0
);
}
...
...
src/stream_cgribex.h
View file @
927e3a04
#ifndef _STREAM_CGRIBEX_H
#define _STREAM_CGRIBEX_H
void
cgribexScanTimestep1
(
int
streamID
);
int
cgribexScanTimestep1
(
int
streamID
);
int
cgribexScanTimestep2
(
int
streamID
);
int
cgribexScanTimestep
(
int
streamID
);
...
...
src/stream_grb.c
View file @
927e3a04
...
...
@@ -129,8 +129,9 @@ int grbReadRecord(int streamID, double *data, int *nmiss)
}
static
void
grbScanTimestep1
(
int
streamID
)
int
grbScanTimestep1
(
int
streamID
)
{
int
status
;
int
filetype
;
stream_t
*
streamptr
;
...
...
@@ -139,12 +140,14 @@ void grbScanTimestep1(int streamID)
if
(
filetype
==
FILETYPE_GRB
)
{
cgribexScanTimestep1
(
streamID
);
status
=
cgribexScanTimestep1
(
streamID
);
}
else
{
gribapiScanTimestep1
(
streamID
);
status
=
gribapiScanTimestep1
(
streamID
);
}
return
(
status
);
}
static
...
...
@@ -206,9 +209,9 @@ int grbInqContents(int streamID)
streamptr
->
curTsID
=
0
;
grbScanTimestep1
(
streamID
);
status
=
grbScanTimestep1
(
streamID
);
if
(
streamptr
->
ntsteps
==
-
1
)
status
=
grbScanTimestep2
(
streamID
);
if
(
status
==
0
&&
streamptr
->
ntsteps
==
-
1
)
status
=
grbScanTimestep2
(
streamID
);
fileSetPos
(
fileID
,
0
,
SEEK_SET
);
...
...
src/stream_gribapi.c
View file @
927e3a04
...
...
@@ -690,7 +690,7 @@ void gribapiAddRecord(int streamID, int param, grib_handle *gh,
}
#endif
void
gribapiScanTimestep1
(
int
streamID
)
int
gribapiScanTimestep1
(
int
streamID
)
{
#if defined (HAVE_LIBGRIB_API)
off_t
recpos
=
0
;
...
...
@@ -944,6 +944,8 @@ void gribapiScanTimestep1(int streamID)
streamptr
->
rtsteps
=
1
;
if
(
nrecs
==
0
)
return
(
CDI_EUFSTRUCT
);
cdiGenVars
(
streamID
);
if
(
fcast
)
...
...
@@ -1006,6 +1008,8 @@ void gribapiScanTimestep1(int streamID)
#else
Error
(
"GRIB_API support not compiled in!"
);
#endif
return
(
0
);
}
...
...
src/stream_gribapi.h
View file @
927e3a04
#ifndef _STREAM_GRIBAPI_H
#define _STREAM_GRIBAPI_H
void
gribapiScanTimestep1
(
int
streamID
);
int
gribapiScanTimestep1
(
int
streamID
);
int
gribapiScanTimestep2
(
int
streamID
);
int
gribapiScanTimestep
(
int
streamID
);
...
...
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