Commit f6512687 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge of branch cdo-pio into trunk cdi

parent 46e0775d
......@@ -218,7 +218,6 @@ int extCopyRecord(int streamID2, int streamID1)
int extDefRecord(int streamID)
{
int fileID;
int gridID;
int header[4];
int status = 0;
......@@ -230,7 +229,6 @@ int extDefRecord(int streamID)
stream_check_ptr(__func__, streamptr);
fileID = streamInqFileID(streamID);
gridID = streamptr->record->gridID;
extp = streamptr->record->extp;
......@@ -498,7 +496,7 @@ int extScanTimestep2(int streamID)
int header[4];
int status;
int fileID;
int rxysize = 0;
// int rxysize = 0;
int param = 0;
int rcode = 0, rlevel = 0, vdate = 0, vtime = 0;
int tsID;
......@@ -565,7 +563,7 @@ int extScanTimestep2(int streamID)
vtime = 0;
rcode = header[1];
rlevel = header[2];
rxysize = header[3];
// rxysize = header[3];
param = cdiEncodeParam(rcode, 255, 255);
......@@ -687,7 +685,7 @@ int extScanTimestep(int streamID)
int status;
int fileID;
int tsID;
int rxysize = 0;
// int rxysize = 0;
int param = 0;
int rcode = 0, rlevel = 0, vdate = 0, vtime = 0;
long recsize = 0;
......@@ -750,7 +748,7 @@ int extScanTimestep(int streamID)
vtime = 0;
rcode = header[1];
rlevel = header[2];
rxysize = header[3];
// rxysize = header[3];
param = cdiEncodeParam(rcode, 255, 255);
......@@ -856,7 +854,6 @@ void extReadVarDP(int streamID, int varID, double *data, int *nmiss)
int tsid;
int recID;
int i;
int status;
double missval;
extrec_t *extp;
stream_t *streamptr;
......@@ -882,7 +879,7 @@ void extReadVarDP(int streamID, int varID, double *data, int *nmiss)
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = extRead(fileID, extp);
extRead(fileID, extp);
extInqHeader(extp, header);
extInqDataDP(extp, &data[levID*gridsize]);
}
......@@ -919,7 +916,6 @@ void extReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
int tsid;
int recID;
int i;
int status;
double missval;
extrec_t *extp;
stream_t *streamptr;
......@@ -944,7 +940,7 @@ void extReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = extRead(fileID, extp);
extRead(fileID, extp);
extInqHeader(extp, header);
extInqDataDP(extp, data);
......
......@@ -2885,3 +2885,12 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
return (nbytes);
}
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
......@@ -14,3 +14,12 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
int ljpeg, void *gribContainer);
#endif /* _STREAM_GRIBAPI_H */
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
......@@ -579,7 +579,7 @@ int iegCopyRecord(int streamID2, int streamID1)
int iegDefRecord(int streamID)
{
int status = 0;
int fileID, vlistID;
int vlistID;
int gridID;
int date, time;
int datatype;
......@@ -594,7 +594,6 @@ int iegDefRecord(int streamID)
stream_check_ptr(__func__, streamptr);
fileID = streamInqFileID(streamID);
vlistID = streamInqVlist(streamID);
iegp = streamptr->record->iegp;
byteorder = streamptr->byteorder;
......@@ -1376,7 +1375,6 @@ void iegReadVarDP(int streamID, int varID, double *data, int *nmiss)
int tsid;
int recID;
int i;
int status;
double missval;
iegrec_t *iegp;
stream_t *streamptr;
......@@ -1402,7 +1400,7 @@ void iegReadVarDP(int streamID, int varID, double *data, int *nmiss)
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = iegRead(fileID, iegp);
iegRead(fileID, iegp);
iegInqDataDP(iegp, &data[levID*gridsize]);
}
fileSetPos(fileID, currentfilepos, SEEK_SET);
......@@ -1425,7 +1423,6 @@ void iegReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
int tsid;
int recID;
int i;
int status;
double missval;
iegrec_t *iegp;
stream_t *streamptr;
......@@ -1450,7 +1447,7 @@ void iegReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = iegRead(fileID, iegp);
iegRead(fileID, iegp);
iegInqDataDP(iegp, data);
fileSetPos(fileID, currentfilepos, SEEK_SET);
......@@ -1536,11 +1533,11 @@ void iegWriteVarSliceDP(int streamID, int varID, int levID, const double *data)
int fileID;
int gridID;
int zaxisID;
double level;
/* double level; */
int datatype;
int tsID;
/* int tsID; */
int vlistID;
int param, date, time, datasize;
/* int param, date, time, datasize; */
iegrec_t *iegp;
stream_t *streamptr;
......@@ -1549,18 +1546,18 @@ void iegWriteVarSliceDP(int streamID, int varID, int levID, const double *data)
iegp = streamptr->record->iegp;
vlistID = streamInqVlist(streamID);
fileID = streamInqFileID(streamID);
tsID = streamptr->curTsID;
/* tsID = streamptr->curTsID; */
gridID = vlistInqVarGrid(vlistID, varID);
zaxisID = vlistInqVarZaxis(vlistID, varID);
level = zaxisInqLevel(zaxisID, levID);
/* level = zaxisInqLevel(zaxisID, levID); */
if ( CDI_Debug )
Message("gridID = %d zaxisID = %d", gridID, zaxisID);
param = vlistInqVarParam(vlistID, varID);
date = streamptr->tsteps[tsID].taxis.vdate;
time = streamptr->tsteps[tsID].taxis.vtime;
datasize = gridInqSize(gridID);
/* param = vlistInqVarParam(vlistID, varID); */
/* date = streamptr->tsteps[tsID].taxis.vdate; */
/* time = streamptr->tsteps[tsID].taxis.vtime; */
/* datasize = gridInqSize(gridID); */
datatype = vlistInqVarDatatype(vlistID, varID);
......
......@@ -196,7 +196,6 @@ int srvCopyRecord(int streamID2, int streamID1)
int srvDefRecord(int streamID)
{
int fileID;
int gridID;
int header[8];
int status = 0;
......@@ -210,7 +209,6 @@ int srvDefRecord(int streamID)
stream_check_ptr(__func__, streamptr);
fileID = streamInqFileID(streamID);
gridID = streamptr->record->gridID;
srvp = streamptr->record->srvp;
......@@ -689,7 +687,7 @@ int srvScanTimestep(int streamID)
int status;
int fileID;
int tsID;
int rxsize = 0, rysize = 0;
/* int rxsize = 0, rysize = 0; */
int param = 0;
int rcode = 0, rlevel = 0, vdate = 0, vtime = 0;
long recsize = 0;
......@@ -752,8 +750,8 @@ int srvScanTimestep(int streamID)
rlevel = header[1];
vdate = header[2];
vtime = header[3];
rxsize = header[4];
rysize = header[5];
/* rxsize = header[4]; */
/* rysize = header[5]; */
param = cdiEncodeParam(rcode, 255, 255);
......@@ -859,7 +857,6 @@ void srvReadVarDP(int streamID, int varID, double *data, int *nmiss)
int tsid;
int recID;
int i;
int status;
double missval;
srvrec_t *srvp;
stream_t *streamptr;
......@@ -885,7 +882,7 @@ void srvReadVarDP(int streamID, int varID, double *data, int *nmiss)
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = srvRead(fileID, srvp);
srvRead(fileID, srvp);
srvInqHeader(srvp, header);
srvInqDataDP(srvp, &data[levID*gridsize]);
}
......@@ -910,7 +907,6 @@ void srvReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
int tsid;
int recID;
int i;
int status;
double missval;
srvrec_t *srvp;
stream_t *streamptr;
......@@ -935,7 +931,7 @@ void srvReadVarSliceDP(int streamID, int varID, int levID, double *data, int *nm
recID = streamptr->vars[varID].level[levID];
recpos = streamptr->tsteps[tsid].records[recID].position;
fileSetPos(fileID, recpos, SEEK_SET);
status = srvRead(fileID, srvp);
srvRead(fileID, srvp);
srvInqHeader(srvp, header);
srvInqDataDP(srvp, data);
......
Supports Markdown
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