Skip to content

Commit

Permalink
out of period mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gantolini committed Feb 20, 2024
1 parent 6b672f2 commit e71981e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/frostForecast/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ int main(int argc, char *argv[])
QString runDateStr;
Frost frost;
bool calibrateModel = false;
bool outofperiod = false;

if (argc <= 2)
{
Expand Down Expand Up @@ -47,6 +48,8 @@ int main(int argc, char *argv[])

if (strcmp(argv[2], "-calibrate") == 0)
calibrateModel = true;
else if(strcmp(argv[2], "-outofperiod") == 0)
outofperiod = true;
else
runDateStr = argv[2];
}
Expand Down Expand Up @@ -79,6 +82,16 @@ int main(int argc, char *argv[])

if (calibrationOk) frost.saveParameters();
}
else if (outofperiod)
{
result = frost.readParameters();
if (result != FROSTFORECAST_OK) return result;

QList<QString> idList = frost.getIdList();

result = frost.createPointsJsonFile(idList);
if (result != FROSTFORECAST_OK) return result;
}
else
{
// check date
Expand Down

0 comments on commit e71981e

Please sign in to comment.