Commit 8fc990d7 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

par_io/afterburner/ecautil/ecacore: replaced type used for streams by CdoStreamID typedef

parent 38ce1fa3
......@@ -28,6 +28,7 @@
#include "error.h"
#include "dmemory.h"
#include "process_int.h"
#define MaxLevel 1024
......@@ -65,8 +66,8 @@ struct Control
int Szip;
int istreamID;
int ostreamID;
int ostreamID2;
CdoStreamID ostreamID;
CdoStreamID ostreamID2;
int ivlistID;
int ovlistID;
int ovlistID2;
......
......@@ -49,7 +49,7 @@ eca1(const ECA_REQUEST_1 *request)
const int cmplen = DATE_LEN - cdoOperatorF2(operatorID);
const int istreamID = cdoStreamOpenRead(0);
CdoStreamID istreamID = cdoOpenRead(0);
const int ivlistID = cdoStreamInqVlist(istreamID);
const int ovlistID = vlistCreate();
......@@ -88,7 +88,7 @@ eca1(const ECA_REQUEST_1 *request)
taxisDefRtime(otaxisID, 0);
vlistDefTaxis(ovlistID, otaxisID);
const int ostreamID = cdoStreamOpenWrite(1);
CdoStreamID ostreamID = cdoOpenWrite(1);
cdoDefVlist(ostreamID, ovlistID);
const size_t gridsize = gridInqSize(gridID);
......@@ -312,8 +312,8 @@ eca2(const ECA_REQUEST_2 *request)
const int cmplen = DATE_LEN - cdoOperatorF2(operatorID);
const int istreamID1 = cdoStreamOpenRead(0);
const int istreamID2 = cdoStreamOpenRead(1);
CdoStreamID istreamID1 = cdoOpenRead(0);
CdoStreamID istreamID2 = cdoOpenRead(1);
const int ivlistID1 = cdoStreamInqVlist(istreamID1);
const int ivlistID2 = cdoStreamInqVlist(istreamID2);
......@@ -356,7 +356,7 @@ eca2(const ECA_REQUEST_2 *request)
taxisDefRtime(otaxisID, 0);
vlistDefTaxis(ovlistID, otaxisID);
const int ostreamID = cdoStreamOpenWrite(2);
CdoStreamID ostreamID = cdoOpenWrite(2);
cdoDefVlist(ostreamID, ovlistID);
const size_t gridsize = gridInqSize(gridID);
......@@ -588,8 +588,8 @@ eca3(const ECA_REQUEST_3 *request)
const int cmplen = DATE_LEN - cdoOperatorF2(operatorID);
const int istreamID1 = cdoStreamOpenRead(0);
const int istreamID2 = cdoStreamOpenRead(1);
CdoStreamID istreamID1 = cdoOpenRead(0);
CdoStreamID istreamID2 = cdoOpenRead(1);
const int ivlistID1 = cdoStreamInqVlist(istreamID1);
const int ivlistID2 = cdoStreamInqVlist(istreamID2);
......@@ -621,7 +621,7 @@ eca3(const ECA_REQUEST_3 *request)
taxisDefRtime(otaxisID, 0);
vlistDefTaxis(ovlistID, otaxisID);
const int ostreamID = cdoStreamOpenWrite(2);
CdoStreamID ostreamID = cdoOpenWrite(2);
cdoDefVlist(ostreamID, ovlistID);
const size_t gridsize = gridInqSize(gridID);
......@@ -757,8 +757,8 @@ eca4(const ECA_REQUEST_4 *request)
const int cmplen = DATE_LEN - cdoOperatorF2(operatorID);
const int istreamID1 = cdoStreamOpenRead(0);
const int istreamID2 = cdoStreamOpenRead(1);
CdoStreamID istreamID1 = cdoOpenRead(0);
CdoStreamID istreamID2 = cdoOpenRead(1);
const int ivlistID1 = cdoStreamInqVlist(istreamID1);
const int ivlistID2 = cdoStreamInqVlist(istreamID2);
......@@ -798,7 +798,7 @@ eca4(const ECA_REQUEST_4 *request)
taxisDefRtime(otaxisID, 0);
vlistDefTaxis(ovlistID, otaxisID);
const int ostreamID = cdoStreamOpenWrite(2);
CdoStreamID ostreamID = cdoOpenWrite(2);
cdoDefVlist(ostreamID, ovlistID);
bool lyvals = true;
......
......@@ -559,7 +559,7 @@ computeGsl(int nlevels, size_t gridsize, std::vector<double> &yvals, double miss
}
void
writeGslStream(int ostreamID, int otaxisID, int otsID, int ovarID1, int ovarID2, int ivlistID1, int first_var_id,
writeGslStream(CdoStreamID ostreamID, int otaxisID, int otsID, int ovarID1, int ovarID2, int ivlistID1, int first_var_id,
FieldVector &gslDuration, FieldVector &gslFirstDay, int64_t vdate, int vtime, int nlevels)
{
(void) ivlistID1;
......
......@@ -331,6 +331,6 @@ void adjustEndDate(int nlevels, size_t gridsize, std::vector<double> &yvals, dou
/*
* Write GSL related fields to an output stream
*/
void writeGslStream(int ostreamID, int otaxisID, int otsID, int ovarID1, int ovarID2, int ivlistID1, int first_var_id,
void writeGslStream(CdoStreamID ostreamID, int otaxisID, int otsID, int ovarID1, int ovarID2, int ivlistID1, int first_var_id,
FieldVector &gslDuration, FieldVector &gslFirstDay, int64_t vdate, int vtime, int nlevels);
#endif /*ECAUTIL_H_*/
......@@ -28,7 +28,7 @@
void *
readRecord(void *arg)
{
int streamID;
CdoStreamID streamID;
int *varID, *levelID;
size_t *nmiss;
double *array;
......@@ -50,7 +50,7 @@ readRecord(void *arg)
}
void
parReadRecord(int streamID, int *varID, int *levelID, double *array, size_t *nmiss, par_io_t *parIO)
parReadRecord(CdoStreamID streamID, int *varID, int *levelID, double *array, size_t *nmiss, par_io_t *parIO)
{
bool lpario = false;
int recID = 0, nrecs = 0;
......@@ -58,9 +58,7 @@ parReadRecord(int streamID, int *varID, int *levelID, double *array, size_t *nmi
pthread_t thrID = 0;
/* pthread_attr_t attr; */
int rval;
#endif
#ifdef HAVE_LIBPTHREAD
if (parIO)
{
lpario = true;
......
......@@ -29,7 +29,7 @@
struct read_arg_t
{
int streamID;
CdoStreamID streamID;
int *varID, *levelID;
size_t *nmiss;
double *array;
......@@ -49,6 +49,6 @@ struct par_io_t
#endif
};
void parReadRecord(int streamID, int *varID, int *levelID, double *array, size_t *nmiss, par_io_t *parIO);
void parReadRecord(CdoStreamID streamID, int *varID, int *levelID, double *array, size_t *nmiss, par_io_t *parIO);
#endif /* PAR_IO_H */
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