Commit 75dfa354 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

stream_cgribex: replaced streamID by streamptr

parent 102737d6
...@@ -351,7 +351,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i ...@@ -351,7 +351,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
} }
static static
void cgribexAddRecord(int streamID, int param, int *isec1, int *isec2, double *fsec2, double *fsec3, void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, double *fsec2, double *fsec3,
int *isec4, long recsize, off_t position, int datatype, int comptype, int lmv, int iret) int *isec4, long recsize, off_t position, int datatype, int comptype, int lmv, int iret)
{ {
int zaxistype; int zaxistype;
...@@ -365,9 +365,6 @@ void cgribexAddRecord(int streamID, int param, int *isec1, int *isec2, double *f ...@@ -365,9 +365,6 @@ void cgribexAddRecord(int streamID, int param, int *isec1, int *isec2, double *f
record_t *record; record_t *record;
grid_t grid; grid_t grid;
int vlistID; int vlistID;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
vlistID = streamptr->vlistID; vlistID = streamptr->vlistID;
tsID = streamptr->curTsID; tsID = streamptr->curTsID;
...@@ -515,7 +512,7 @@ void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2, ...@@ -515,7 +512,7 @@ void cgribexDecodeHeader(int *isec0, int *isec1, int *isec2, double *fsec2,
} }
#endif #endif
int cgribexScanTimestep1(int streamID) int cgribexScanTimestep1(stream_t * streamptr)
{ {
#if defined (HAVE_LIBCGRIBEX) #if defined (HAVE_LIBCGRIBEX)
int *isec0, *isec1, *isec2, *isec3, *isec4; int *isec0, *isec1, *isec2, *isec3, *isec4;
...@@ -544,14 +541,9 @@ int cgribexScanTimestep1(int streamID) ...@@ -544,14 +541,9 @@ int cgribexScanTimestep1(int streamID)
int comptype; int comptype;
long unzipsize; long unzipsize;
compvar_t compVar, compVar0; compvar_t compVar, compVar0;
stream_t *streamptr;
extern int cdiSkipRecords; extern int cdiSkipRecords;
int nskip = cdiSkipRecords; int nskip = cdiSkipRecords;
streamptr = stream_to_pointer(streamID);
stream_check_ptr(__func__, streamptr);
streamptr->curTsID = 0; streamptr->curTsID = 0;
isec0 = streamptr->record->sec0; isec0 = streamptr->record->sec0;
...@@ -702,7 +694,7 @@ int cgribexScanTimestep1(int streamID) ...@@ -702,7 +694,7 @@ int cgribexScanTimestep1(int streamID)
if ( CDI_Debug ) if ( CDI_Debug )
Message("%4d %8d %4d %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime); Message("%4d %8d %4d %8d %8d %6d", nrecs, (int)recpos, param, level1, vdate, vtime);
cgribexAddRecord(streamID, param, isec1, isec2, fsec2, fsec3, cgribexAddRecord(streamptr, param, isec1, isec2, fsec2, fsec3,
isec4, recsize, recpos, datatype, comptype, lmv, iret); isec4, recsize, recpos, datatype, comptype, lmv, iret);
} }
...@@ -778,7 +770,7 @@ int cgribexScanTimestep1(int streamID) ...@@ -778,7 +770,7 @@ int cgribexScanTimestep1(int streamID)
} }
int cgribexScanTimestep2(int streamID) int cgribexScanTimestep2(stream_t * streamptr)
{ {
int rstatus = 0; int rstatus = 0;
#if defined (HAVE_LIBCGRIBEX) #if defined (HAVE_LIBCGRIBEX)
...@@ -804,11 +796,6 @@ int cgribexScanTimestep2(int streamID) ...@@ -804,11 +796,6 @@ int cgribexScanTimestep2(int streamID)
int vlistID; int vlistID;
long unzipsize; long unzipsize;
compvar_t compVar, compVar0; compvar_t compVar, compVar0;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
stream_check_ptr(__func__, streamptr);
streamptr->curTsID = 1; streamptr->curTsID = 1;
...@@ -1055,7 +1042,7 @@ int cgribexScanTimestep2(int streamID) ...@@ -1055,7 +1042,7 @@ int cgribexScanTimestep2(int streamID)
} }
int cgribexScanTimestep(int streamID) int cgribexScanTimestep(stream_t * streamptr)
{ {
int rstatus = 0; int rstatus = 0;
#if defined (HAVE_LIBCGRIBEX) #if defined (HAVE_LIBCGRIBEX)
...@@ -1080,17 +1067,12 @@ int cgribexScanTimestep(int streamID) ...@@ -1080,17 +1067,12 @@ int cgribexScanTimestep(int streamID)
int rindex, nrecs = 0; int rindex, nrecs = 0;
long unzipsize; long unzipsize;
compvar_t compVar, compVar0; compvar_t compVar, compVar0;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
stream_check_ptr(__func__, streamptr);
vlistID = streamptr->vlistID; vlistID = streamptr->vlistID;
if ( CDI_Debug ) if ( CDI_Debug )
{ {
Message("streamID = %d", streamID); Message("streamptr = %p", streamptr);
Message("cts = %d", streamptr->curTsID); Message("cts = %d", streamptr->curTsID);
Message("rts = %d", streamptr->rtsteps); Message("rts = %d", streamptr->rtsteps);
Message("nts = %d", streamptr->ntsteps); Message("nts = %d", streamptr->ntsteps);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment