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

replaced cdoWarning with Warning

parent edb6315e
......@@ -621,7 +621,7 @@ after_control(struct Control *globs, struct Variable *vars)
if (read_task == nullptr)
{
lparallelread = false;
cdoWarning("CDO tasks not available!");
Warning("CDO tasks not available!");
}
}
......
This diff is collapsed.
......@@ -93,33 +93,33 @@ cmor_check_eval(int vlistID, int nvars, std::vector<CmorVar> &vars)
vlistInqVarName(vlistID, varID, varname);
if (n_lower_min > 0)
cdoWarning("Invalid value(s) detected for variable '%s': %ld values were lower than minimum valid value (%.4g).",
Warning("Invalid value(s) detected for variable '%s': %ld values were lower than minimum valid value (%.4g).",
varname, n_lower_min, var.valid_min);
if (n_greater_max > 0)
cdoWarning("Invalid value(s) detected for variable '%s': %ld values were greater than maximum valid value (%.4g).",
Warning("Invalid value(s) detected for variable '%s': %ld values were greater than maximum valid value (%.4g).",
varname, n_greater_max, var.valid_max);
if (var.check_min_mean_abs)
{
if (amean < .1 * var.ok_min_mean_abs)
cdoWarning("Invalid Absolute Mean for variable '%s' (%.5g) is lower by more than an order of magnitude than "
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is lower by more than an order of magnitude than "
"minimum allowed: %.4g",
varname, amean, var.ok_min_mean_abs);
if (amean < var.ok_min_mean_abs)
cdoWarning("Invalid Absolute Mean for variable '%s' (%.5g) is lower than minimum allowed: %.4g", varname, amean,
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is lower than minimum allowed: %.4g", varname, amean,
var.ok_min_mean_abs);
}
if (var.check_max_mean_abs)
{
if (amean > 10. * var.ok_max_mean_abs)
cdoWarning("Invalid Absolute Mean for variable '%s' (%.5g) is greater by more than an order of magnitude than "
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is greater by more than an order of magnitude than "
"maximum allowed: %.4g",
varname, amean, var.ok_max_mean_abs);
if (amean > var.ok_max_mean_abs)
cdoWarning("Invalid Absolute Mean for variable '%s' (%.5g) is greater than maximum allowed: %.4g", varname, amean,
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is greater than maximum allowed: %.4g", varname, amean,
var.ok_max_mean_abs);
}
}
......@@ -499,7 +499,7 @@ CMOR_lite(void *process)
}
if (nerr)
{
cdoWarning("Udunits: Error converting units from [%s] to [%s], parameter: %s", var.units_old, var.units,
Warning("Udunits: Error converting units from [%s] to [%s], parameter: %s", var.units_old, var.units,
var.name);
var.changeunits = false;
}
......
......@@ -141,7 +141,7 @@ changeName(const int vlistID1, const int vlistID2, const int nch, char *chnames[
}
for (int i = 0; i < npairs; ++i)
if (!namefound[i]) cdoWarning("Variable name %s not found!", vpairs[i].first);
if (!namefound[i]) Warning("Variable name %s not found!", vpairs[i].first);
}
void *
......
......@@ -72,7 +72,7 @@ Change_e5slm(void *process)
double minval, maxval;
arrayMinMax(gridsize, cland.data(), minval, maxval);
if (minval < 0 || maxval > 1) cdoWarning("Values of SLM out of bounds! (minval=%g, maxval=%g)", minval, maxval);
if (minval < 0 || maxval > 1) Warning("Values of SLM out of bounds! (minval=%g, maxval=%g)", minval, maxval);
streamClose(streamIDslm);
......
......@@ -141,7 +141,7 @@ Deltime(void *process)
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
if (nfound == 0) cdoWarning("Day %d%s not found!", dday, cmons[dmon]);
if (nfound == 0) Warning("Day %d%s not found!", dday, cmons[dmon]);
vlistDestroy(vlistID2);
......
......@@ -220,7 +220,7 @@ Derivepar(void *process)
if (operatorID == GHEIGHT)
{
if (humID == -1)
cdoWarning("%s not found - using algorithm without %s!", var_stdname(specific_humidity), var_stdname(specific_humidity));
Warning("%s not found - using algorithm without %s!", var_stdname(specific_humidity), var_stdname(specific_humidity));
else
hum.resize(gridsize * nhlevf);
......@@ -240,7 +240,7 @@ Derivepar(void *process)
if (zaxisIDh != -1 && sgeopotID == -1)
{
if (geopotID == -1)
cdoWarning("%s not found - set to zero!", var_stdname(surface_geopotential));
Warning("%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));
......@@ -335,11 +335,11 @@ Derivepar(void *process)
{
// check range of ps_prog
arrayMinMax(gridsize, ps.data(), 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) Warning("Surface pressure out of range (min=%g max=%g)!", minval, maxval);
// check range of surface geopot
arrayMinMax(gridsize, sgeopot.data(), 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) Warning("Orography out of range (min=%g max=%g)!", minval, maxval);
}
varID = tempID;
......@@ -351,7 +351,7 @@ Derivepar(void *process)
arrayMinMax(gridsize, single2, minval, maxval);
if (minval < MIN_T || maxval > MAX_T)
cdoWarning("Input temperature at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
Warning("Input temperature at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
}
if (humID != -1)
......@@ -367,7 +367,7 @@ Derivepar(void *process)
arrayMinMax(gridsize, single2, minval, maxval);
if (minval < -0.1 || maxval > MAX_Q)
cdoWarning("Input humidity at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
Warning("Input humidity at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
}
}
......
......@@ -324,8 +324,8 @@ Diff(void *process)
// fprintf(stdout, " %d of %d records differ more then one thousandth\n", nprec, ngrec);
}
if (nrecs == 0 && nrecs2 > 0) cdoWarning("stream2 has more time steps than stream1!");
if (nrecs > 0 && nrecs2 == 0) cdoWarning("stream1 has more time steps than stream2!");
if (nrecs == 0 && nrecs2 > 0) Warning("stream2 has more time steps than stream1!");
if (nrecs > 0 && nrecs2 == 0) Warning("stream1 has more time steps than stream2!");
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
......
......@@ -116,9 +116,9 @@ get_eigenmode(void)
eigen_mode = JACOBI;
else
{
cdoWarning("Unknown environmental setting %s for CDO_SVD_MODE. Available options are", envstr);
cdoWarning(" - 'jacobi' for a one-sided parallelized jacobi algorithm");
cdoWarning(" - 'danielson_lanzcos' for the D/L algorithm");
Warning("Unknown environmental setting %s for CDO_SVD_MODE. Available options are", envstr);
Warning(" - 'jacobi' for a one-sided parallelized jacobi algorithm");
Warning(" - 'danielson_lanzcos' for the D/L algorithm");
}
}
......@@ -129,9 +129,9 @@ get_eigenmode(void)
#ifdef _OPENMP
if (omp_get_max_threads() > 1 && eigen_mode == DANIELSON_LANCZOS)
{
cdoWarning("Requested parallel computation with %i Threads ", omp_get_max_threads());
cdoWarning(" but environmental setting CDO_SVD_MODE causes sequential ");
cdoWarning(" Singular value decomposition");
Warning("Requested parallel computation with %i Threads ", omp_get_max_threads());
Warning(" but environmental setting CDO_SVD_MODE causes sequential ");
Warning(" Singular value decomposition");
}
#endif
......@@ -151,7 +151,7 @@ get_weightmode(void)
else if (!strncmp(envstr, "on", 2))
weight_mode = WEIGHT_ON;
else
cdoWarning("Unknown environmental setting %s for CDO_WEIGHT_MODE. Available options are: on/off", envstr);
Warning("Unknown environmental setting %s for CDO_WEIGHT_MODE. Available options are: on/off", envstr);
}
if (Options::cdoVerbose)
......@@ -272,10 +272,10 @@ EOFs(void *process)
{
if (n_eig > nts)
{
cdoWarning("Solving in time-space:");
cdoWarning("Number of eigen-functions to write out is bigger than number of time-steps.");
cdoWarning("Setting n_eig to %d.", nts);
cdoWarning("If You want to force a solution in grid-space use operator eofspatial");
Warning("Solving in time-space:");
Warning("Number of eigen-functions to write out is bigger than number of time-steps.");
Warning("Setting n_eig to %d.", nts);
Warning("If You want to force a solution in grid-space use operator eofspatial");
n_eig = nts;
}
n = nts;
......@@ -286,10 +286,10 @@ EOFs(void *process)
if ((size_t) n_eig > gridsize)
{
cdoWarning("Solving in spatial space");
cdoWarning("Number of eigen-functions to write out is bigger than grid size");
cdoWarning("Setting n_eig to %zu", gridsize);
cdoWarning("If You want to force a solution in time-space use operator eoftime");
Warning("Solving in spatial space");
Warning("Number of eigen-functions to write out is bigger than grid size");
Warning("Setting n_eig to %zu", gridsize);
Warning("If You want to force a solution in time-space use operator eoftime");
n_eig = gridsize;
}
n = gridsize;
......@@ -307,7 +307,7 @@ EOFs(void *process)
if (wstatus != 0)
{
weight_mode = WEIGHT_OFF;
cdoWarning("Using constant grid cell area weights!");
Warning("Using constant grid cell area weights!");
}
}
......
......@@ -1330,7 +1330,7 @@ EcaRx1day(void *process)
if ('m' == operatorArgv()[0][0])
cdoOperatorAdd("eca_rx1day", 0, 8, nullptr); /* monthly mode */
else
cdoWarning("Parameter value '%s' is invalid. The only valid value is "
Warning("Parameter value '%s' is invalid. The only valid value is "
"'m' indicating monthly mode. Operating in yearly mode now.",
operatorArgv()[0]);
}
......
......@@ -380,7 +380,7 @@ export_e5ml(const char *filename, VAR *vars, int nvars, int64_t vdate, int vtime
#if defined(NC_64BIT_OFFSET)
writemode = NC_CLOBBER | NC_64BIT_OFFSET;
#else
cdoWarning("Datasize > 2GB and NC_64BIT_OFFSET not available!");
Warning("Datasize > 2GB and NC_64BIT_OFFSET not available!");
#endif
}
......
......@@ -273,17 +273,17 @@ Ensstat(void *process)
if (nrecs == 0)
{
lwarning = true;
cdoWarning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(fileID));
Warning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(fileID));
}
else if (nrecs0 == 0)
{
lwarning = true;
cdoWarning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(0));
Warning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(0));
}
else
{
lerror = true;
cdoWarning("Inconsistent ensemble file, number of records at time step %d of %s and %s differ!", tsID + 1,
Warning("Inconsistent ensemble file, number of records at time step %d of %s and %s differ!", tsID + 1,
cdoGetStreamName(0), cdoGetStreamName(fileID));
}
goto CLEANUP;
......@@ -332,7 +332,7 @@ Ensstat(void *process)
CLEANUP:
if (lwarning) cdoWarning("Inconsistent ensemble, processed only the first %d timesteps!", tsID);
if (lwarning) Warning("Inconsistent ensemble, processed only the first %d timesteps!", tsID);
if (lerror) cdoAbort("Inconsistent ensemble, processed only the first %d timesteps!", tsID);
for (int fileID = 0; fileID < nfiles; fileID++) cdoStreamClose(ef[fileID].streamID);
......
......@@ -194,9 +194,9 @@ Ensstat3(void *process)
{
if (zaxisInqSize(vlistInqVarZaxis(vlistID1, varID)) > 1)
{
cdoWarning("More than one level not supported when processing ranked histograms.");
cdoWarning("Try to use `cdo splitlevel` to split the dataset into levels and apply");
cdoWarning("the operator seperately to each level.");
Warning("More than one level not supported when processing ranked histograms.");
Warning("Try to use `cdo splitlevel` to split the dataset into levels and apply");
Warning("the operator seperately to each level.");
cdoAbort("Exit due to unsupported file structure");
}
}
......
......@@ -126,9 +126,9 @@ EOF3d(void *process)
*/
if (n_eig > nts)
{
cdoWarning("Solving in time-space:");
cdoWarning("Number of eigen-functions to write out is bigger than number of time-steps.");
cdoWarning("Setting n_eig to %i.", nts);
Warning("Solving in time-space:");
Warning("Number of eigen-functions to write out is bigger than number of time-steps.");
Warning("Setting n_eig to %i.", nts);
n_eig = nts;
}
......@@ -199,7 +199,7 @@ EOF3d(void *process)
if (wstatus != 0)
{
weight_mode = WEIGHT_OFF;
cdoWarning("Using constant grid cell area weights!");
Warning("Using constant grid cell area weights!");
}
else
{
......@@ -238,8 +238,8 @@ EOF3d(void *process)
if (datacounts[varID][offset + i] != 0) cdoAbort("Missing values unsupported!");
if (!missval_warning)
{
// cdoWarning("Missing Value Support not checked for this Operator!");
// cdoWarning("Does not work with changing locations of missing values in time.");
// Warning("Missing Value Support not checked for this Operator!");
// Warning("Does not work with changing locations of missing values in time.");
missval_warning = true;
}
datafields[varID][tsID][i + offset] = 0;
......@@ -292,7 +292,7 @@ EOF3d(void *process)
{
char vname[64];
vlistInqVarName(vlistID1, varID, &vname[0]);
cdoWarning("Refusing to calculate EOF from a single time step for var%i (%s)", varID + 1, &vname[0]);
Warning("Refusing to calculate EOF from a single time step for var%i (%s)", varID + 1, &vname[0]);
continue;
}
......
......@@ -591,7 +591,7 @@ Expr(void *process)
if (ngp > 1)
{
int wstatus = gridWeights(gridID, data);
if (wstatus) cdoWarning("Grid cell bounds not available, using constant grid cell area weights!");
if (wstatus) Warning("Grid cell bounds not available, using constant grid cell area weights!");
}
}
}
......
......@@ -102,7 +102,7 @@ FC(void *process)
/* define output grid */
if (operatorID == FC2SP)
{
if (gridIDfc == -1) cdoWarning("No fourier data found!");
if (gridIDfc == -1) Warning("No fourier data found!");
gridID1 = gridIDfc;
......@@ -132,7 +132,7 @@ FC(void *process)
}
else if (operatorID == SP2FC)
{
if (gridIDsp == -1) cdoWarning("No spectral data found!");
if (gridIDsp == -1) Warning("No spectral data found!");
gridID1 = gridIDsp;
......@@ -161,7 +161,7 @@ FC(void *process)
}
else if (operatorID == GP2FC)
{
if (gridIDgp == -1) cdoWarning("No Gaussian grid data found!");
if (gridIDgp == -1) Warning("No Gaussian grid data found!");
gridID1 = gridIDgp;
......@@ -187,7 +187,7 @@ FC(void *process)
}
else if (operatorID == FC2GP)
{
if (gridIDfc == -1) cdoWarning("No fourier data found!");
if (gridIDfc == -1) Warning("No fourier data found!");
gridID1 = gridIDfc;
......
......@@ -230,12 +230,12 @@ Filter(void *process)
if (calendar != CALENDAR_360DAYS && calendar != CALENDAR_365DAYS && calendar != CALENDAR_366DAYS && incunit0 < 4
&& month == 2 && day == 29 && (day0 != day || month0 != month || year0 != year))
{
cdoWarning("Filtering of multi-year times series doesn't works properly with a standard calendar.");
cdoWarning(" Please delete the day %i-02-29 (cdo del29feb)", year);
Warning("Filtering of multi-year times series doesn't works properly with a standard calendar.");
Warning(" Please delete the day %i-02-29 (cdo del29feb)", year);
}
if (!(incperiod == incperiod0 && incunit == incunit0))
cdoWarning("Time increment in step %d (%lld%s) differs from step 1 (%lld%s)!", tsID, incperiod, tunits[incunit],
Warning("Time increment in step %d (%lld%s) differs from step 1 (%lld%s)!", tsID, incperiod, tunits[incunit],
incperiod0, tunits[incunit0]);
}
tsID++;
......
......@@ -118,7 +118,7 @@ Fldrms(void *process)
{
char varname[CDI_MAX_NAME];
vlistInqVarName(vlistID1, varID, varname);
cdoWarning("Grid cell bounds not available, using constant grid cell area weights for variable %s!", varname);
Warning("Grid cell bounds not available, using constant grid cell area weights for variable %s!", varname);
}
}
}
......
......@@ -221,13 +221,13 @@ Fldstat(void *process)
{
if (ngrids == 1)
{
cdoWarning("Grid cell bounds not available, using constant grid cell area weights!");
Warning("Grid cell bounds not available, using constant grid cell area weights!");
}
else
{
char varname[CDI_MAX_NAME];
vlistInqVarName(vlistID1, varID, varname);
cdoWarning("Grid cell bounds not available, using constant grid cell area weights for variable %s!",
Warning("Grid cell bounds not available, using constant grid cell area weights for variable %s!",
varname);
}
}
......
......@@ -143,7 +143,7 @@ Fldstat2(void *process)
if (nrecs2 == 0)
{
cdoWarning("Input streams have different number of time steps!");
Warning("Input streams have different number of time steps!");
break;
}
......@@ -167,7 +167,7 @@ Fldstat2(void *process)
if (wstatus && tsID == 0 && levelID == 0)
{
vlistInqVarName(vlistID1, varID, varname);
cdoWarning("Using constant grid cell area weights for variable %s!", varname);
Warning("Using constant grid cell area weights for variable %s!", varname);
}
double missval1 = vlistInqVarMissval(vlistID1, varID);
......
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