Skip to content

Commit

Permalink
add isClimateOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Feb 19, 2024
1 parent ee0cb55 commit 0eb53a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions criteriaModel/criteria1DProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1566,8 +1566,7 @@ bool Crit1DProject::createOutputTable(QString &myError)
if (isClimateOutput)
{
queryString = "CREATE TABLE '" + myCase.unit.idCase + "'"
+ " ( DATE TEXT, PREC REAL, IRRIGATION REAL,"
+ " AVAILABLE_WATER REAL, FRACTION_AW REAL,"
+ " ( DATE TEXT, AVAILABLE_WATER REAL,"
+ " TRANSP_MAX, TRANSP REAL";
}
else
Expand Down Expand Up @@ -1643,8 +1642,7 @@ void Crit1DProject::updateOutput(Crit3DDate myDate, bool isFirst)
if (isClimateOutput)
{
outputString = "INSERT INTO '" + myCase.unit.idCase + "'"
+ " (DATE, PREC, IRRIGATION,"
+ " AVAILABLE_WATER, FRACTION_AW,"
+ " (DATE, AVAILABLE_WATER,"
+ " TRANSP_MAX, TRANSP";
}
else
Expand Down Expand Up @@ -1708,10 +1706,7 @@ void Crit1DProject::updateOutput(Crit3DDate myDate, bool isFirst)
if (isClimateOutput)
{
outputString += "('" + QString::fromStdString(myDate.toStdString()) + "'"
+ "," + QString::number(myCase.output.dailyPrec)
+ "," + QString::number(myCase.output.dailyIrrigation)
+ "," + QString::number(myCase.output.dailyAvailableWater, 'g', 4)
+ "," + QString::number(myCase.output.dailyFractionAW, 'g', 3)
+ "," + QString::number(myCase.output.dailyMaxTranspiration, 'g', 3)
+ "," + QString::number(myCase.output.dailyTranspiration, 'g', 3);
}
Expand Down

0 comments on commit 0eb53a4

Please sign in to comment.