Commit 91547b16 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Vertintml: added call to varListSetMemtype() (bug fix).

parent 3fbbfaea
Pipeline #4905 passed with stages
in 16 minutes and 35 seconds
......@@ -171,7 +171,7 @@ Vertintap(void *process)
const auto zaxisIDp = zaxisCreate(zaxistype, nplev);
zaxisDefLevels(zaxisIDp, plev.data());
VarList varList1, varList2;
VarList varList1;
varListInit(varList1, vlistID1);
varListSetUniqueMemtype(varList1);
const auto memtype = varList1[0].memType;
......@@ -238,6 +238,8 @@ Vertintap(void *process)
}
change_height_zaxis(nhlev, vlistID1, vlistID2, zaxisIDp);
VarList varList2;
varListInit(varList2, vlistID2);
varListSetMemtype(varList2, memtype);
......
......@@ -203,12 +203,15 @@ Vertintml(void *process)
if (linvertvct) invert_vct(vct);
VarList varList1, varList2;
VarList varList1;
varListInit(varList1, vlistID1);
varListInit(varList2, vlistID2);
varListSetUniqueMemtype(varList1);
const auto memtype = varList1[0].memType;
VarList varList2;
varListInit(varList2, vlistID2);
varListSetMemtype(varList2, memtype);
const auto nvars = vlistNvars(vlistID1);
std::vector<bool> vars(nvars), varinterp(nvars);
......@@ -285,9 +288,9 @@ Vertintml(void *process)
const auto instNum = institutInqCenter(vlistInqVarInstitut(vlistID1, varID));
const auto tableNum = tableInqNum(vlistInqVarTable(vlistID1, varID));
auto code = vlistInqVarCode(vlistID1, varID);
auto code = varList1[varID].code;
const auto param = vlistInqVarParam(vlistID1, varID);
const auto param = varList1[varID].param;
cdiParamToString(param, paramstr, sizeof(paramstr));
int pnum, pcat, pdis;
cdiDecodeParam(param, &pnum, &pcat, &pdis);
......@@ -408,13 +411,13 @@ Vertintml(void *process)
if (-1 != sgeopotID) cdoPrint(" %s -> %s", var_stdname(surface_geopotential), varList1[sgeopotID].name);
if (-1 != geopotID) cdoPrint(" %s -> %s", var_stdname(geopotential), varList1[geopotID].name);
if (-1 != gheightID) cdoPrint(" %s -> %s", var_stdname(geopotential_height), varList1[gheightID].name);
// clang-format on
// clang-format on
}
if (tempID != -1 || gheightID != -1) sgeopot_needed = true;
if (zaxisIDh != -1 && gheightID != -1 && tempID == -1)
cdoAbort("Temperature not found, needed for vertical interpolation of geopotheight!");
cdoAbort("%s not found, needed for vertical interpolation of %s!", var_stdname(air_temperature), var_stdname(geopotential_height));
auto presID = lnpsID;
if (psvarID != -1) presID = psvarID;
......
Markdown is supported
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