Commit e13d1f10 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

changed Tee operators to take a argument, this argument represents the 2nd...

changed Tee operators to take a argument, this argument represents the 2nd output (a file) and is opend/written with cdi calls
parent 18ae8d46
......@@ -36,7 +36,7 @@ Tee(void *process)
int taxisID1 = vlistInqTaxis(vlistID1);
int streamID2 = cdoStreamOpenWrite(cdoStreamName(1));
int streamID3 = cdoStreamOpenWrite(cdoStreamName(2));
int streamID3 = streamOpenWrite(operatorArgv()[0],cdoFiletype());
int vlistID2 = vlistDuplicate(vlistID1);
int vlistID3 = vlistDuplicate(vlistID1);
......@@ -48,7 +48,7 @@ Tee(void *process)
vlistDefTaxis(vlistID3, taxisID3);
cdoDefVlist(streamID2, vlistID2);
cdoDefVlist(streamID3, vlistID3);
streamDefVlist(streamID3, vlistID3);
size_t gridsizemax = vlistGridsizeMax(vlistID1);
std::vector<double> array(gridsizemax);
......@@ -60,7 +60,7 @@ Tee(void *process)
taxisCopyTimestep(taxisID3, taxisID1);
cdoDefTimestep(streamID2, tsID);
cdoDefTimestep(streamID3, tsID);
streamDefTimestep(streamID3, tsID);
for (int recID = 0; recID < nrecs; recID++)
{
......@@ -71,8 +71,8 @@ Tee(void *process)
cdoDefRecord(streamID2, varID, levelID);
cdoCopyRecord(streamID2, streamID1);
cdoDefRecord(streamID3, varID, levelID);
cdoCopyRecord(streamID3, streamID1);
streamDefRecord(streamID3, varID, levelID);
streamCopyRecord(streamID3, streamID1);
}
else
{
......@@ -82,8 +82,8 @@ Tee(void *process)
cdoDefRecord(streamID2, varID, levelID);
cdoWriteRecord(streamID2, array.data(), nmiss);
cdoDefRecord(streamID3, varID, levelID);
cdoWriteRecord(streamID3, array.data(), nmiss);
streamDefRecord(streamID3, varID, levelID);
streamWriteRecord(streamID3, array.data(), nmiss);
}
}
......@@ -92,7 +92,7 @@ Tee(void *process)
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID3);
streamClose(streamID3);
cdoFinish();
......
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