Commit 84e8798d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Set type of initialized variables to auto.

parent 05875028
......@@ -26,7 +26,6 @@
#include <cdi.h>
#include "functs.h"
#include "process_int.h"
#include "cdo_vlist.h"
......@@ -38,6 +37,7 @@ getDayOfYearIndex(int64_t vdate)
{
int year, month, day;
cdiDecodeDate(vdate, &year, &month, &day);
const int dayoy = (month >= 1 && month <= 12) ? (month - 1) * 31 + day : 0;
if (dayoy < 0 || dayoy >= MAX_DOY) cdoAbort("Day of year %d out of range (date=%d)!", dayoy, vdate);
return dayoy;
......@@ -56,15 +56,15 @@ Ydayarith(void *process)
cdoOperatorAdd("ydaymul", func_mul, 0, nullptr);
cdoOperatorAdd("ydaydiv", func_div, 0, nullptr);
const int operatorID = cdoOperatorID();
const int operfunc = cdoOperatorF1(operatorID);
const auto operatorID = cdoOperatorID();
const auto operfunc = cdoOperatorF1(operatorID);
const auto streamID1 = cdoOpenRead(0);
const auto streamID2 = cdoOpenRead(1);
const int vlistID1 = cdoStreamInqVlist(streamID1);
const int vlistID2 = cdoStreamInqVlist(streamID2);
const int vlistID3 = vlistDuplicate(vlistID1);
const auto vlistID1 = cdoStreamInqVlist(streamID1);
const auto vlistID2 = cdoStreamInqVlist(streamID2);
const auto vlistID3 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
......@@ -77,9 +77,9 @@ Ydayarith(void *process)
field1.resize(gridsizemax);
field2.resize(gridsizemax);
const int taxisID1 = vlistInqTaxis(vlistID1);
const int taxisID2 = vlistInqTaxis(vlistID2);
const int taxisID3 = taxisDuplicate(taxisID1);
const auto taxisID1 = vlistInqTaxis(vlistID1);
const auto taxisID2 = vlistInqTaxis(vlistID2);
const auto taxisID3 = taxisDuplicate(taxisID1);
vlistDefTaxis(vlistID3, taxisID3);
const auto streamID3 = cdoOpenWrite(2);
......@@ -90,7 +90,7 @@ Ydayarith(void *process)
int tsID = 0;
while ((nrecs = cdoStreamInqTimestep(streamID2, tsID)))
{
const int dayoy = getDayOfYearIndex(taxisInqVdate(taxisID2));
const auto dayoy = getDayOfYearIndex(taxisInqVdate(taxisID2));
if (vars2[dayoy].size() > 0) cdoAbort("Day of year index %d already allocated (date=%d)!", dayoy);
fieldsFromVlist(vlistID2, vars2[dayoy], FIELD_VEC);
......@@ -109,7 +109,7 @@ Ydayarith(void *process)
tsID = 0;
while ((nrecs = cdoStreamInqTimestep(streamID1, tsID)))
{
const int dayoy = getDayOfYearIndex(taxisInqVdate(taxisID1));
const auto dayoy = getDayOfYearIndex(taxisInqVdate(taxisID1));
if (vars2[dayoy].size() == 0) cdoAbort("Day of year index %d not found (date=%d)!", dayoy);
taxisCopyTimestep(taxisID3, taxisID1);
......
......@@ -228,9 +228,7 @@ Ydaypctl(void *process)
}
for (int dayoy = 0; dayoy < MAX_DAYS; dayoy++)
{
if (vars1[dayoy].size()) hsetDestroy(hsets[dayoy]);
}
if (vars1[dayoy].size()) hsetDestroy(hsets[dayoy]);
cdoStreamClose(streamID4);
cdoStreamClose(streamID3);
......
......@@ -32,7 +32,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
......@@ -71,6 +70,23 @@ set_parameter(void)
}
}
static void
addOperators(void)
{
// clang-format off
cdoOperatorAdd("ydayrange", func_range, 0, nullptr);
cdoOperatorAdd("ydaymin", func_min, 0, nullptr);
cdoOperatorAdd("ydaymax", func_max, 0, nullptr);
cdoOperatorAdd("ydaysum", func_sum, 0, nullptr);
cdoOperatorAdd("ydaymean", func_mean, 0, nullptr);
cdoOperatorAdd("ydayavg", func_avg, 0, nullptr);
cdoOperatorAdd("ydayvar", func_var, 0, nullptr);
cdoOperatorAdd("ydayvar1", func_var1, 0, nullptr);
cdoOperatorAdd("ydaystd", func_std, 0, nullptr);
cdoOperatorAdd("ydaystd1", func_std1, 0, nullptr);
// clang-format on
}
void *
Ydaystat(void *process)
{
......@@ -86,17 +102,7 @@ Ydaystat(void *process)
set_parameter();
// clang-format off
cdoOperatorAdd("ydayrange", func_range, 0, nullptr);
cdoOperatorAdd("ydaymin", func_min, 0, nullptr);
cdoOperatorAdd("ydaymax", func_max, 0, nullptr);
cdoOperatorAdd("ydaysum", func_sum, 0, nullptr);
cdoOperatorAdd("ydaymean", func_mean, 0, nullptr);
cdoOperatorAdd("ydayavg", func_avg, 0, nullptr);
cdoOperatorAdd("ydayvar", func_var, 0, nullptr);
cdoOperatorAdd("ydayvar1", func_var1, 0, nullptr);
cdoOperatorAdd("ydaystd", func_std, 0, nullptr);
cdoOperatorAdd("ydaystd1", func_std1, 0, nullptr);
addOperators();
const auto operatorID = cdoOperatorID();
const auto operfunc = cdoOperatorF1(operatorID);
......@@ -106,7 +112,6 @@ Ydaystat(void *process)
const bool lstd = operfunc == func_std || operfunc == func_std1;
const bool lvarstd = operfunc == func_std || operfunc == func_var || operfunc == func_std1 || operfunc == func_var1;
const int divisor = operfunc == func_std1 || operfunc == func_var1;
// clang-format on
const bool lvars2 = lvarstd || lrange;
for (int dayoy = 0; dayoy < MAX_DOY; ++dayoy) dayoy_nsets[dayoy] = 0;
......
......@@ -298,9 +298,7 @@ Ydrunpctl(void *process)
}
for (int dayoy = 0; dayoy < MAX_DAYS; dayoy++)
{
if (vars2[dayoy].size()) hsetDestroy(hsets[dayoy]);
}
if (vars2[dayoy].size()) hsetDestroy(hsets[dayoy]);
cdoStreamClose(streamID4);
cdoStreamClose(streamID3);
......
......@@ -198,7 +198,7 @@ Ydrunstat(void *process)
const auto operfunc = cdoOperatorF1(operatorID);
operatorInputArg("number of timesteps");
const int ndates = parameter2int(cdoOperatorArgv(0));
const auto ndates = parameter2int(cdoOperatorArgv(0));
const bool lvarstd = operfunc == func_std || operfunc == func_var || operfunc == func_std1 || operfunc == func_var1;
......@@ -251,7 +251,7 @@ Ydrunstat(void *process)
recList[recID].lconst = vlistInqVarTimetype(vlistID1, varID) == TIME_CONSTANT;
}
Field &rvars1 = vars1[tsID][varID][levelID];
auto &rvars1 = vars1[tsID][varID][levelID];
cdoReadRecord(streamID1, rvars1.vec.data(), &rvars1.nmiss);
......@@ -304,7 +304,7 @@ Ydrunstat(void *process)
{
cdoInqRecord(streamID1, &varID, &levelID);
Field &rvars1 = vars1[ndates - 1][varID][levelID];
auto &rvars1 = vars1[ndates - 1][varID][levelID];
cdoReadRecord(streamID1, rvars1.vec.data(), &rvars1.nmiss);
......@@ -346,7 +346,7 @@ Ydrunstat(void *process)
const auto varID = recList[recID].varID;
const auto levelID = recList[recID].levelID;
Field &rvars1 = stats.vars1[dayoy][varID][levelID];
auto &rvars1 = stats.vars1[dayoy][varID][levelID];
cdoDefRecord(streamID2, varID, levelID);
cdoWriteRecord(streamID2, rvars1.vec.data(), rvars1.nmiss);
......
......@@ -24,7 +24,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
......
......@@ -26,7 +26,6 @@
#include <cdi.h>
#include "functs.h"
#include "process_int.h"
#include "cdo_vlist.h"
......
......@@ -43,7 +43,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
......
......@@ -30,7 +30,6 @@
#include <cdi.h>
#include "functs.h"
#include "process_int.h"
#include "cdo_vlist.h"
......@@ -66,20 +65,15 @@ notFound(bool isSeasonal, int mon, const char *seas_name[4])
cdoAbort("Month index %d not found!", mon);
}
void *
Ymonarith(void *process)
{
enum
enum
{
MONTHLY,
SEASONAL
};
int nrecs;
int varID, levelID;
const char *seas_name[4];
cdoInitialize(process);
static void
addOperators(void)
{
// clang-format off
cdoOperatorAdd("ymonadd", func_add, MONTHLY, nullptr);
cdoOperatorAdd("ymonsub", func_sub, MONTHLY, nullptr);
......@@ -90,17 +84,29 @@ Ymonarith(void *process)
cdoOperatorAdd("yseasmul", func_mul, SEASONAL, nullptr);
cdoOperatorAdd("yseasdiv", func_div, SEASONAL, nullptr);
// clang-format on
}
void *
Ymonarith(void *process)
{
int nrecs;
int varID, levelID;
const char *seas_name[4];
cdoInitialize(process);
addOperators();
const int operatorID = cdoOperatorID();
const int operfunc = cdoOperatorF1(operatorID);
const int opertype = cdoOperatorF2(operatorID);
const auto operatorID = cdoOperatorID();
const auto operfunc = cdoOperatorF1(operatorID);
const auto opertype = cdoOperatorF2(operatorID);
const auto streamID1 = cdoOpenRead(0);
const auto streamID2 = cdoOpenRead(1);
const int vlistID1 = cdoStreamInqVlist(streamID1);
const int vlistID2 = cdoStreamInqVlist(streamID2);
const int vlistID3 = vlistDuplicate(vlistID1);
const auto vlistID1 = cdoStreamInqVlist(streamID1);
const auto vlistID2 = cdoStreamInqVlist(streamID2);
const auto vlistID3 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
......@@ -113,9 +119,9 @@ Ymonarith(void *process)
field1.resize(gridsizemax);
field2.resize(gridsizemax);
const int taxisID1 = vlistInqTaxis(vlistID1);
const int taxisID2 = vlistInqTaxis(vlistID2);
const int taxisID3 = taxisDuplicate(taxisID1);
const auto taxisID1 = vlistInqTaxis(vlistID1);
const auto taxisID2 = vlistInqTaxis(vlistID2);
const auto taxisID3 = taxisDuplicate(taxisID1);
vlistDefTaxis(vlistID3, taxisID3);
const auto streamID3 = cdoOpenWrite(2);
......@@ -148,7 +154,7 @@ Ymonarith(void *process)
tsID = 0;
while ((nrecs = cdoStreamInqTimestep(streamID1, tsID)))
{
int mon = getMonthIndex(taxisInqVdate(taxisID1));
auto mon = getMonthIndex(taxisInqVdate(taxisID1));
if (opertype == SEASONAL) mon = month_to_season(mon + 1);
if (vars2[mon].size() == 0) notFound(opertype == SEASONAL, mon, seas_name);
......
......@@ -23,7 +23,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
......@@ -61,7 +60,7 @@ Ymonpctl(void *process)
cdoOperatorAdd("ymonpctl", func_pctl, 0, nullptr);
operatorInputArg("percentile number");
const double pn = parameter2double(cdoOperatorArgv(0));
const auto pn = parameter2double(cdoOperatorArgv(0));
percentile_check_number(pn);
for (month = 0; month < NMONTH; month++)
......@@ -74,29 +73,29 @@ Ymonpctl(void *process)
const auto streamID2 = cdoOpenRead(1);
const auto streamID3 = cdoOpenRead(2);
const int vlistID1 = cdoStreamInqVlist(streamID1);
const int vlistID2 = cdoStreamInqVlist(streamID2);
const int vlistID3 = cdoStreamInqVlist(streamID3);
const int vlistID4 = vlistDuplicate(vlistID1);
const auto vlistID1 = cdoStreamInqVlist(streamID1);
const auto vlistID2 = cdoStreamInqVlist(streamID2);
const auto vlistID3 = cdoStreamInqVlist(streamID3);
const auto vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
vlistCompare(vlistID1, vlistID3, CMP_ALL);
const int taxisID1 = vlistInqTaxis(vlistID1);
const int taxisID2 = vlistInqTaxis(vlistID2);
const int taxisID3 = vlistInqTaxis(vlistID3);
const auto taxisID1 = vlistInqTaxis(vlistID1);
const auto taxisID2 = vlistInqTaxis(vlistID2);
const auto taxisID3 = vlistInqTaxis(vlistID3);
/* TODO - check that time axes 2 and 3 are equal */
const int taxisID4 = taxisDuplicate(taxisID1);
const auto taxisID4 = taxisDuplicate(taxisID1);
if (taxisHasBounds(taxisID4)) taxisDeleteBounds(taxisID4);
vlistDefTaxis(vlistID4, taxisID4);
const auto streamID4 = cdoOpenWrite(3);
cdoDefVlist(streamID4, vlistID4);
const int nvars = vlistNvars(vlistID1);
const auto nvars = vlistNvars(vlistID1);
const int maxrecs = vlistNrecs(vlistID1);
const auto maxrecs = vlistNrecs(vlistID1);
std::vector<RecordInfo> recList(maxrecs);
const auto gridsizemax = vlistGridsizeMax(vlistID1);
......@@ -219,8 +218,8 @@ Ymonpctl(void *process)
{
if (otsID && recList[recID].lconst) continue;
const int varID = recList[recID].varID;
const int levelID = recList[recID].levelID;
const auto varID = recList[recID].varID;
const auto levelID = recList[recID].levelID;
cdoDefRecord(streamID4, varID, levelID);
cdoWriteRecord(streamID4, vars1[month][varID][levelID].vec.data(), vars1[month][varID][levelID].nmiss);
}
......@@ -229,12 +228,7 @@ Ymonpctl(void *process)
}
for (month = 0; month < NMONTH; month++)
{
if (vars1[month].size())
{
hsetDestroy(hsets[month]);
}
}
if (vars1[month].size()) hsetDestroy(hsets[month]);
cdoStreamClose(streamID4);
cdoStreamClose(streamID3);
......
......@@ -32,7 +32,6 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
......@@ -49,6 +48,23 @@ int compareInt(const void *a, const void *b)
}
*/
static void
addOperators(void)
{
// clang-format off
cdoOperatorAdd("ymonrange", func_range, 0, nullptr);
cdoOperatorAdd("ymonmin", func_min, 0, nullptr);
cdoOperatorAdd("ymonmax", func_max, 0, nullptr);
cdoOperatorAdd("ymonsum", func_sum, 0, nullptr);
cdoOperatorAdd("ymonmean", func_mean, 0, nullptr);
cdoOperatorAdd("ymonavg", func_avg, 0, nullptr);
cdoOperatorAdd("ymonvar", func_var, 0, nullptr);
cdoOperatorAdd("ymonvar1", func_var1, 0, nullptr);
cdoOperatorAdd("ymonstd", func_std, 0, nullptr);
cdoOperatorAdd("ymonstd1", func_std1, 0, nullptr);
// clang-format on
}
void *
Ymonstat(void *process)
{
......@@ -65,21 +81,12 @@ Ymonstat(void *process)
cdoInitialize(process);
// clang-format off
cdoOperatorAdd("ymonrange", func_range, 0, nullptr);
cdoOperatorAdd("ymonmin", func_min, 0, nullptr);
cdoOperatorAdd("ymonmax", func_max, 0, nullptr);
cdoOperatorAdd("ymonsum", func_sum, 0, nullptr);
cdoOperatorAdd("ymonmean", func_mean, 0, nullptr);
cdoOperatorAdd("ymonavg", func_avg, 0, nullptr);
cdoOperatorAdd("ymonvar", func_var, 0, nullptr);
cdoOperatorAdd("ymonvar1", func_var1, 0, nullptr);
cdoOperatorAdd("ymonstd", func_std, 0, nullptr);
cdoOperatorAdd("ymonstd1", func_std1, 0, nullptr);
addOperators();
const int operatorID = cdoOperatorID();
const int operfunc = cdoOperatorF1(operatorID);
const auto operatorID = cdoOperatorID();
const auto operfunc = cdoOperatorF1(operatorID);
// clang-format off
const bool lrange = operfunc == func_range;
const bool lmean = operfunc == func_mean || operfunc == func_avg;
const bool lstd = operfunc == func_std || operfunc == func_std1;
......@@ -92,18 +99,18 @@ Ymonstat(void *process)
const auto streamID1 = cdoOpenRead(0);
const int vlistID1 = cdoStreamInqVlist(streamID1);
const int vlistID2 = vlistDuplicate(vlistID1);
const auto vlistID1 = cdoStreamInqVlist(streamID1);
const auto vlistID2 = vlistDuplicate(vlistID1);
const int taxisID1 = vlistInqTaxis(vlistID1);
const int taxisID2 = taxisDuplicate(taxisID1);
const auto taxisID1 = vlistInqTaxis(vlistID1);
const auto taxisID2 = taxisDuplicate(taxisID1);
if (taxisHasBounds(taxisID2)) taxisDeleteBounds(taxisID2);
vlistDefTaxis(vlistID2, taxisID2);
const auto streamID2 = cdoOpenWrite(1);
cdoDefVlist(streamID2, vlistID2);
const int maxrecs = vlistNrecs(vlistID1);
const auto maxrecs = vlistNrecs(vlistID1);
std::vector<RecordInfo> recList(maxrecs);
const auto gridsizemax = vlistGridsizeMax(vlistID1);
......@@ -146,11 +153,11 @@ Ymonstat(void *process)
recList[recID].lconst = vlistInqVarTimetype(vlistID1, varID) == TIME_CONSTANT;
}
Field &rsamp1 = samp1[month][varID][levelID];
Field &rvars1 = vars1[month][varID][levelID];
auto &rsamp1 = samp1[month][varID][levelID];
auto &rvars1 = vars1[month][varID][levelID];
const int nsets = month_nsets[month];
const size_t fieldsize = rvars1.size;
const auto nsets = month_nsets[month];
const auto fieldsize = rvars1.size;
if (nsets == 0)
{
......@@ -205,8 +212,8 @@ Ymonstat(void *process)
{
if (recList[recID].lconst) continue;
const int varID = recList[recID].varID;
const int levelID = recList[recID].levelID;
const auto varID = recList[recID].varID;
const auto levelID = recList[recID].levelID;
vfarmoq(vars2[month][varID][levelID], vars1[month][varID][levelID]);
}
......@@ -252,10 +259,10 @@ Ymonstat(void *process)
{
if (recList[recID].lconst) continue;
const int varID = recList[recID].varID;
const int levelID = recList[recID].levelID;
Field &rsamp1 = samp1[month][varID][levelID];
Field &rvars1 = vars1[month][varID][levelID];
const auto varID = recList[recID].varID;
const auto levelID = recList[recID].levelID;
auto &rsamp1 = samp1[month][varID][levelID];
auto &rvars1 = vars1[month][varID][levelID];
if (lmean)
{
......@@ -266,7 +273,7 @@ Ymonstat(void *process)
}
else if (lvarstd)
{
Field &rvars2 = vars2[month][varID][levelID];
auto &rvars2 = vars2[month][varID][levelID];
if (!rsamp1.empty())
{
if (lstd)
......@@ -284,7 +291,7 @@ Ymonstat(void *process)
}
else if (lrange)
{
Field &rvars2 = vars2[month][varID][levelID];
auto &rvars2 = vars2[month][varID][levelID];
vfarsub(rvars1, rvars2);
}
}
......@@ -297,9 +304,9 @@ Ymonstat(void *process)
{
if (otsID && recList[recID].lconst) continue;
const int varID = recList[recID].varID;
const int levelID = recList[recID].levelID;
Field &rvars1 = vars1[month][varID][levelID];
const auto varID = recList[recID].varID;
const auto levelID = recList[recID].levelID;
auto &rvars1 = vars1[month][varID][levelID];
cdoDefRecord(streamID2, varID, levelID);
cdoWriteRecord(streamID2, rvars1.vec.data(), rvars1.nmiss);
......
......@@ -23,13 +23,11 @@
#include <cdi.h>
#include "cdo_options.h"
#include "functs.h"
#include "process_int.h"
#include "cdo_vlist.h"
#include "param_conversion.h"
#include "percentiles_hist.h"
#include "percentiles.h"
#include "cdo_season.h"
......@@ -65,7 +63,7 @@ Yseaspctl(void *process)
cdoOperatorAdd("yseaspctl", func_pctl, 0, nullptr);
operatorInputArg("percentile number");
const double pn = parameter2double(cdoOperatorArgv(0));
const auto pn = parameter2double(cdoOperatorArgv(0));
percentile_check_number(pn);
for (seas = 0; seas < NSEAS; seas++)
......@@ -82,29 +80,29 @@ Yseaspctl(void *process)
const auto streamID2 = cdoOpenRead(1);
const auto streamID3 = cdoOpenRead(2);
const int vlistID1 = cdoStreamInqVlist(streamID1);
const int vlistID2 = cdoStreamInqVlist(streamID2);
const int vlistID3 = cdoStreamInqVlist(streamID3);
const int vlistID4 = vlistDuplicate(vlistID1);
const auto vlistID1 = cdoStreamInqVlist(streamID1);
const auto vlistID2 = cdoStreamInqVlist(streamID2);
const auto vlistID3 = cdoStreamInqVlist(streamID3);
const auto vlistID4 = vlistDuplicate(vlistID1);
vlistCompare(vlistID1, vlistID2, CMP_ALL);
vlistCompare(vlistID1, vlistID3, CMP_ALL);
const int taxisID1 = vlistInqTaxis(vlistID1);
const int taxisID2 = vlistInqTaxis(vlistID2);
const int taxisID3 = vlistInqTaxis(vlistID3);
const auto taxisID1 = vlistInqTaxis(vlistID1);
const auto taxisID2 = vlistInqTaxis(vlistID2);
const auto taxisID3 = vlistInqTaxis(vlistID3);
/* TODO - check that time axes 2 and 3 are equal */
const int taxisID4 = taxisDuplicate(taxisID1);
const auto taxisID4 = taxisDuplicate(taxisID1);
if (taxisHasBounds(taxisID4)) taxisDeleteBounds(taxisID4);
vlistDefTaxis(vlistID4, taxisID4);
const auto streamID4 = cdoOpenWrite(3);
cdoDefVlist(streamID4, vlistID4);
const int nvars = vlistNvars(vlistID1);
const auto nvars = vlistNvars(vlistID1);
const int maxrecs = vlistNrecs(vlistID1);
const auto maxrecs = vlistNrecs(vlistID1);
std::vector<RecordInfo> recList(maxrecs);
const auto gridsizemax = vlistGridsizeMax(vlistID1);
......@@ -128,7 +126,7 @@ Yseaspctl(void *process)
cdiDecodeDate(vdate, &year, &month, &day);
const int seas = month_to_season(month);
const auto seas = month_to_season(month);
set_date(vdate, vtime, &datetime2[seas]);
......@@ -175,7 +173,7 @@ Yseaspctl(void *process)
cdiDecodeDate(vdate, &year, &month, &day);
if (month < 0 || month > 16) cdoAbort("Month %d out of range!", month);
const int seas = month_to_season(month);
const auto seas = month_to_season(month);
set_date(vdate, vtime, &datetime1[seas]);
......@@ -214,7 +212,7 @@ Yseaspctl(void *process)
{
if (vlistInqVarTimetype(vlistID1, varID) == TIME_CONSTANT) continue;
const int nlevels = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
const auto nlevels = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
for (levelID = 0; levelID < nlevels; levelID++)
hsetGetVarLevelPercentiles(&vars1[seas][varID][levelID], hsets[seas], varID, levelID, pn);
}
......@@ -227,8 +225,8 @@ Yseaspctl(void *process)
{
if (otsID && recList[recID].lconst) continue;
const int varID = recList[recID].varID;