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

replaced cdo I/O functions with new calls/system

parent 6bdf7045
......@@ -485,7 +485,7 @@ after_defineNextTimestep(struct Control *globs)
if (otsID == 0)
{
int nvars = vlistNvars(globs->ovlistID);
if (nvars == 0) Error("No variable selected!");
if (nvars == 0) cdoAbort("No variable selected!");
vlistDefTaxis(globs->ovlistID, globs->taxisID2);
streamDefVlist(globs->ostreamID, globs->ovlistID);
}
......@@ -512,7 +512,7 @@ after_setEndOfInterval(struct Control *globs, int nrecs)
else if (globs->OutputInterval == UNLIM_INTERVAL)
globs->EndOfInterval = false;
else
Error("output interval %d not implemented!", globs->OutputInterval);
cdoAbort("output interval %d not implemented!", globs->OutputInterval);
}
}
......@@ -569,7 +569,7 @@ after_check_content(struct Variable *vars, int timestep)
if (vars[code].needed && !vars[code].selected && vars[code].spectral == nullptr && vars[code].hybrid == nullptr)
{
static bool lwarn = true;
if (lwarn) Warning("No humidity in data file, set to zero !");
if (lwarn) cdoWarning("No humidity in data file, set to zero !");
lwarn = false;
vars[code].needed = false;
}
......@@ -579,9 +579,9 @@ after_check_content(struct Variable *vars, int timestep)
if (vars[code].needed && !vars[code].comp && vars[code].spectral == nullptr && vars[code].hybrid == nullptr)
{
if (labort_after)
Error("Code %3d not found at timestep %d!", code, timestep);
cdoAbort("Code %3d not found at timestep %d!", code, timestep);
else
Warning("Code %3d not found at timestep %d!", code, timestep);
cdoWarning("Code %3d not found at timestep %d!", code, timestep);
}
}
}
......@@ -595,12 +595,12 @@ after_check_content(struct Variable *vars, int timestep)
code = HALF_PRESS;
if ( vars[code].needed && !vars[code].comp &&
vars[code].spectral == nullptr && vars[code].hybrid == nullptr )
Error( "Hybrid model level not found!");
cdoAbort( "Hybrid model level not found!");
code = FULL_PRESS;
if ( vars[code].needed && !vars[code].comp &&
vars[code].spectral == nullptr && vars[code].hybrid == nullptr )
Error( "Hybrid model level not found!");
cdoAbort( "Hybrid model level not found!");
*/
}
......@@ -621,7 +621,7 @@ after_control(struct Control *globs, struct Variable *vars)
if (read_task == nullptr)
{
lparallelread = false;
Warning("CDO tasks not available!");
cdoWarning("CDO tasks not available!");
}
}
......@@ -700,14 +700,14 @@ after_control(struct Control *globs, struct Variable *vars)
if (lparallelread)
{
status = *(int *) cdo_task_wait(read_task);
if (status < 0) Error("after_readTimestep error! (status = %d)", status);
if (status < 0) cdoAbort("after_readTimestep error! (status = %d)", status);
}
tsFirst = false;
}
else
{
status = *(int *) cdo_task_wait(read_task);
if (status < 0) Error("after_readTimestep error! (status = %d)", status);
if (status < 0) cdoAbort("after_readTimestep error! (status = %d)", status);
}
nrecs = status;
......@@ -905,9 +905,9 @@ after_setLevel(struct Control *globs)
extern int labort_after;
if (globs->Verbose) lprintf(stdout);
if (labort_after)
Error("Inconsistent or invalid level list!");
cdoAbort("Inconsistent or invalid level list!");
else
Warning("Inconsistent or invalid level list!");
cdoWarning("Inconsistent or invalid level list!");
}
globs->NumLevelRequest = l;
......@@ -937,7 +937,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
{
if (oVertID == -1)
{
if (globs->NumLevelRequest > globs->NumLevelFound) Error("Too much level requested");
if (globs->NumLevelRequest > globs->NumLevelFound) cdoAbort("Too much level requested");
if (globs->NumLevelFound == globs->NumLevelRequest)
{
......@@ -969,7 +969,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
else
{
zaxisName(zaxisInqType(iVertID), zaxistypename);
Error("%s level data unsupported for TYPE %d", zaxistypename, globs->Type);
cdoAbort("%s level data unsupported for TYPE %d", zaxistypename, globs->Type);
}
break;
}
......@@ -1009,7 +1009,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
break;
}
default: Error("TYPE %d unsupported", globs->Type);
default: cdoAbort("TYPE %d unsupported", globs->Type);
}
}
......@@ -1028,8 +1028,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if (specGridID == -1)
{
if (globs->DimSP == 0) Error("dim spectral undefined");
if (globs->Truncation == 0) Error("truncation undefined");
if (globs->DimSP == 0) cdoAbort("dim spectral undefined");
if (globs->Truncation == 0) cdoAbort("truncation undefined");
specGridID = gridCreate(GRID_SPECTRAL, globs->DimSP);
gridDefTrunc(specGridID, globs->Truncation);
......@@ -1044,8 +1044,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if (gaussGridID == -1)
{
if (globs->Longitudes == 0) Error("number of longitudes undefined");
if (globs->Latitudes == 0) Error("number of latitudes undefined");
if (globs->Longitudes == 0) cdoAbort("number of longitudes undefined");
if (globs->Latitudes == 0) cdoAbort("number of latitudes undefined");
gaussGridID = gridCreate(GRID_GAUSSIAN, globs->Longitudes * globs->Latitudes);
gridDefXsize(gaussGridID, globs->Longitudes);
......@@ -1059,8 +1059,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case 40:
case 60:
{
if (globs->Fouriers == 0) Error("number of fourier coefficients undefined");
if (globs->Latitudes == 0) Error("number of latitudes undefined");
if (globs->Fouriers == 0) cdoAbort("number of fourier coefficients undefined");
if (globs->Latitudes == 0) cdoAbort("number of latitudes undefined");
ogridID = gridCreate(GRID_FOURIER, globs->Fouriers * globs->Latitudes);
gridDefXsize(ogridID, globs->Latitudes);
......@@ -1071,14 +1071,14 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case 41:
case 61:
{
if (globs->Latitudes == 0) Error("Number of latitudes undefined");
if (globs->Latitudes == 0) cdoAbort("Number of latitudes undefined");
ogridID = gridCreate(GRID_GAUSSIAN, globs->Latitudes);
gridDefXsize(ogridID, 1);
gridDefYsize(ogridID, globs->Latitudes);
break;
}
default: Error("TYPE %d unsupported", globs->Type);
default: cdoAbort("TYPE %d unsupported", globs->Type);
}
if (ogridID != -1)
......@@ -1090,7 +1090,7 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
}
}
if (ogridID == -1) Error("out grid undefined");
if (ogridID == -1) cdoAbort("out grid undefined");
}
static void
......@@ -1164,13 +1164,13 @@ after_checkNamelist(struct Control *globs)
{
if (globs->Mean && globs->Type < 20)
{
Error("Mean is only available for TYPE >= 20!");
cdoAbort("Mean is only available for TYPE >= 20!");
}
if (globs->Extrapolate == false && globs->Type >= 30)
{
if (globs->Type > 30) Error("EXTRAPOLATE = 0 is only available for TYPE = 30!");
if (globs->Mean) Error("EXTRAPOLATE = 0 is only available with MEAN = 0!");
if (globs->Type > 30) cdoAbort("EXTRAPOLATE = 0 is only available for TYPE = 30!");
if (globs->Mean) cdoAbort("EXTRAPOLATE = 0 is only available with MEAN = 0!");
}
}
......@@ -1238,7 +1238,7 @@ after_parini(struct Control *globs, struct Variable *vars)
int gribFormat = scan_par_obsolate(namelist, "grib", 0);
int cdfFormat = scan_par_obsolate(namelist, "netcdf", 0);
if (gribFormat && cdfFormat) Error("GRIB or NetCDF?");
if (gribFormat && cdfFormat) cdoAbort("GRIB or NetCDF?");
switch (fileFormat)
{
......@@ -1250,7 +1250,7 @@ after_parini(struct Control *globs, struct Variable *vars)
case 4: ofiletype = CDI_FILETYPE_NC2; break;
case 5: ofiletype = CDI_FILETYPE_NC5; break;
case 6: ofiletype = CDI_FILETYPE_NC4; break;
default: Error("unknown file format %d", fileFormat);
default: cdoAbort("unknown file format %d", fileFormat);
}
if (gribFormat) ofiletype = CDI_FILETYPE_GRB;
......@@ -1264,7 +1264,7 @@ after_parini(struct Control *globs, struct Variable *vars)
case 24: DataType = CDI_DATATYPE_PACK24; break;
case 32: DataType = CDI_DATATYPE_FLT32; break;
case 64: DataType = CDI_DATATYPE_FLT64; break;
default: Error("unsupported data precision %d", precision);
default: cdoAbort("unsupported data precision %d", precision);
}
globs->unitsel = scan_par(globs->Verbose, namelist, "unitsel", 0);
......@@ -1359,10 +1359,10 @@ after_precntl(struct Control *globs, struct Variable *vars)
if (globs->Debug)
{
Message("nvars = %d", nvars);
Message("ngrids = %d", ngrids);
Message("nverts = %d", nverts);
Message("ntsteps = %d", ntsteps);
cdoMessage("nvars = %d", nvars);
cdoMessage("ngrids = %d", ngrids);
cdoMessage("nverts = %d", nverts);
cdoMessage("ntsteps = %d", ntsteps);
}
for (index = 0; index < ngrids; index++)
......@@ -1386,7 +1386,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if (globs->Truncation == 0 && globs->Latitudes == 0) Error("Unsupported file structure (no spectral or Gaussian data found)!");
if (globs->Truncation == 0 && globs->Latitudes == 0) cdoAbort("Unsupported file structure (no spectral or Gaussian data found)!");
if (globs->Truncation == 0)
{
......@@ -1429,11 +1429,11 @@ after_precntl(struct Control *globs, struct Variable *vars)
{
if (nvct == 0)
{
if (numlevel != 191) Warning("VCT missing for hybrid level data with %d levels!", numlevel);
if (numlevel != 191) cdoWarning("VCT missing for hybrid level data with %d levels!", numlevel);
}
else
{
Warning("Skip %d hybrid level data with %d levels!", (nvct / 2 - 1), numlevel);
cdoWarning("Skip %d hybrid level data with %d levels!", (nvct / 2 - 1), numlevel);
}
continue;
}
......@@ -1441,7 +1441,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
else if (leveltype == ZAXIS_HYBRID && globs->nvct == zaxisInqVctSize(zaxisID))
continue;
if (iVertID != -1) Warning("More than %d different vertical grid structure found!", vertfound);
if (iVertID != -1) cdoWarning("More than %d different vertical grid structure found!", vertfound);
vertfound++;
......@@ -1468,12 +1468,12 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
else
{
Error("VCT not defined in inputfile!");
cdoAbort("VCT not defined in inputfile!");
}
}
if (numlevel != (globs->nvct / 2 - 1))
Error("Number of hybrid levels %d does not match VCT levels %d", numlevel, globs->nvct / 2 - 1);
cdoAbort("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++)
......@@ -1485,7 +1485,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if (nhzaxis > 0 && globs->nvct == 0) Error("VCT missing!");
if (nhzaxis > 0 && globs->nvct == 0) cdoAbort("VCT missing!");
globs->NumLevel = globs->NumLevelFound;
......@@ -1534,7 +1534,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
code = vlistInqVarCode(globs->ivlistID, varID);
if (code <= 0 || code >= MaxCodes)
{
Warning("Code number %d out of range, variable ignored!", code);
cdoWarning("Code number %d out of range, variable ignored!", code);
continue;
}
gridtype = gridInqType(gridID);
......@@ -1553,7 +1553,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
fprintf(stderr, "Code %3d Levels = %3d LevelType = %3d GridType = %3d\n", code, numlevel, leveltype, gridtype);
}
if (globs->Debug) Message("FieldDim = %d", FieldDim);
if (globs->Debug) cdoMessage("FieldDim = %d", FieldDim);
globs->Field = (double *) Malloc(FieldDim * sizeof(double));
......@@ -1613,14 +1613,14 @@ after_postcntl(struct Control *globs, struct Variable *vars)
if (ogridID == -1)
{
/*
Warning( "undefined grid for code %d", code);
cdoWarning( "undefined grid for code %d", code);
*/
continue;
}
if (ozaxisID == -1)
{
/*
Warning( "undefined level for code %d", code);
cdoWarning( "undefined level for code %d", code);
*/
continue;
}
......@@ -1704,7 +1704,7 @@ after_readVct(struct Control *globs, const char *vctfile)
double va, vb;
FILE *fp = fopen(vctfile, "r");
if (fp == nullptr) SysError("Open failed on %s", vctfile);
if (fp == nullptr) cdoSysError("Open failed on %s", vctfile);
while (fgets(line, 1023, fp))
{
......@@ -1842,10 +1842,10 @@ after_processing(struct Control *globs, struct Variable *vars)
if (globs->Type == 10 || globs->Type == 40 || globs->Type == 60)
{
if (ofiletype == CDI_FILETYPE_GRB)
Error("Can't write fourier coefficients to GRIB!");
cdoAbort("Can't write fourier coefficients to GRIB!");
else if (ofiletype == CDI_FILETYPE_NC || ofiletype == CDI_FILETYPE_NC2 || ofiletype == CDI_FILETYPE_NC4
|| ofiletype == CDI_FILETYPE_NC4C || ofiletype == CDI_FILETYPE_NC5)
Error("Can't write fourier coefficients to NetCDF!");
cdoAbort("Can't write fourier coefficients to NetCDF!");
}
filename = strrchr(ifile, '/');
......@@ -1972,7 +1972,7 @@ Afterburner(void *process)
globs->Nfiles = nfiles - 1;
if (globs->Nfiles > 0)
{
if (globs->Multi > 0) Error("Namelist parameter MULTI works only with one inputfile");
if (globs->Multi > 0) cdoAbort("Namelist parameter MULTI works only with one inputfile");
ifiles = (const char **) Malloc(globs->Nfiles * sizeof(char *));
for (int i = 0; i < globs->Nfiles; ++i) ifiles[i] = cdoGetStreamName(--nfiles);
......
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)
Warning("Invalid value(s) detected for variable '%s': %ld values were lower than minimum valid value (%.4g).",
cdoWarning("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)
Warning("Invalid value(s) detected for variable '%s': %ld values were greater than maximum valid value (%.4g).",
cdoWarning("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)
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is lower by more than an order of magnitude than "
cdoWarning("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)
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is lower than minimum allowed: %.4g", varname, amean,
cdoWarning("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)
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is greater by more than an order of magnitude than "
cdoWarning("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)
Warning("Invalid Absolute Mean for variable '%s' (%.5g) is greater than maximum allowed: %.4g", varname, amean,
cdoWarning("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)
{
Warning("Udunits: Error converting units from [%s] to [%s], parameter: %s", var.units_old, var.units,
cdoWarning("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]) Warning("Variable name %s not found!", vpairs[i].first);
if (!namefound[i]) cdoWarning("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) Warning("Values of SLM out of bounds! (minval=%g, maxval=%g)", minval, maxval);
if (minval < 0 || maxval > 1) cdoWarning("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) Warning("Day %d%s not found!", dday, cmons[dmon]);
if (nfound == 0) cdoWarning("Day %d%s not found!", dday, cmons[dmon]);
vlistDestroy(vlistID2);
......
......@@ -220,7 +220,7 @@ Derivepar(void *process)
if (operatorID == GHEIGHT)
{
if (humID == -1)
Warning("%s not found - using algorithm without %s!", var_stdname(specific_humidity), var_stdname(specific_humidity));
cdoWarning("%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)
Warning("%s not found - set to zero!", var_stdname(surface_geopotential));
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));
......@@ -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) Warning("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
arrayMinMax(gridsize, sgeopot.data(), minval, maxval);
if (minval < MIN_FIS || maxval > MAX_FIS) Warning("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;
......@@ -351,7 +351,7 @@ Derivepar(void *process)
arrayMinMax(gridsize, single2, minval, maxval);
if (minval < MIN_T || maxval > MAX_T)
Warning("Input temperature at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
cdoWarning("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)
Warning("Input humidity at level %d out of range (min=%g max=%g)!", levelID + 1, minval, maxval);
cdoWarning("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) Warning("stream2 has more time steps than stream1!");
if (nrecs > 0 && nrecs2 == 0) Warning("stream1 has more time steps than stream2!");
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!");
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
......
......@@ -116,9 +116,9 @@ get_eigenmode(void)
eigen_mode = JACOBI;
else
{
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");
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");
}
}
......@@ -129,9 +129,9 @@ get_eigenmode(void)
#ifdef _OPENMP
if (omp_get_max_threads() > 1 && eigen_mode == DANIELSON_LANCZOS)
{
Warning("Requested parallel computation with %i Threads ", omp_get_max_threads());
Warning(" but environmental setting CDO_SVD_MODE causes sequential ");
Warning(" Singular value decomposition");
cdoWarning("Requested parallel computation with %i Threads ", omp_get_max_threads());
cdoWarning(" but environmental setting CDO_SVD_MODE causes sequential ");
cdoWarning(" Singular value decomposition");
}
#endif
......@@ -151,7 +151,7 @@ get_weightmode(void)
else if (!strncmp(envstr, "on", 2))
weight_mode = WEIGHT_ON;
else
Warning("Unknown environmental setting %s for CDO_WEIGHT_MODE. Available options are: on/off", envstr);
cdoWarning("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)
{
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");
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");
n_eig = nts;
}
n = nts;
......@@ -286,10 +286,10 @@ EOFs(void *process)
if ((size_t) n_eig > gridsize)
{
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");
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");
n_eig = gridsize;
}
n = gridsize;
......@@ -307,7 +307,7 @@ EOFs(void *process)
if (wstatus != 0)
{
weight_mode = WEIGHT_OFF;
Warning("Using constant grid cell area weights!");
cdoWarning("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
Warning("Parameter value '%s' is invalid. The only valid value is "
cdoWarning("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
Warning("Datasize > 2GB and NC_64BIT_OFFSET not available!");
cdoWarning("Datasize > 2GB and NC_64BIT_OFFSET not available!");
#endif
}
......
......@@ -273,17 +273,17 @@ Ensstat(void *process)
if (nrecs == 0)
{
lwarning = true;
Warning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(fileID));
cdoWarning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(fileID));
}
else if (nrecs0 == 0)
{
lwarning = true;
Warning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(0));
cdoWarning("Inconsistent ensemble file, too few time steps in %s!", cdoGetStreamName(0));
}
else
{
lerror = true;
Warning("Inconsistent ensemble file, number of records at time step %d of %s and %s differ!", tsID + 1,
cdoWarning("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) Warning("Inconsistent ensemble, processed only the first %d timesteps!", tsID);
if (lwarning) cdoWarning("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)
{
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.");
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.");
cdoAbort("Exit due to unsupported file structure");
}