Commit f42d2354 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed struct Control to AfterControl.

parent ba6b5165
...@@ -61,7 +61,7 @@ struct RARG ...@@ -61,7 +61,7 @@ struct RARG
{ {
int lana, nrecs; int lana, nrecs;
struct Variable *vars; struct Variable *vars;
struct Control *globs; AfterControl *globs;
}; };
cdo::Task *afterReadTask = nullptr; cdo::Task *afterReadTask = nullptr;
...@@ -132,7 +132,7 @@ FreeMean(struct Variable *vars) ...@@ -132,7 +132,7 @@ FreeMean(struct Variable *vars)
} }
static void static void
after_PostProcess(struct Control *globs) after_PostProcess(AfterControl *globs)
{ {
if (globs->EndOfInterval) if (globs->EndOfInterval)
{ {
...@@ -161,7 +161,7 @@ after_PostProcess(struct Control *globs) ...@@ -161,7 +161,7 @@ after_PostProcess(struct Control *globs)
/* switch input file */ /* switch input file */
/* ================= */ /* ================= */
static void static void
after_SwitchFile(struct Control *globs) after_SwitchFile(AfterControl *globs)
{ {
bool echam4 = false; bool echam4 = false;
int n; int n;
...@@ -349,7 +349,7 @@ after_printProcessStatus(int tsID) ...@@ -349,7 +349,7 @@ after_printProcessStatus(int tsID)
} }
static int static int
after_setNextDate(struct Control *globs) after_setNextDate(AfterControl *globs)
{ {
int nrecs = 0; int nrecs = 0;
...@@ -480,7 +480,7 @@ after_readTimestep(void *arg) ...@@ -480,7 +480,7 @@ after_readTimestep(void *arg)
} }
static void static void
after_defineNextTimestep(struct Control *globs) after_defineNextTimestep(AfterControl *globs)
{ {
static int otsID = 0; static int otsID = 0;
const auto vdate = after_getDate(globs->OldDate); const auto vdate = after_getDate(globs->OldDate);
...@@ -505,7 +505,7 @@ after_defineNextTimestep(struct Control *globs) ...@@ -505,7 +505,7 @@ after_defineNextTimestep(struct Control *globs)
} }
static void static void
after_setEndOfInterval(struct Control *globs, int nrecs) after_setEndOfInterval(AfterControl *globs, int nrecs)
{ {
if (nrecs == 0) if (nrecs == 0)
{ {
...@@ -592,7 +592,7 @@ after_check_content(struct Variable *vars, int timestep) ...@@ -592,7 +592,7 @@ after_check_content(struct Variable *vars, int timestep)
} }
static void static void
after_control(struct Control *globs, struct Variable *vars) after_control(AfterControl *globs, struct Variable *vars)
{ {
int i; int i;
int nrecs = 0; int nrecs = 0;
...@@ -726,7 +726,7 @@ after_control(struct Control *globs, struct Variable *vars) ...@@ -726,7 +726,7 @@ after_control(struct Control *globs, struct Variable *vars)
} }
static void static void
after_setLevel(struct Control *globs) after_setLevel(AfterControl *globs)
{ {
int k, l, found; int k, l, found;
bool removeLevel[MaxLevel]; bool removeLevel[MaxLevel];
...@@ -884,7 +884,7 @@ after_setLevel(struct Control *globs) ...@@ -884,7 +884,7 @@ after_setLevel(struct Control *globs)
} }
static void static void
after_defineLevel(struct Control *globs, struct Variable *vars) after_defineLevel(AfterControl *globs, struct Variable *vars)
{ {
int code, i; int code, i;
...@@ -980,7 +980,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars) ...@@ -980,7 +980,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
} }
static void static void
after_defineGrid(struct Control *globs, struct Variable *vars) after_defineGrid(AfterControl *globs, struct Variable *vars)
{ {
int ogridID = -1; int ogridID = -1;
int code; int code;
...@@ -1071,7 +1071,7 @@ after_defineGrid(struct Control *globs, struct Variable *vars) ...@@ -1071,7 +1071,7 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
} }
static void static void
after_setCodes(struct Control *globs, struct Variable *vars, int maxCodes, int numCodes) after_setCodes(AfterControl *globs, struct Variable *vars, int maxCodes, int numCodes)
{ {
if (globs->Verbose) lprintf(stdout); if (globs->Verbose) lprintf(stdout);
...@@ -1137,7 +1137,7 @@ after_setCodes(struct Control *globs, struct Variable *vars, int maxCodes, int n ...@@ -1137,7 +1137,7 @@ after_setCodes(struct Control *globs, struct Variable *vars, int maxCodes, int n
} }
static void static void
after_checkNamelist(struct Control *globs) after_checkNamelist(AfterControl *globs)
{ {
if (globs->Mean && globs->Type < 20) afterAbort("Mean is only available for TYPE >= 20!"); if (globs->Mean && globs->Type < 20) afterAbort("Mean is only available for TYPE >= 20!");
...@@ -1149,7 +1149,7 @@ after_checkNamelist(struct Control *globs) ...@@ -1149,7 +1149,7 @@ after_checkNamelist(struct Control *globs)
} }
static void static void
after_parini(struct Control *globs, struct Variable *vars) after_parini(AfterControl *globs, struct Variable *vars)
{ {
char namelist[65536]; char namelist[65536];
...@@ -1261,7 +1261,7 @@ after_parini(struct Control *globs, struct Variable *vars) ...@@ -1261,7 +1261,7 @@ after_parini(struct Control *globs, struct Variable *vars)
} }
static void static void
after_dimcalc(struct Control *globs) after_dimcalc(AfterControl *globs)
{ {
if (globs->AnalysisData) globs->NumLevel = globs->NumLevelRequest; if (globs->AnalysisData) globs->NumLevel = globs->NumLevelRequest;
...@@ -1305,7 +1305,7 @@ after_dimcalc(struct Control *globs) ...@@ -1305,7 +1305,7 @@ after_dimcalc(struct Control *globs)
/* Extract basic dimension information */ /* Extract basic dimension information */
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
static void static void
after_precntl(struct Control *globs, struct Variable *vars) after_precntl(AfterControl *globs, struct Variable *vars)
{ {
int l; int l;
int varID; int varID;
...@@ -1534,7 +1534,7 @@ after_precntl(struct Control *globs, struct Variable *vars) ...@@ -1534,7 +1534,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
* ----------------------------------------------------------- * -----------------------------------------------------------
*/ */
static void static void
after_postcntl(struct Control *globs, struct Variable *vars) after_postcntl(AfterControl *globs, struct Variable *vars)
{ {
int code = 0; int code = 0;
char name[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME]; char name[CDI_MAX_NAME], longname[CDI_MAX_NAME], units[CDI_MAX_NAME];
...@@ -1657,7 +1657,7 @@ after_postcntl(struct Control *globs, struct Variable *vars) ...@@ -1657,7 +1657,7 @@ after_postcntl(struct Control *globs, struct Variable *vars)
} }
static void static void
after_readVct(struct Control *globs, const char *vctfile) after_readVct(AfterControl *globs, const char *vctfile)
{ {
char line[1024]; char line[1024];
int nlines = 0; int nlines = 0;
...@@ -1693,7 +1693,7 @@ after_readVct(struct Control *globs, const char *vctfile) ...@@ -1693,7 +1693,7 @@ after_readVct(struct Control *globs, const char *vctfile)
} }
static void static void
after_control_init(struct Control *globs) after_control_init(AfterControl *globs)
{ {
globs->AnalysisData = 0; // 0 = ECHAM Data, 1 = ECMWF Spectral Analyses globs->AnalysisData = 0; // 0 = ECHAM Data, 1 = ECMWF Spectral Analyses
globs->DayIn = 0; // day increment of infiles if Multi = true globs->DayIn = 0; // day increment of infiles if Multi = true
...@@ -1727,7 +1727,7 @@ after_variable_init(struct Variable *vars) ...@@ -1727,7 +1727,7 @@ after_variable_init(struct Variable *vars)
} }
static void static void
after_processing(struct Control *globs, struct Variable *vars) after_processing(AfterControl *globs, struct Variable *vars)
{ {
globs->istreamID = streamOpenReadLocked(ifile); globs->istreamID = streamOpenReadLocked(ifile);
...@@ -1878,7 +1878,7 @@ Afterburner(void *process) ...@@ -1878,7 +1878,7 @@ Afterburner(void *process)
lstdout = !Options::silentMode; lstdout = !Options::silentMode;
struct Control globs = {}; AfterControl globs = {};
after_control_init(&globs); after_control_init(&globs);
globs.Verbose = Options::cdoVerbose; globs.Verbose = Options::cdoVerbose;
......
...@@ -46,7 +46,7 @@ struct Date ...@@ -46,7 +46,7 @@ struct Date
int mn; int mn;
}; };
struct Control struct AfterControl
{ {
int Verbose; int Verbose;
...@@ -218,27 +218,27 @@ struct Variable ...@@ -218,27 +218,27 @@ struct Variable
void after_read_vct(const char *vctfile, double **vct, int *nvct); void after_read_vct(const char *vctfile, double **vct, int *nvct);
void after_gp2sp(struct Control *globs, struct Variable *vars, int ccode); void after_gp2sp(AfterControl *globs, struct Variable *vars, int ccode);
void after_GP2FC(double *gp, double *fc, long nlat, long nlon, long nlev, long nfc); void after_GP2FC(double *gp, double *fc, long nlat, long nlon, long nlev, long nfc);
void after_FC2GP(double *fc, double *gp, long nlat, long nlon, long nlev, long nfc); void after_FC2GP(double *fc, double *gp, long nlat, long nlon, long nlev, long nfc);
void after_FCrh2FCsh(struct Control *globs, struct Variable *vars); void after_FCrh2FCsh(AfterControl *globs, struct Variable *vars);
void after_SPuv2SPdv(struct Control *globs, struct Variable *vars); void after_SPuv2SPdv(AfterControl *globs, struct Variable *vars);
void after_FCsh2FCrh(struct Control *globs, struct Variable *vars); void after_FCsh2FCrh(AfterControl *globs, struct Variable *vars);
void after_EchamCompGP(struct Control *globs, struct Variable *vars); void after_EchamCompGP(AfterControl *globs, struct Variable *vars);
void after_processPL(struct Control *globs, struct Variable *vars); void after_processPL(AfterControl *globs, struct Variable *vars);
void after_processML(struct Control *globs, struct Variable *vars); void after_processML(AfterControl *globs, struct Variable *vars);
void after_AnalysisAddRecord(struct Control *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, void after_AnalysisAddRecord(AfterControl *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID,
size_t nmiss); size_t nmiss);
double *after_get_dataptr(struct Variable *vars, int code, int gridID, int zaxisID, int levelID); double *after_get_dataptr(struct Variable *vars, int code, int gridID, int zaxisID, int levelID);
void after_EchamAddRecord(struct Control *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, void after_EchamAddRecord(AfterControl *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID,
size_t nmiss); size_t nmiss);
void after_AnalysisDependencies(struct Variable *vars, int ncodes); void after_AnalysisDependencies(struct Variable *vars, int ncodes);
void after_EchamDependencies(struct Variable *vars, int ncodes, int type, int source); void after_EchamDependencies(struct Variable *vars, int ncodes, int type, int source);
void after_legini_setup(struct Control *globs, struct Variable *vars); void after_legini_setup(AfterControl *globs, struct Variable *vars);
template <typename... Args> template <typename... Args>
void void
......
...@@ -230,7 +230,7 @@ after_read_vct(const char *vctfile, double **vct, int *nvct) ...@@ -230,7 +230,7 @@ after_read_vct(const char *vctfile, double **vct, int *nvct)
} }
void void
after_gp2sp(struct Control *globs, struct Variable *vars, int ccode) after_gp2sp(AfterControl *globs, struct Variable *vars, int ccode)
{ {
struct Variable *var = &vars[ccode]; struct Variable *var = &vars[ccode];
...@@ -397,7 +397,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, double *lev ...@@ -397,7 +397,7 @@ rh2sh(double *sphum, double *rhum, double *t, int lev, int dimgpout, double *lev
} }
void void
after_FCrh2FCsh(struct Control *globs, struct Variable *vars) after_FCrh2FCsh(AfterControl *globs, struct Variable *vars)
{ {
const long fieldSize = globs->DimGP * globs->NumLevelRequest; const long fieldSize = globs->DimGP * globs->NumLevelRequest;
...@@ -422,7 +422,7 @@ after_FCrh2FCsh(struct Control *globs, struct Variable *vars) ...@@ -422,7 +422,7 @@ after_FCrh2FCsh(struct Control *globs, struct Variable *vars)
} }
void void
after_SPuv2SPdv(struct Control *globs, struct Variable *vars) after_SPuv2SPdv(AfterControl *globs, struct Variable *vars)
{ {
double *Div, *DivOut, *Vor, *VorOut; double *Div, *DivOut, *Vor, *VorOut;
...@@ -455,7 +455,7 @@ after_SPuv2SPdv(struct Control *globs, struct Variable *vars) ...@@ -455,7 +455,7 @@ after_SPuv2SPdv(struct Control *globs, struct Variable *vars)
} }
void void
after_FCsh2FCrh(struct Control *globs, struct Variable *vars) after_FCsh2FCrh(AfterControl *globs, struct Variable *vars)
{ {
const long fieldSize = globs->DimGP * globs->NumLevelRequest; const long fieldSize = globs->DimGP * globs->NumLevelRequest;
...@@ -494,7 +494,7 @@ CheckAnalyses(struct Variable *vars) ...@@ -494,7 +494,7 @@ CheckAnalyses(struct Variable *vars)
/* Process Pressure Level data */ /* Process Pressure Level data */
void void
after_processPL(struct Control *globs, struct Variable *vars) after_processPL(AfterControl *globs, struct Variable *vars)
{ {
int code, l; int code, l;
long fieldSize; long fieldSize;
...@@ -1105,7 +1105,7 @@ LayerCloud(double *cc, double *ll, double pmax, double pmin, int DimGP, int Half ...@@ -1105,7 +1105,7 @@ LayerCloud(double *cc, double *ll, double pmax, double pmin, int DimGP, int Half
/* Grid Point Computations */ /* Grid Point Computations */
void void
after_EchamCompGP(struct Control *globs, struct Variable *vars) after_EchamCompGP(AfterControl *globs, struct Variable *vars)
{ {
if (vars[GEOPOTHEIGHT].comp || vars[SLP].comp || vars[THETAF].needed || vars[HALF_PRESS].needed || vars[RHUMIDITY].comp if (vars[GEOPOTHEIGHT].comp || vars[SLP].comp || vars[THETAF].needed || vars[HALF_PRESS].needed || vars[RHUMIDITY].comp
|| vars[OMEGA].comp || globs->Type >= 30) || vars[OMEGA].comp || globs->Type >= 30)
...@@ -1476,7 +1476,7 @@ Derivate(double field[], double derilam[], int levels, int Waves, int Latitudes, ...@@ -1476,7 +1476,7 @@ Derivate(double field[], double derilam[], int levels, int Waves, int Latitudes,
/* Process Model Level data */ /* Process Model Level data */
void void
after_processML(struct Control *globs, struct Variable *vars) after_processML(AfterControl *globs, struct Variable *vars)
{ {
int code, l, i; int code, l, i;
long fieldSize = 0; long fieldSize = 0;
...@@ -2280,7 +2280,7 @@ after_processML(struct Control *globs, struct Variable *vars) ...@@ -2280,7 +2280,7 @@ after_processML(struct Control *globs, struct Variable *vars)
} }
void void
after_AnalysisAddRecord(struct Control *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, size_t nmiss) after_AnalysisAddRecord(AfterControl *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, size_t nmiss)
{ {
size_t fieldSize; size_t fieldSize;
int truncation; int truncation;
...@@ -2381,7 +2381,7 @@ after_get_dataptr(struct Variable *vars, int code, int gridID, int zaxisID, int ...@@ -2381,7 +2381,7 @@ after_get_dataptr(struct Variable *vars, int code, int gridID, int zaxisID, int
} }
void void
after_EchamAddRecord(struct Control *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, size_t nmiss) after_EchamAddRecord(AfterControl *globs, struct Variable *vars, int code, int gridID, int zaxisID, int levelID, size_t nmiss)
{ {
auto gridtype = gridInqType(gridID); auto gridtype = gridInqType(gridID);
auto leveltype = zaxisInqType(zaxisID); auto leveltype = zaxisInqType(zaxisID);
...@@ -2691,7 +2691,7 @@ void after_legini_full(long ntr, long nlat, double *restrict poli, double *restr ...@@ -2691,7 +2691,7 @@ void after_legini_full(long ntr, long nlat, double *restrict poli, double *restr
void after_legini(long ntr, long nlat, double *restrict poli, double *restrict pold, double *restrict coslat); void after_legini(long ntr, long nlat, double *restrict poli, double *restrict pold, double *restrict coslat);
void void
after_legini_setup(struct Control *globs, struct Variable *vars) after_legini_setup(AfterControl *globs, struct Variable *vars)
{ {
long ntr = globs->Truncation; long ntr = globs->Truncation;
long nlat = globs->Latitudes; long nlat = globs->Latitudes;
......
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