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

afterburner: Fixed errors according to cdoAbort.

parent 9bf9e9a7
......@@ -33,7 +33,6 @@
#include <cdi.h>
#include "cdo_int.h"
#include "cdo_task.h"
#define streamOpenWrite cdoOpenWrite
#define streamDefVlist cdoDefVlist
......@@ -65,6 +64,8 @@ struct RARG
struct Control *globs;
};
void *afterReadTask = nullptr;
static bool lstdout = true;
static int Source = 0;
......@@ -88,7 +89,7 @@ static int oVertID = -1;
static bool Lhybrid2pressure = false;
static int TsID;
static bool lparallelread = true;
bool afterReadAsync = true;
#define TIMESTEP_INTERVAL -1
#define MONTHLY_INTERVAL 0
......@@ -485,7 +486,7 @@ after_defineNextTimestep(struct Control *globs)
if (otsID == 0)
{
int nvars = vlistNvars(globs->ovlistID);
if (nvars == 0) cdoAbort("No variable selected!");
if (nvars == 0) afterAbort("No variable selected!");
vlistDefTaxis(globs->ovlistID, globs->taxisID2);
streamDefVlist(globs->ostreamID, globs->ovlistID);
}
......@@ -512,7 +513,7 @@ after_setEndOfInterval(struct Control *globs, int nrecs)
else if (globs->OutputInterval == UNLIM_INTERVAL)
globs->EndOfInterval = false;
else
cdoAbort("output interval %d not implemented!", globs->OutputInterval);
afterAbort("output interval %d not implemented!", globs->OutputInterval);
}
}
......@@ -548,7 +549,6 @@ after_moveTimestep(struct Variable *vars)
static void
after_check_content(struct Variable *vars, int timestep)
{
extern int labort_after;
for (int code = 0; code < 272; code++)
{
/* if ( code == GEOPOTENTIAL ) continue; */
......@@ -578,10 +578,7 @@ 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)
cdoAbort("Code %3d not found at timestep %d!", code, timestep);
else
cdoWarning("Code %3d not found at timestep %d!", code, timestep);
afterAbort("Code %3d not found at timestep %d!", code, timestep);
}
}
}
......@@ -595,12 +592,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 )
cdoAbort( "Hybrid model level not found!");
afterAbort( "Hybrid model level not found!");
code = FULL_PRESS;
if ( vars[code].needed && !vars[code].comp &&
vars[code].spectral == nullptr && vars[code].hybrid == nullptr )
cdoAbort( "Hybrid model level not found!");
afterAbort( "Hybrid model level not found!");
*/
}
......@@ -613,14 +610,13 @@ after_control(struct Control *globs, struct Variable *vars)
int rtime, vtime;
int code;
RARG rarg;
void *read_task = nullptr;
if (lparallelread)
if (afterReadAsync)
{
read_task = cdo_task_new();
if (read_task == nullptr)
afterReadTask = cdo_task_new();
if (afterReadTask == nullptr)
{
lparallelread = false;
afterReadAsync = false;
cdoWarning("CDO tasks not available!");
}
}
......@@ -684,11 +680,11 @@ after_control(struct Control *globs, struct Variable *vars)
int status = -1;
if (tsFirst || !lparallelread)
if (tsFirst || !afterReadAsync)
{
if (lparallelread)
if (afterReadAsync)
{
cdo_task_start(read_task, after_readTimestep, &rarg);
cdo_task_start(afterReadTask, after_readTimestep, &rarg);
}
else
{
......@@ -697,16 +693,16 @@ after_control(struct Control *globs, struct Variable *vars)
if (tsFirst && globs->Type > 0) after_legini_setup(globs, vars);
if (lparallelread)
if (afterReadAsync)
{
status = *(int *) cdo_task_wait(read_task);
status = *(int *) cdo_task_wait(afterReadTask);
if (status < 0) cdoAbort("after_readTimestep error! (status = %d)", status);
}
tsFirst = false;
}
else
{
status = *(int *) cdo_task_wait(read_task);
status = *(int *) cdo_task_wait(afterReadTask);
if (status < 0) cdoAbort("after_readTimestep error! (status = %d)", status);
}
......@@ -717,9 +713,9 @@ after_control(struct Control *globs, struct Variable *vars)
after_moveTimestep(vars);
if (nrecs && lparallelread)
if (nrecs && afterReadAsync)
{
cdo_task_start(read_task, after_readTimestep, &rarg);
cdo_task_start(afterReadTask, after_readTimestep, &rarg);
}
after_setEndOfInterval(globs, nrecs);
......@@ -752,7 +748,7 @@ after_control(struct Control *globs, struct Variable *vars)
globs->OldDate = globs->NewDate;
}
if (read_task) cdo_task_delete(read_task);
if (afterReadTask) cdo_task_delete(afterReadTask);
}
static void
......@@ -902,12 +898,8 @@ after_setLevel(struct Control *globs)
if (l != globs->NumLevelRequest)
{
extern int labort_after;
if (globs->Verbose) lprintf(stdout);
if (labort_after)
cdoAbort("Inconsistent or invalid level list!");
else
cdoWarning("Inconsistent or invalid level list!");
afterAbort("Inconsistent or invalid level list!");
}
globs->NumLevelRequest = l;
......@@ -937,7 +929,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
{
if (oVertID == -1)
{
if (globs->NumLevelRequest > globs->NumLevelFound) cdoAbort("Too much level requested");
if (globs->NumLevelRequest > globs->NumLevelFound) afterAbort("Too much level requested");
if (globs->NumLevelFound == globs->NumLevelRequest)
{
......@@ -969,7 +961,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
else
{
zaxisName(zaxisInqType(iVertID), zaxistypename);
cdoAbort("%s level data unsupported for TYPE %d", zaxistypename, globs->Type);
afterAbort("%s level data unsupported for TYPE %d", zaxistypename, globs->Type);
}
break;
}
......@@ -1009,7 +1001,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
break;
}
default: cdoAbort("TYPE %d unsupported", globs->Type);
default: afterAbort("TYPE %d unsupported", globs->Type);
}
}
......@@ -1028,8 +1020,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if (specGridID == -1)
{
if (globs->DimSP == 0) cdoAbort("dim spectral undefined");
if (globs->Truncation == 0) cdoAbort("truncation undefined");
if (globs->DimSP == 0) afterAbort("dim spectral undefined");
if (globs->Truncation == 0) afterAbort("truncation undefined");
specGridID = gridCreate(GRID_SPECTRAL, globs->DimSP);
gridDefTrunc(specGridID, globs->Truncation);
......@@ -1044,8 +1036,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if (gaussGridID == -1)
{
if (globs->Longitudes == 0) cdoAbort("number of longitudes undefined");
if (globs->Latitudes == 0) cdoAbort("number of latitudes undefined");
if (globs->Longitudes == 0) afterAbort("number of longitudes undefined");
if (globs->Latitudes == 0) afterAbort("number of latitudes undefined");
gaussGridID = gridCreate(GRID_GAUSSIAN, globs->Longitudes * globs->Latitudes);
gridDefXsize(gaussGridID, globs->Longitudes);
......@@ -1059,8 +1051,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case 40:
case 60:
{
if (globs->Fouriers == 0) cdoAbort("number of fourier coefficients undefined");
if (globs->Latitudes == 0) cdoAbort("number of latitudes undefined");
if (globs->Fouriers == 0) afterAbort("number of fourier coefficients undefined");
if (globs->Latitudes == 0) afterAbort("number of latitudes undefined");
ogridID = gridCreate(GRID_FOURIER, globs->Fouriers * globs->Latitudes);
gridDefXsize(ogridID, globs->Latitudes);
......@@ -1071,14 +1063,14 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case 41:
case 61:
{
if (globs->Latitudes == 0) cdoAbort("Number of latitudes undefined");
if (globs->Latitudes == 0) afterAbort("Number of latitudes undefined");
ogridID = gridCreate(GRID_GAUSSIAN, globs->Latitudes);
gridDefXsize(ogridID, 1);
gridDefYsize(ogridID, globs->Latitudes);
break;
}
default: cdoAbort("TYPE %d unsupported", globs->Type);
default: afterAbort("TYPE %d unsupported", globs->Type);
}
if (ogridID != -1)
......@@ -1090,7 +1082,7 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
}
}
if (ogridID == -1) cdoAbort("out grid undefined");
if (ogridID == -1) afterAbort("out grid undefined");
}
static void
......@@ -1164,13 +1156,13 @@ after_checkNamelist(struct Control *globs)
{
if (globs->Mean && globs->Type < 20)
{
cdoAbort("Mean is only available for TYPE >= 20!");
afterAbort("Mean is only available for TYPE >= 20!");
}
if (globs->Extrapolate == false && globs->Type >= 30)
{
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!");
if (globs->Type > 30) afterAbort("EXTRAPOLATE = 0 is only available for TYPE = 30!");
if (globs->Mean) afterAbort("EXTRAPOLATE = 0 is only available with MEAN = 0!");
}
}
......@@ -1232,13 +1224,13 @@ after_parini(struct Control *globs, struct Variable *vars)
globs->Mean = scan_par(globs->Verbose, namelist, "mean", 0);
globs->OutputInterval = scan_par(globs->Verbose, namelist, "interval", MONTHLY_INTERVAL);
if (globs->Mean >= 2) cdoAbort("Namelist parameter MEAN=%d out of bounds (0:1)", globs->Mean);
if (globs->Mean >= 2) afterAbort("Namelist parameter MEAN=%d out of bounds (0:1)", globs->Mean);
int fileFormat = scan_par(globs->Verbose, namelist, "format", -1);
int gribFormat = scan_par_obsolate(namelist, "grib", 0);
int cdfFormat = scan_par_obsolate(namelist, "netcdf", 0);
if (gribFormat && cdfFormat) cdoAbort("GRIB or NetCDF?");
if (gribFormat && cdfFormat) afterAbort("GRIB or NetCDF?");
switch (fileFormat)
{
......@@ -1250,7 +1242,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: cdoAbort("unknown file format %d", fileFormat);
default: afterAbort("unknown file format %d", fileFormat);
}
if (gribFormat) ofiletype = CDI_FILETYPE_GRB;
......@@ -1264,7 +1256,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: cdoAbort("unsupported data precision %d", precision);
default: afterAbort("unsupported data precision %d", precision);
}
globs->unitsel = scan_par(globs->Verbose, namelist, "unitsel", 0);
......@@ -1386,7 +1378,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if (globs->Truncation == 0 && globs->Latitudes == 0) cdoAbort("Unsupported file structure (no spectral or Gaussian data found)!");
if (globs->Truncation == 0 && globs->Latitudes == 0) afterAbort("Unsupported file structure (no spectral or Gaussian data found)!");
if (globs->Truncation == 0)
{
......@@ -1468,12 +1460,12 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
else
{
cdoAbort("VCT not defined in inputfile!");
afterAbort("VCT not defined in inputfile!");
}
}
if (numlevel != (globs->nvct / 2 - 1))
cdoAbort("Number of hybrid levels %d does not match VCT levels %d", numlevel, globs->nvct / 2 - 1);
afterAbort("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 +1477,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if (nhzaxis > 0 && globs->nvct == 0) cdoAbort("VCT missing!");
if (nhzaxis > 0 && globs->nvct == 0) afterAbort("VCT missing!");
globs->NumLevel = globs->NumLevelFound;
......@@ -1842,10 +1834,10 @@ after_processing(struct Control *globs, struct Variable *vars)
if (globs->Type == 10 || globs->Type == 40 || globs->Type == 60)
{
if (ofiletype == CDI_FILETYPE_GRB)
cdoAbort("Can't write fourier coefficients to GRIB!");
afterAbort("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)
cdoAbort("Can't write fourier coefficients to NetCDF!");
afterAbort("Can't write fourier coefficients to NetCDF!");
}
filename = strrchr(ifile, '/');
......@@ -1971,7 +1963,7 @@ Afterburner(void *process)
globs->Nfiles = nfiles - 1;
if (globs->Nfiles > 0)
{
if (globs->Multi > 0) cdoAbort("Namelist parameter MULTI works only with one inputfile");
if (globs->Multi > 0) afterAbort("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);
......
......@@ -29,6 +29,7 @@
#include "error.h"
#include "dmemory.h"
#include "process_int.h"
#include "cdo_task.h"
#define MaxLevel 1024
......@@ -256,4 +257,15 @@ void after_EchamDependencies(struct Variable *vars, int ncodes, int type, int so
void after_legini_setup(struct Control *globs, struct Variable *vars);
template <typename... Args>
void
afterAbort(const std::string &format, Args const &... args)
{
extern void *afterReadTask;
extern bool afterReadAsync;
if (afterReadAsync) cdo_task_wait(afterReadTask);
cdoAbort(format, args...);
}
#endif /* AFTERBURNER_H */
......@@ -20,6 +20,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#ifdef CDO
#include "cdo_int.h"
#include "cdo_math.h"
......@@ -32,6 +33,7 @@
#define HAVE_OPENMP4 1
#endif
#endif
#endif
#include "afterburner.h"
......@@ -40,7 +42,6 @@
#include "after_vertint.h"
int afterDebug = 0;
int labort_after = true;
static char *
FieldName(int code, const char *text)
......@@ -485,10 +486,7 @@ CheckAnalyses(struct Variable *vars)
&& code != VELOPOT && code != V_WIND && code != RHUMIDITY && code != GEOPOTHEIGHT && code != PS
&& vars[code].spectral == nullptr && vars[code].grid == nullptr)
{
if (labort_after)
cdoAbort("Code %3d not found", code);
else
cdoWarning("Code %3d not found", code);
afterAbort("Code %3d not found", code);
}
}
......@@ -604,7 +602,7 @@ after_processPL(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].spectral) cdoAbort("Code %d not available on spectral space!", code);
if (!vars[code].spectral) afterAbort("Code %d not available on spectral space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -680,7 +678,7 @@ after_processPL(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on fourier space!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on fourier space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -704,7 +702,7 @@ after_processPL(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on zonal mean!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on zonal mean!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -1580,7 +1578,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].spectral) cdoAbort("Code %d not available on spectral space!", code);
if (!vars[code].spectral) afterAbort("Code %d not available on spectral space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -1655,7 +1653,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on fourier space!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on fourier space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -1679,7 +1677,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on zonal mean!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on zonal mean!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -1727,7 +1725,7 @@ after_processML(struct Control *globs, struct Variable *vars)
}
else
{
cdoAbort("surface pressure not found!");
afterAbort("surface pressure not found!");
}
}
vars[LNPS].needed = vars[LNPS].selected;
......@@ -1807,7 +1805,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (vars[code].hybrid == nullptr) cdoAbort("Internal problem. Code %d not allocated!", code);
if (vars[code].hybrid == nullptr) afterAbort("Internal problem. Code %d not allocated!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -1888,7 +1886,7 @@ after_processML(struct Control *globs, struct Variable *vars)
}
else if (code == GEOPOTHEIGHT)
{
if (vars[TEMPERATURE].hybrid == nullptr) cdoAbort("Code 130 not found!");
if (vars[TEMPERATURE].hybrid == nullptr) afterAbort("Code 130 not found!");
interp_Z(globs->Orography, vars[GEOPOTHEIGHT].hybrid, vars[GEOPOTHEIGHT].grid, vars[FULL_PRESS].hybrid,
vars[HALF_PRESS].hybrid, globs->vert_index, vars[TEMPERATURE].hybrid, pressureLevel,
globs->NumLevelRequest, globs->DimGP, globs->NumLevel, vars[code].missval);
......@@ -2048,7 +2046,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].needed && vars[code].grid && (vars[code].sfit || globs->Type < 70))
{
if (vars[code].nmiss) cdoAbort("Missing values for code %d unsupported with TYPE > 30!", code);
if (vars[code].nmiss) afterAbort("Missing values for code %d unsupported with TYPE > 30!", code);
if (vars[code].fourier == nullptr)
{
......@@ -2074,7 +2072,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on fourier space!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on fourier space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -2098,7 +2096,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on zonal mean!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on zonal mean!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -2143,7 +2141,7 @@ after_processML(struct Control *globs, struct Variable *vars)
vars[DIVERGENCE].spectral = alloc_dp(globs->DimSP * globs->NumLevelRequest, "vars[DIVERGENCE].spectral");
if (vars[VORTICITY].spectral == nullptr)
vars[VORTICITY].spectral = alloc_dp(globs->DimSP * globs->NumLevelRequest, "vars[VORTICITY].spectral");
if ((vars[U_WIND].fourier == 0 || vars[V_WIND].fourier == 0) && globs->NumLevelRequest) cdoAbort("uwind or vwind missing!");
if ((vars[U_WIND].fourier == 0 || vars[V_WIND].fourier == 0) && globs->NumLevelRequest) afterAbort("uwind or vwind missing!");
uv2dv(vars[U_WIND].fourier, vars[V_WIND].fourier, vars[DIVERGENCE].spectral, vars[VORTICITY].spectral, globs->pol2,
globs->pol3, globs->NumLevelRequest, globs->Latitudes, globs->Truncation);
}
......@@ -2228,7 +2226,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on fourier space!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on fourier space!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -2252,7 +2250,7 @@ after_processML(struct Control *globs, struct Variable *vars)
for (code = 0; code < MaxCodes; code++)
if (vars[code].selected)
{
if (!vars[code].fourier) cdoAbort("Code %d not available on zonal mean!", code);
if (!vars[code].fourier) afterAbort("Code %d not available on zonal mean!", code);
nlevel = zaxisInqSize(vars[code].ozaxisID);
for (lindex = 0; lindex < nlevel; lindex++)
......@@ -2346,7 +2344,7 @@ after_AnalysisAddRecord(struct Control *globs, struct Variable *vars, int code,
}
}
else
cdoAbort("Only pressure level data supported for spectral data!");
afterAbort("Only pressure level data supported for spectral data!");
}
else
{
......@@ -2430,7 +2428,7 @@ after_EchamAddRecord(struct Control *globs, struct Variable *vars, int code, int
if (nlevel > 1 && leveltype == ZAXIS_HYBRID) vars[code].plev = globs->NumLevelRequest;
if (gridInqTrunc(gridID) != globs->Truncation)
cdoAbort("Resolution error. Required %d - Found %d", globs->Truncation, gridInqTrunc(gridID));
afterAbort("Resolution error. Required %d - Found %d", globs->Truncation, gridInqTrunc(gridID));
}
else
{
......@@ -2486,7 +2484,7 @@ MakeDependencies(struct Variable *vars, int varcode, int depcode)
{
if (vars[depcode].ivarID == -1)
{
cdoAbort("code %d undefined, needed to compute code %d", depcode, varcode);
afterAbort("code %d undefined, needed to compute code %d", depcode, varcode);
}
else
{
......
......@@ -53,13 +53,12 @@ template <typename... Args>
void
cdoAbort(const std::string &format, Args const &... args) noexcept
{
puts("\n");
fflush(stdout);
MpMO::PrintCerr(Red("%s (Abort): ") + Black(format), CdoOut::getContext(), args...);
if (MpMO::exitOnError)
{
CdoOut::exitProgram();
}
if (MpMO::exitOnError) CdoOut::exitProgram();
}
template <typename... Args>
void
cdoPrint(const std::string &format, Args const &... args) noexcept
......
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