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

Renamed get_season_name() to getSeasonName().

parent 61208030
...@@ -41,7 +41,7 @@ Seascount(void *process) ...@@ -41,7 +41,7 @@ Seascount(void *process)
cdoOperatorAdd("seascount", 0, 0, nullptr); cdoOperatorAdd("seascount", 0, 0, nullptr);
const int season_start = get_season_start(); const int season_start = getSeasonStart();
const auto streamID1 = cdoOpenRead(0); const auto streamID1 = cdoOpenRead(0);
......
...@@ -52,7 +52,7 @@ Seaspctl(void *process) ...@@ -52,7 +52,7 @@ Seaspctl(void *process)
const auto pn = parameter2double(cdoOperatorArgv(0)); const auto pn = parameter2double(cdoOperatorArgv(0));
percentile_check_number(pn); percentile_check_number(pn);
season_start = get_season_start(); season_start = getSeasonStart();
const auto streamID1 = cdoOpenRead(0); const auto streamID1 = cdoOpenRead(0);
const auto streamID2 = cdoOpenRead(1); const auto streamID2 = cdoOpenRead(1);
......
...@@ -78,8 +78,8 @@ Seasstat(void *process) ...@@ -78,8 +78,8 @@ Seasstat(void *process)
// clang-format on // clang-format on
const bool lvars2 = lvarstd || lrange; const bool lvars2 = lvarstd || lrange;
const auto season_start = get_season_start(); const auto season_start = getSeasonStart();
get_season_name(seas_name); getSeasonName(seas_name);
const auto streamID1 = cdoOpenRead(0); const auto streamID1 = cdoOpenRead(0);
......
...@@ -91,7 +91,7 @@ Splittime(void *process) ...@@ -91,7 +91,7 @@ Splittime(void *process)
if (operatorID == SPLITMON && operatorArgc() == 1) format = cdoOperatorArgv(0).c_str(); if (operatorID == SPLITMON && operatorArgc() == 1) format = cdoOperatorArgv(0).c_str();
const char *seas_name[4]; const char *seas_name[4];
get_season_name(seas_name); getSeasonName(seas_name);
for (int i = 0; i < MAX_STREAMS; i++) streamIDs[i] = CDO_STREAM_UNDEF; for (int i = 0; i < MAX_STREAMS; i++) streamIDs[i] = CDO_STREAM_UNDEF;
for (int i = 0; i < MAX_STREAMS; i++) tsIDs[i] = 0; for (int i = 0; i < MAX_STREAMS; i++) tsIDs[i] = 0;
......
...@@ -127,7 +127,7 @@ Ymonarith(void *process) ...@@ -127,7 +127,7 @@ Ymonarith(void *process)
const auto streamID3 = cdoOpenWrite(2); const auto streamID3 = cdoOpenWrite(2);
cdoDefVlist(streamID3, vlistID3); cdoDefVlist(streamID3, vlistID3);
if (opertype == SEASONAL) get_season_name(seas_name); if (opertype == SEASONAL) getSeasonName(seas_name);
FieldVector2D vars2[MaxMonths]; FieldVector2D vars2[MaxMonths];
......
...@@ -11,7 +11,7 @@ const char *seas_name_jan[4] = { "JFM", "AMJ", "JAS", "OND" }; ...@@ -11,7 +11,7 @@ const char *seas_name_jan[4] = { "JFM", "AMJ", "JAS", "OND" };
static int season_start = START_DEC; static int season_start = START_DEC;
int int
get_season_start(void) getSeasonStart(void)
{ {
static bool lgetenv = true; static bool lgetenv = true;
...@@ -41,9 +41,9 @@ get_season_start(void) ...@@ -41,9 +41,9 @@ get_season_start(void)
} }
void void
get_season_name(const char *seas_name[]) getSeasonName(const char *seas_name[])
{ {
if (get_season_start() == START_DEC) if (getSeasonStart() == START_DEC)
for (int i = 0; i < 4; ++i) seas_name[i] = seas_name_dec[i]; for (int i = 0; i < 4; ++i) seas_name[i] = seas_name_dec[i];
else else
for (int i = 0; i < 4; ++i) seas_name[i] = seas_name_jan[i]; for (int i = 0; i < 4; ++i) seas_name[i] = seas_name_jan[i];
...@@ -52,7 +52,7 @@ get_season_name(const char *seas_name[]) ...@@ -52,7 +52,7 @@ get_season_name(const char *seas_name[])
int int
monthToSeason(int month) monthToSeason(int month)
{ {
int season_start = get_season_start(); int season_start = getSeasonStart();
int seas = -1; int seas = -1;
if (month < 0 || month > 16) cdoAbort("Month %d out of range!", month); if (month < 0 || month > 16) cdoAbort("Month %d out of range!", month);
......
...@@ -4,8 +4,8 @@ enum ...@@ -4,8 +4,8 @@ enum
START_JAN START_JAN
}; };
int get_season_start(void); int getSeasonStart(void);
void get_season_name(const char *seas_name[]); void getSeasonName(const char *seas_name[]);
int monthToSeason(int month); int monthToSeason(int month);
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