Commit 8e3bf567 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Reformat with clang-format.

parent febd16e8
......@@ -251,8 +251,7 @@ Adisit(void *process)
tis.missval = tho.missval;
int datatype = CDI_DATATYPE_FLT32;
if (vlistInqVarDatatype(vlistID1, thoID) == CDI_DATATYPE_FLT64
&& vlistInqVarDatatype(vlistID1, saoID) == CDI_DATATYPE_FLT64)
if (vlistInqVarDatatype(vlistID1, thoID) == CDI_DATATYPE_FLT64 && vlistInqVarDatatype(vlistID1, saoID) == CDI_DATATYPE_FLT64)
datatype = CDI_DATATYPE_FLT64;
int vlistID2 = vlistCreate();
......
......@@ -825,8 +825,8 @@ after_setLevel(struct Control *globs)
double level;
bool checkLevel = true;
int numplevelDefault; /* default pressure level */
long plevelDefault[] = { 100000, 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000,
20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000 };
long plevelDefault[]
= { 100000, 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000 };
int numhlevelDefault; /* default height level */
long hlevelDefault[] = { 0, 1000, 2000, 5000, 10000, 15000, 20000, 25000, 30000 };
......@@ -919,8 +919,7 @@ after_setLevel(struct Control *globs)
}
if (globs->Verbose && iVertID != -1)
for (l = 0; l < globs->NumLevelRequest; l++)
fprintf(stdout, " Level %2d = %13.4f\n", l + 1, globs->LevelRequest[l]);
for (l = 0; l < globs->NumLevelRequest; l++) fprintf(stdout, " Level %2d = %13.4f\n", l + 1, globs->LevelRequest[l]);
if (checkLevel)
{
......@@ -931,8 +930,7 @@ after_setLevel(struct Control *globs)
for (l = k + 1; l < globs->NumLevelRequest; l++)
if (removeLevel[l] == FALSE && IS_EQUAL(level, globs->LevelRequest[l]))
{
if (globs->Verbose)
fprintf(stdout, " Level %2d = %13.4f double request\n", l + 1, globs->LevelRequest[l]);
if (globs->Verbose) fprintf(stdout, " Level %2d = %13.4f double request\n", l + 1, globs->LevelRequest[l]);
removeLevel[l] = TRUE;
}
}
......@@ -1586,8 +1584,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
if (numlevel != (globs->nvct / 2 - 1))
Error("Number of hybrid levels %d does not match VCT levels %d",
numlevel, globs->nvct / 2 - 1);
Error("Number of hybrid levels %d does not match VCT levels %d", numlevel, globs->nvct / 2 - 1);
if (globs->Debug)
for (i = 0; i < globs->nvct / 2; i++)
......@@ -1664,8 +1661,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
vars[code].detected = TRUE;
if (globs->Debug)
fprintf(stderr, "Code %3d Levels = %3d LevelType = %3d GridType = %3d\n", code, numlevel, leveltype,
gridtype);
fprintf(stderr, "Code %3d Levels = %3d LevelType = %3d GridType = %3d\n", code, numlevel, leveltype, gridtype);
}
if (globs->Debug) Message("FieldDim = %d", FieldDim);
......@@ -1713,8 +1709,8 @@ after_postcntl(struct Control *globs, struct Variable *vars)
gridID = vars[code].igridID;
zaxisID = vars[code].izaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr, " Detected Code %3d grid %-8s size %5zu level %2d %-8s\n", code,
gridNamePtr(gridInqType(gridID)), gridInqSize(gridID), zaxisInqSize(zaxisID), zaxistypename);
fprintf(stderr, " Detected Code %3d grid %-8s size %5zu level %2d %-8s\n", code, gridNamePtr(gridInqType(gridID)),
gridInqSize(gridID), zaxisInqSize(zaxisID), zaxistypename);
}
if (globs->Debug) lprintf(stdout);
......@@ -1816,8 +1812,8 @@ after_postcntl(struct Control *globs, struct Variable *vars)
gridID = vars[code].ogridID;
zaxisID = vars[code].ozaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr, " Selected Code %3d grid %-8s size %5zu level %2d %-8s\n", code,
gridNamePtr(gridInqType(gridID)), gridInqSize(gridID), zaxisInqSize(zaxisID), zaxistypename);
fprintf(stderr, " Selected Code %3d grid %-8s size %5zu level %2d %-8s\n", code, gridNamePtr(gridInqType(gridID)),
gridInqSize(gridID), zaxisInqSize(zaxisID), zaxistypename);
}
}
......@@ -1925,8 +1921,7 @@ static void
after_printCodes(void)
{
int tableID = tableInq(-1, 128, "echam4");
int codes[]
= { 34, 35, 36, 131, 132, 135, 148, 149, 151, 156, 157, 259, 260, 261, 262, 263, 264, 268, 269, 270, 271, 275 };
int codes[] = { 34, 35, 36, 131, 132, 135, 148, 149, 151, 156, 157, 259, 260, 261, 262, 263, 264, 268, 269, 270, 271, 275 };
int ncodes = sizeof(codes) / sizeof(codes[0]);
......@@ -2145,9 +2140,8 @@ after_processing(struct Control *globs, struct Variable *vars)
else
filename++;
if (globs->Type >= 30 && globs->Type < 50
&& (vars[DIVERGENCE].selected || vars[VELOPOT].selected || vars[VORTICITY].selected || vars[STREAM].selected
|| globs->AnalysisData))
if (globs->Type >= 30 && globs->Type < 50 && (vars[DIVERGENCE].selected || vars[VELOPOT].selected || vars[VORTICITY].selected
|| vars[STREAM].selected || globs->AnalysisData))
{
/*
int newtype = 0;
......@@ -2159,8 +2153,8 @@ after_processing(struct Control *globs, struct Variable *vars)
if (globs->AnalysisData)
fprintf(stderr, "\n TYPE changed to %d (for analysis data)\n", globs->Type);
else
fprintf(stderr, "\n TYPE changed to %d (with code %d, %d, %d or %d)\n", globs->Type, DIVERGENCE, VELOPOT,
VORTICITY, STREAM);
fprintf(stderr, "\n TYPE changed to %d (with code %d, %d, %d or %d)\n", globs->Type, DIVERGENCE, VELOPOT, VORTICITY,
STREAM);
/*
if ( globs->Type == 30 ) newtype = 70;
if ( globs->Type == 40 ) newtype = 60;
......
......@@ -123,8 +123,7 @@ Arith(void *process)
else
{
filltype = FILL_VARTS;
cdoPrint("Filling up stream2 >%s< by copying the first variable of each timestep.",
cdoGetStreamName(1).c_str());
cdoPrint("Filling up stream2 >%s< by copying the first variable of each timestep.", cdoGetStreamName(1).c_str());
}
}
else if (lfill1)
......@@ -139,8 +138,7 @@ Arith(void *process)
else
{
filltype = FILL_VARTS;
cdoPrint("Filling up stream1 >%s< by copying the first variable of each timestep.",
cdoGetStreamName(0).c_str());
cdoPrint("Filling up stream1 >%s< by copying the first variable of each timestep.", cdoGetStreamName(0).c_str());
}
streamIDx1 = streamID2;
streamIDx2 = streamID1;
......@@ -154,8 +152,8 @@ Arith(void *process)
if (filltype == FILL_NONE) vlistCompare(vlistID1, vlistID2, CMP_ALL);
size_t nwpv = (vlistNumber(vlistIDx1) == CDI_COMP && vlistNumber(vlistIDx2) == CDI_COMP) ? 2 : 1;
if ( nwpv == 2 && opercplx == false ) cdoAbort("Fields with complex numbers are not supported by this operator!");
size_t gridsizemax = nwpv*vlistGridsizeMax(vlistIDx1);
if (nwpv == 2 && opercplx == false) cdoAbort("Fields with complex numbers are not supported by this operator!");
size_t gridsizemax = nwpv * vlistGridsizeMax(vlistIDx1);
field_init(&field1);
field_init(&field2);
......@@ -196,7 +194,7 @@ Arith(void *process)
varnmiss.resize(nvars);
for (varID = 0; varID < nvars; varID++)
{
size_t gridsize = nwpv*gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
size_t gridsize = nwpv * gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
int nlev = zaxisInqSize(vlistInqVarZaxis(vlistIDx2, varID));
vardata[varID].resize(nlev * gridsize);
varnmiss[varID].resize(nlev);
......@@ -276,14 +274,14 @@ Arith(void *process)
if (filltype == FILL_TS)
{
size_t gridsize = nwpv*gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
size_t gridsize = nwpv * gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
size_t offset = gridsize * levelID;
arrayCopy(gridsize, fieldx2->ptr, &vardata[varID][offset]);
varnmiss[varID][levelID] = fieldx2->nmiss;
}
else if (lstatus && (filltype == FILL_VAR || filltype == FILL_VARTS))
{
size_t gridsize = nwpv*gridInqSize(vlistInqVarGrid(vlistIDx2, 0));
size_t gridsize = nwpv * gridInqSize(vlistInqVarGrid(vlistIDx2, 0));
size_t offset = gridsize * levelID2;
arrayCopy(gridsize, fieldx2->ptr, &vardata2[offset]);
varnmiss2[levelID2] = fieldx2->nmiss;
......@@ -291,7 +289,7 @@ Arith(void *process)
}
else if (filltype == FILL_TS)
{
size_t gridsize = nwpv*gridInqSize(vlistInqVarGrid(vlistIDx2, varID2));
size_t gridsize = nwpv * gridInqSize(vlistInqVarGrid(vlistIDx2, varID2));
size_t offset = gridsize * levelID;
arrayCopy(gridsize, &vardata[varID][offset], fieldx2->ptr);
fieldx2->nmiss = varnmiss[varID][levelID];
......@@ -303,7 +301,7 @@ Arith(void *process)
if (filltype == FILL_VAR || filltype == FILL_VARTS)
{
levelID2 = (nlevels2 > 1) ? levelID : 0;
size_t gridsize = nwpv*gridInqSize(vlistInqVarGrid(vlistIDx2, 0));
size_t gridsize = nwpv * gridInqSize(vlistInqVarGrid(vlistIDx2, 0));
size_t offset = gridsize * levelID2;
arrayCopy(gridsize, &vardata2[offset], fieldx2->ptr);
fieldx2->nmiss = varnmiss2[levelID2];
......@@ -316,7 +314,7 @@ Arith(void *process)
fieldx2->missval = vlistInqVarMissval(vlistIDx2, varID2);
}
if ( nwpv == 2 )
if (nwpv == 2)
farfuncplx(&field1, field2, operfunc);
else
farfun(&field1, field2, operfunc);
......
......@@ -68,8 +68,8 @@ datatypestr(int datatype)
}
static void
print_stat(const char *sinfo, int memtype, int datatype, int filetype, off_t nvalues, double data_size,
double file_size, double tw)
print_stat(const char *sinfo, int memtype, int datatype, int filetype, off_t nvalues, double data_size, double file_size,
double tw)
{
nvalues /= 1000000;
data_size /= 1024. * 1024. * 1024.;
......
......@@ -26,8 +26,8 @@ const char *filetypestr(int filetype);
const char *datatypestr(int datatype);
static void
print_stat(const char *sinfo, int memtype, int datatype, int filetype, off_t nvalues, double data_size,
double file_size, double tw)
print_stat(const char *sinfo, int memtype, int datatype, int filetype, off_t nvalues, double data_size, double file_size,
double tw)
{
nvalues /= 1000000;
data_size /= 1024. * 1024. * 1024.;
......
This diff is collapsed.
......@@ -474,8 +474,7 @@ CMOR_lite(void *process)
var_t *var = &vars[varID];
if (var->convert == false) var->changeunits = false;
if (var->changeunits)
cdoConvertUnits(&var->ut_converter, &var->changeunits, (char *) &var->units, (char *) &var->units_old,
var->name);
cdoConvertUnits(&var->ut_converter, &var->changeunits, (char *) &var->units, (char *) &var->units_old, var->name);
}
int taxisID1 = vlistInqTaxis(vlistID1);
......
......@@ -331,8 +331,7 @@ Cloudlayer(void *process)
for (varID = 0; varID < nvars2; ++varID)
{
if (kmax[varID] != -1 && kmin[varID] != -1)
layer_cloud(aclcac, cloud[varID], kmax[varID], kmin[varID], gridsize);
if (kmax[varID] != -1 && kmin[varID] != -1) layer_cloud(aclcac, cloud[varID], kmax[varID], kmin[varID], gridsize);
}
for (varID = 0; varID < nvars2; ++varID)
......
......@@ -42,18 +42,18 @@ typedef struct
static int
cmpx(const void *a, const void *b)
{
const double x = ((const xyinfoType *)a)->x;
const double y = ((const xyinfoType *)b)->x;
const double x = ((const xyinfoType *) a)->x;
const double y = ((const xyinfoType *) b)->x;
return ((x > y) - (x < y)) * 2 + (x > y) - (x < y);
}
static int
cmpxy_lt(const void *a, const void *b)
{
const double x1 = ((const xyinfoType *)a)->x;
const double x2 = ((const xyinfoType *)b)->x;
const double y1 = ((const xyinfoType *)a)->y;
const double y2 = ((const xyinfoType *)b)->y;
const double x1 = ((const xyinfoType *) a)->x;
const double x2 = ((const xyinfoType *) b)->x;
const double y1 = ((const xyinfoType *) a)->y;
const double y2 = ((const xyinfoType *) b)->y;
int cmp = 0;
if (y1 < y2 || (!(fabs(y1 - y2) > 0) && x1 < x2))
......@@ -67,10 +67,10 @@ cmpxy_lt(const void *a, const void *b)
static int
cmpxy_gt(const void *a, const void *b)
{
const double x1 = ((const xyinfoType *)a)->x;
const double x2 = ((const xyinfoType *)b)->x;
const double y1 = ((const xyinfoType *)a)->y;
const double y2 = ((const xyinfoType *)b)->y;
const double x1 = ((const xyinfoType *) a)->x;
const double x2 = ((const xyinfoType *) b)->x;
const double y1 = ((const xyinfoType *) a)->y;
const double y2 = ((const xyinfoType *) b)->y;
int cmp = 0;
if (y1 > y2 || (!(fabs(y1 - y2) > 0) && x1 < x2))
......@@ -474,8 +474,7 @@ Collgrid(void *process)
for (int recID = 0; recID < nrecs0; recID++)
{
pstreamInqRecord(ef[0].streamID, &varID, &levelID);
if (cdoVerbose && tsID == 0)
printf(" tsID, recID, varID, levelID %d %d %d %d\n", tsID, recID, varID, levelID);
if (cdoVerbose && tsID == 0) printf(" tsID, recID, varID, levelID %d %d %d %d\n", tsID, recID, varID, levelID);
for (int fileID = 1; fileID < nfiles; fileID++)
{
......
......@@ -248,9 +248,9 @@ Comp(void *process)
if (operatorID == EQ)
{
for (size_t i = 0; i < gridsize; i++)
array3[i] = (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2)
? missval1
: IS_EQUAL(array1[i], array2[i]));
array3[i]
= (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: IS_EQUAL(array1[i], array2[i]));
}
else if (operatorID == NE)
{
......@@ -262,30 +262,26 @@ Comp(void *process)
else if (operatorID == LE)
{
for (size_t i = 0; i < gridsize; i++)
array3[i]
= (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] <= array2[i]);
array3[i] = (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] <= array2[i]);
}
else if (operatorID == LT)
{
for (size_t i = 0; i < gridsize; i++)
array3[i]
= (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] < array2[i]);
array3[i] = (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] < array2[i]);
}
else if (operatorID == GE)
{
for (size_t i = 0; i < gridsize; i++)
array3[i]
= (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] >= array2[i]);
array3[i] = (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] >= array2[i]);
}
else if (operatorID == GT)
{
for (size_t i = 0; i < gridsize; i++)
array3[i]
= (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] > array2[i]);
array3[i] = (DBL_IS_EQUAL(array1[i], missval1) || DBL_IS_EQUAL(array2[i], missval2) ? missval1
: array1[i] > array2[i]);
}
else
{
......
......@@ -31,7 +31,7 @@ Complextorect(void *process)
cdoInitialize(process);
int COMPLEXTORECT = cdoOperatorAdd("complextorect", 0, 0, NULL);
int COMPLEXTOPOL = cdoOperatorAdd("complextopol", 0, 0, NULL);
int COMPLEXTOPOL = cdoOperatorAdd("complextopol", 0, 0, NULL);
int operatorID = cdoOperatorID();
......@@ -93,7 +93,7 @@ Complextorect(void *process)
double missval1 = vlistInqVarMissval(vlistID1, varID);
double missval2 = missval1;
if ( operatorID == COMPLEXTORECT )
if (operatorID == COMPLEXTORECT)
{
for (size_t i = 0; i < gridsize; ++i)
{
......@@ -101,12 +101,14 @@ Complextorect(void *process)
array3[i] = array1[2 * i + 1];
}
}
else if ( operatorID == COMPLEXTOPOL )
else if (operatorID == COMPLEXTOPOL)
{
for (size_t i = 0; i < gridsize; ++i)
{
array2[i] = SQRTMN(ADDMN(MULMN(array1[2 * i], array1[2 * i]), MULMN(array1[2 * i + 1], array1[2 * i + 1])));
array3[i] = (DBL_IS_EQUAL(array1[2 * i], missval1) || DBL_IS_EQUAL(array1[2 * i + 1], missval1)) ? missval1 : atan2 (array1[2 * i + 1], array1[2 * i]);
array3[i] = (DBL_IS_EQUAL(array1[2 * i], missval1) || DBL_IS_EQUAL(array1[2 * i + 1], missval1))
? missval1
: atan2(array1[2 * i + 1], array1[2 * i]);
}
}
......
......@@ -92,8 +92,7 @@ Cond2(void *process)
std::vector<double> array3(gridsize);
std::vector<double> array4(gridsize);
if (cdoVerbose)
cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d", ntsteps1, ntsteps2, vlistNtsteps(vlistID3));
if (cdoVerbose) cdoPrint("Number of timesteps: file1 %d, file2 %d, file3 %d", ntsteps1, ntsteps2, vlistNtsteps(vlistID3));
if (filltype == FILL_NONE)
{
......@@ -168,8 +167,7 @@ Cond2(void *process)
if (recID == 0 || filltype != FILL_REC) missval1 = vlistInqVarMissval(vlistID1, varID);
for (size_t i = 0; i < gridsize; i++)
array4[i]
= DBL_IS_EQUAL(array1[i], missval1) ? missval2 : !DBL_IS_EQUAL(array1[i], 0.) ? array2[i] : array3[i];
array4[i] = DBL_IS_EQUAL(array1[i], missval1) ? missval2 : !DBL_IS_EQUAL(array1[i], 0.) ? array2[i] : array3[i];
nmiss = arrayNumMV(gridsize, &array4[0], missval2);
pstreamDefRecord(streamID4, varID, levelID);
......
......@@ -253,8 +253,7 @@ Derivepar(void *process)
if (geopotID == -1)
cdoWarning("%s not found - set to zero!", var_stdname(surface_geopotential));
else
cdoPrint("%s not found - using bottom layer of %s!", var_stdname(surface_geopotential),
var_stdname(geopotential));
cdoPrint("%s not found - using bottom layer of %s!", var_stdname(surface_geopotential), var_stdname(geopotential));
arrayFill(gridsize, sgeopot, 0.0);
}
......@@ -348,13 +347,11 @@ Derivepar(void *process)
{
/* check range of ps_prog */
arrayMinMaxMask(gridsize, ps, NULL, &minval, &maxval);
if (minval < MIN_PS || maxval > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", minval, maxval);
if (minval < MIN_PS || maxval > MAX_PS) cdoWarning("Surface pressure out of range (min=%g max=%g)!", minval, maxval);
/* check range of surface geopot */
arrayMinMaxMask(gridsize, sgeopot, NULL, &minval, &maxval);
if (minval < MIN_FIS || maxval > MAX_FIS)
cdoWarning("Orography out of range (min=%g max=%g)!", minval, maxval);
if (minval < MIN_FIS || maxval > MAX_FIS) cdoWarning("Orography out of range (min=%g max=%g)!", minval, maxval);
}
varID = tempID;
......
......@@ -70,7 +70,7 @@ Diff(void *process)
std::vector<double> array1(gridsizemax);
std::vector<double> array2(gridsizemax);
std::vector<double> work(vlistNumber(vlistID1) != CDI_REAL ? 2*gridsizemax : 0) ;
std::vector<double> work(vlistNumber(vlistID1) != CDI_REAL ? 2 * gridsizemax : 0);
int indg = 0;
int tsID = 0;
......@@ -108,18 +108,18 @@ Diff(void *process)
cdiParamToString(param, paramstr, sizeof(paramstr));
if ( vlistInqVarNumber(vlistID1, varID1) == CDI_COMP)
if (vlistInqVarNumber(vlistID1, varID1) == CDI_COMP)
{
pstreamReadRecord(streamID1, work.data(), &nmiss1);
for (size_t i = 0; i < gridsize; ++i) array1[i] = work[i*2];
for (size_t i = 0; i < gridsize; ++i) array1[i] = work[i * 2];
}
else
pstreamReadRecord(streamID1, array1.data(), &nmiss1);
if ( vlistInqVarNumber(vlistID1, varID1) == CDI_COMP)
if (vlistInqVarNumber(vlistID1, varID1) == CDI_COMP)
{
pstreamReadRecord(streamID1, work.data(), &nmiss2);
for (size_t i = 0; i < gridsize; ++i) array2[i] = work[i*2];
for (size_t i = 0; i < gridsize; ++i) array2[i] = work[i * 2];
}
else
pstreamReadRecord(streamID2, array2.data(), &nmiss2);
......@@ -133,8 +133,7 @@ Diff(void *process)
for (size_t i = 0; i < gridsize; i++)
{
if ((DBL_IS_NAN(array1[i]) && !DBL_IS_NAN(array2[i]))
|| (!DBL_IS_NAN(array1[i]) && DBL_IS_NAN(array2[i])))
if ((DBL_IS_NAN(array1[i]) && !DBL_IS_NAN(array2[i])) || (!DBL_IS_NAN(array1[i]) && DBL_IS_NAN(array2[i])))
{
ndiff++;
relm = 1.0;
......@@ -241,8 +240,7 @@ Diff(void *process)
reset_text_color(stdout);
fprintf(stdout, "\n");
if (ndrec != nd2rec && abslim < abslim2)
fprintf(stdout, " %d of %d records differ more than 0.001\n", nd2rec, ngrec);
if (ndrec != nd2rec && abslim < abslim2) fprintf(stdout, " %d of %d records differ more than 0.001\n", nd2rec, ngrec);
// fprintf(stdout, " %d of %d records differ more then one thousandth\n", nprec, ngrec);
}
......
......@@ -288,8 +288,7 @@ Distgrid(void *process)
for (int i = 0; i < ngrids; i++)
{
gridID1 = vlistGrid(vlistID1, i);
genGrids(gridID1, &grids[i].gridIDs[0], xinc, yinc, nxblocks, nyblocks, grids[i].gridindex, grids[i].gridsize,
nsplit);
genGrids(gridID1, &grids[i].gridIDs[0], xinc, yinc, nxblocks, nyblocks, grids[i].gridindex, grids[i].gridsize, nsplit);
/*
if ( cdoVerbose )
for ( size_t index = 0; index < nsplit; index++ )
......
......@@ -44,8 +44,8 @@
// NO MISSING VALUE SUPPORT ADDED SO FAR
static void
scale_eigvec_grid(double *restrict out, int tsID, size_t npack, const size_t *restrict pack,
const double *restrict weight, double **covar, double sum_w)
scale_eigvec_grid(double *restrict out, int tsID, size_t npack, const size_t *restrict pack, const double *restrict weight,
double **covar, double sum_w)
{
for (size_t i = 0; i < npack; ++i) out[pack[i]] = covar[tsID][i] / sqrt(weight[pack[i]] / sum_w);
}
......@@ -304,8 +304,7 @@ EOFs(void *process)
}
if (cdoVerbose)
cdoPrint("Calculating %d eigenvectors and %zu eigenvalues in %s", n_eig, n,
grid_space == 1 ? "grid_space" : "time_space");
cdoPrint("Calculating %d eigenvectors and %zu eigenvalues in %s", n_eig, n, grid_space == 1 ? "grid_space" : "time_space");
double *weight = (double *) Malloc(gridsize * sizeof(double));
for (size_t i = 0; i < gridsize; ++i) weight[i] = 1.;
......@@ -371,8 +370,7 @@ EOFs(void *process)
npack = 0;
for (size_t i = 0; i < gridsize; ++i)
{
if (!DBL_IS_EQUAL(weight[i], 0.0) && !DBL_IS_EQUAL(weight[i], missval)
&& !DBL_IS_EQUAL(in[i], missval))
if (!DBL_IS_EQUAL(weight[i], 0.0) && !DBL_IS_EQUAL(weight[i], missval) && !DBL_IS_EQUAL(in[i], missval))
{
pack[npack] = i;
npack++;
......@@ -419,8 +417,7 @@ EOFs(void *process)
#pragma omp parallel for default(shared)
#endif
for (size_t ipack = 0; ipack < npack; ++ipack)
for (size_t jpack = ipack; jpack < npack; ++jpack)
covar[ipack][jpack] += in[pack[ipack]] * in[pack[jpack]];
for (size_t jpack = ipack; jpack < npack; ++jpack) covar[ipack][jpack] += in[pack[ipack]] * in[pack[jpack]];
}
else if (time_space)
{
......
......@@ -978,8 +978,7 @@ import_e5res(const char *filename, VAR **vars, ATTS *atts)
if (nvdims == 4)
{
if (dimidsp[0] == nhgl_dimid && dimidsp[1] == nmp1_dimid && dimidsp[2] == complex_dimid
&& dimidsp[3] == lev_dimid)
if (dimidsp[0] == nhgl_dimid && dimidsp[1] == nmp1_dimid && dimidsp[2] == complex_dimid && dimidsp[3] == lev_dimid)
{
read_fc4d(nc_file_id, name, &(*vars)[varid], gridIDfc, zaxisIDml, nhgl, nmp1);
varid++;
......@@ -1514,8 +1513,7 @@ Echam5ini(void *process)
int operatorID = cdoOperatorID();
int operfunc = cdoOperatorF1(operatorID);
if (operatorID == EXPORT_E5ML && processSelf().m_ID != 0)
cdoAbort("This operator can't be linked with other operators!");
if (operatorID == EXPORT_E5ML && processSelf().m_ID != 0) cdoAbort("This operator can't be linked with other operators!");
if (operfunc == func_read)
{
......@@ -1554,8 +1552,7 @@ Echam5ini(void *process)
for (iatt = 0; iatt < atts.natxt; ++iatt)
{
/* printf("%s: %s\n", atts.atxtname[iatt], atts.atxtentry[iatt]); */
cdiDefAttTxt(vlistID2, CDI_GLOBAL, atts.atxtname[iatt], (int) strlen(atts.atxtentry[iatt]) + 1,
atts.atxtentry[iatt]);
cdiDefAttTxt(vlistID2, CDI_GLOBAL, atts.atxtname[iatt], (int) strlen(atts.atxtentry[iatt]) + 1, atts.atxtentry[iatt]);
}
taxisID = taxisCreate(TAXIS_ABSOLUTE);
......
......@@ -419,9 +419,8 @@ Ensstat3(void *process)
roc[binID][TPR] = tpr;
roc[binID][FPR] = fpr;
fprintf(stderr, "%3i %10.4g: %6i %6i %6i %6i: %10.4g %10.4g\n", binID,
binID < nbins ? lThresh[binID] : 1, ctg_tab[binID][0], ctg_tab[binID][1],
ctg_tab[binID][2], ctg_tab[binID][3], tpr, fpr);
fprintf(stderr, "%3i %10.4g: %6i %6i %6i %6i: %10.4g %10.4g\n", binID, binID < nbins ? lThresh[binID] : 1,
ctg_tab[binID][0], ctg_tab[binID][1], ctg_tab[binID][2], ctg_tab[binID][3], tpr, fpr);
}
fprintf(stderr, "nbins %10i\n", nbins);
fprintf(stderr, "#ROC CurveArea: %10.6f\n", roc_curve_integrate((const double **) roc, nbins));
......@@ -468,8 +467,8 @@ Ensstat3(void *process)
int sum = ctg_tab[i][TP] + ctg_tab[i][TN] + ctg_tab[i][FP] + ctg_tab[i][FN];
fprintf(stdout, "%3i %10.4g: %6i %6i %6i %6i (%6i): %10.4g %10.4g\n", i, i < nbins ? lThresh[i] : 1,
ctg_tab[i][0], ctg_tab[i][1], ctg_tab[i][2], ctg_tab[i][3], sum, tpr, fpr);
fprintf(stdout, "%3i %10.4g: %6i %6i %6i %6i (%6i): %10.4g %10.4g\n", i, i < nbins ? lThresh[i] : 1, ctg_tab[i][0],
ctg_tab[i][1], ctg_tab[i][2], ctg_tab[i][3], sum, tpr, fpr);
}
fprintf(stdout, "#ROC CurveArea: %10.6f\n", roc_curve_integrate((const double **) roc, nbins));
......
......@@ -514,8 +514,7 @@ Ensval(void *process)
}