Skip to content
Snippets Groups Projects
Commit f9cdcf63 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Arith: bug fix for NVARS1 == NVARS2

parent 6a01da6d
No related branches found
No related tags found
No related merge requests found
2012-08-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Arith: bug fix for NVARS1 == NVARS2
This bug was introduced in CDO version 1.5.6.
2012-07-26 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Version 1.5.6.1 released
......
......@@ -47,6 +47,7 @@ void *Arith(void *argument)
int varID, levelID;
int varID2, levelID2;
int offset;
int lfill1, lfill2;
int ntsteps1, ntsteps2;
int vlistIDx1, vlistIDx2, vlistID1, vlistID2, vlistID3;
int taxisIDx1, taxisID1, taxisID2, taxisID3;
......@@ -94,7 +95,18 @@ void *Arith(void *argument)
if ( ntsteps1 == 0 ) ntsteps1 = 1;
if ( ntsteps2 == 0 ) ntsteps2 = 1;
if ( vlistNvars(vlistID1) != 1 && vlistNvars(vlistID2) == 1 )
if ( vlistNvars(vlistID1) == 1 && vlistNvars(vlistID2) == 1 )
{
lfill2 = vlistNrecs(vlistID1) != 1 && vlistNrecs(vlistID2) == 1;
lfill1 = vlistNrecs(vlistID1) == 1 && vlistNrecs(vlistID2) != 1;
}
else
{
lfill2 = vlistNvars(vlistID1) != 1 && vlistNvars(vlistID2) == 1;
lfill1 = vlistNvars(vlistID1) == 1 && vlistNvars(vlistID2) != 1;
}
if ( lfill2 )
{
nlevels2 = vlistCompareX(vlistID1, vlistID2, CMP_DIM);
......@@ -109,7 +121,7 @@ void *Arith(void *argument)
cdoPrint("Filling up stream2 >%s< by copying the first variable of each timestep.", cdoStreamName(1));
}
}
else if ( vlistNvars(vlistID1) == 1 && vlistNvars(vlistID2) != 1 )
else if ( lfill1 )
{
nlevels2 = vlistCompareX(vlistID2, vlistID1, CMP_DIM);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment