Commit 97fae348 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cleanup call to vlistCompare

parent 4ba5aaf5
......@@ -120,7 +120,7 @@ void *Arith(void *argument)
}
if ( filltype == FILL_NONE )
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
gridsize = vlistGridsizeMax(vlistIDx1);
......@@ -209,7 +209,7 @@ void *Arith(void *argument)
vlistID2 = streamInqVlist(streamID2);
vlistIDx2 = vlistID2;
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
nrecs2 = streamInqTimestep(streamIDx2, tsID2);
if ( nrecs2 == 0 )
......
......@@ -68,7 +68,7 @@ void *Cat(void *argument)
vlistID2 = streamInqVlist(streamID2);
taxisID2 = vlistInqTaxis(vlistID2);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
tsID2 = vlistNtsteps(vlistID2);
if ( tsID2 == 0 ) tsID2 = 1; /* bug fix for time constant data only */
......@@ -112,7 +112,7 @@ void *Cat(void *argument)
}
else
{
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
}
tsID1 = 0;
......
......@@ -99,7 +99,7 @@ void *Comp(void *argument)
}
if ( filltype == FILL_NONE )
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
nospec(vlistID1);
nospec(vlistID2);
......
......@@ -75,7 +75,7 @@ void *Cond(void *argument)
}
if ( filltype == FILL_NONE )
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
nospec(vlistID1);
nospec(vlistID2);
......
......@@ -75,9 +75,9 @@ void *Cond2(void *argument)
}
if ( filltype == FILL_NONE )
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
vlistCompare(vlistID2, vlistID3, CMP_SFT);
vlistCompare(vlistID2, vlistID3, CMP_DIM);
nospec(vlistID1);
nospec(vlistID2);
......
......@@ -106,8 +106,7 @@ void *Copy(void *argument)
}
else
{
vlistCompare(vlistID1, vlistID2, CMP_SFT);
/* vlistCompare(vlistID1, vlistID2, CMP_HRD); */
vlistCompare(vlistID1, vlistID2, CMP_ALL);
}
tsID1 = 0;
......
......@@ -58,7 +58,6 @@ void *Ensstat3(void *argument)
int operfunc, datafunc;
int i,j;
int nvars,nbins, nrecs = 0, nrecs0, nmiss, nens, nfiles;;
int cmpflag;
int cum;
int chksum; // for check of histogram population
int levelID, varID, recID, tsID, binID = 0, ensID;
......@@ -154,14 +153,8 @@ void *Ensstat3(void *argument)
}
/* check for identical contents of all ensemble members */
nvars = vlistNvars(ef[0].vlistID);
if ( nvars == 1 )
cmpflag = CMP_NAME | CMP_GRIDSIZE | CMP_NLEVEL | CMP_GRID;
else // What is this supposed to do different? - is there missing a bracket?
cmpflag = CMP_NAME | CMP_GRIDSIZE | CMP_NLEVEL | CMP_GRID;
for ( fileID = 1; fileID < nfiles; fileID++ )
vlistCompare(ef[0].vlistID, ef[fileID].vlistID, cmpflag);
vlistCompare(ef[0].vlistID, ef[fileID].vlistID, CMP_ALL);
vlistID1 = ef[0].vlistID;
vlistID2 = vlistCreate();
......
......@@ -50,7 +50,6 @@ void *Ensval(void *argument)
int operfunc, datafunc;
int i,k;
int nvars,nrecs = 0, nrecs0, nmiss, nens, nfiles,nlevs,valcount, nostreams, ngrids;
int cmpflag;
int cum;
int levelID, varID, recID, tsID, binID, ensID;
int gridsize = 0;
......@@ -170,10 +169,8 @@ void *Ensval(void *argument)
if ( cdoVerbose )
cdoPrint("nvars %i\n",nvars);
cmpflag = CMP_NAME | CMP_GRIDSIZE | CMP_NLEVEL | CMP_GRID;
for ( fileID = 1; fileID < nfiles; fileID++ )
vlistCompare(ef[0].vlistID, ef[fileID].vlistID, cmpflag);
vlistCompare(ef[0].vlistID, ef[fileID].vlistID, CMP_ALL);
vlistID1 = ef[0].vlistID;
taxisID1 = vlistInqTaxis(vlistID1);
......
......@@ -104,7 +104,7 @@ void *Fldstat2(void *argument)
vlistID2 = streamInqVlist(streamID2);
vlistID3 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2 = vlistInqTaxis(vlistID2);
......
......@@ -115,8 +115,8 @@ void *Hi(void *argument)
taxisID2 = vlistInqTaxis(vlistID2);
taxisID3 = vlistInqTaxis(vlistID3);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID3, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
vlistCompare(vlistID1, vlistID3, CMP_DIM);
gridsize = vlistGridsizeMax(vlistID1);
......
......@@ -78,7 +78,7 @@ void *Mergetime(void *argument)
/* check that the contents is always the same */
for ( fileID = 1; fileID < nfiles; fileID++ )
vlistCompare(sf[0].vlistID, sf[fileID].vlistID, CMP_HRD);
vlistCompare(sf[0].vlistID, sf[fileID].vlistID, CMP_ALL);
/* read the first time step */
for ( fileID = 0; fileID < nfiles; fileID++ )
......
......@@ -65,7 +65,7 @@ void *Monarith(void *argument)
vlistID2 = streamInqVlist(streamID2);
vlistID3 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
gridsize = vlistGridsizeMax(vlistID1);
......
......@@ -77,8 +77,8 @@ void *Seaspctl(void *argument)
vlistID3 = streamInqVlist(streamID3);
vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_HRD);
vlistCompare(vlistID1, vlistID3, CMP_HRD);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
vlistCompare(vlistID1, vlistID3, CMP_ALL);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2 = vlistInqTaxis(vlistID2);
......
......@@ -683,8 +683,7 @@ void *Select(void *argument)
}
else
{
vlistCompare(vlistID0, vlistID1, CMP_SFT);
/* vlistCompare(vlistID1, vlistID2, CMP_HRD); */
vlistCompare(vlistID0, vlistID1, CMP_ALL);
}
tsID1 = 0;
......
......@@ -95,7 +95,7 @@ void *Sorttimestamp(void *argument)
}
else
{
vlistCompare(vlistID2, vlistID1, CMP_HRD);
vlistCompare(vlistID2, vlistID1, CMP_ALL);
}
nvars = vlistNvars(vlistID1);
......
......@@ -54,8 +54,8 @@ void *Subtrend(void *argument)
vlistID3 = streamInqVlist(streamID3);
vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID3, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_DIM);
vlistCompare(vlistID1, vlistID3, CMP_DIM);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID4 = taxisDuplicate(taxisID1);
......
......@@ -76,8 +76,8 @@ void timpctl(int operatorID)
vlistID3 = streamInqVlist(streamID3);
vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_HRD);
vlistCompare(vlistID1, vlistID3, CMP_HRD);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
vlistCompare(vlistID1, vlistID3, CMP_ALL);
if ( cdoOperatorF2(operatorID) == 16 ) vlistDefNtsteps(vlistID4, 1);
......
......@@ -83,8 +83,8 @@ void *Timselpctl(void *argument)
vlistID3 = streamInqVlist(streamID3);
vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_HRD);
vlistCompare(vlistID1, vlistID3, CMP_HRD);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
vlistCompare(vlistID1, vlistID3, CMP_ALL);
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2 = vlistInqTaxis(vlistID2);
......
......@@ -100,7 +100,7 @@ void *Timstat2(void *argument)
vlistID2 = streamInqVlist(streamID2);
vlistID3 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_SFT);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
nvars = vlistNvars(vlistID1);
nrecs = vlistNrecs(vlistID1);
......
......@@ -90,7 +90,7 @@ void *Timstat3(void *argument)
if ( is > 0 )
{
vlistID2 = streamInqVlist(streamID[is]);
vlistCompare(vlistID[0], vlistID2, CMP_SFT);
vlistCompare(vlistID[0], vlistID2, CMP_ALL);
}
}
......
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