@@ -63,9 +63,11 @@ void Crit1DProject::initialize()
63
63
lastSimulationDate = QDate (1800 ,1 ,1 );
64
64
65
65
outputString = " " ;
66
+
66
67
// specific outputs
67
68
waterDeficitDepth.clear ();
68
69
waterContentDepth.clear ();
70
+ degreeOfSaturationDepth.clear ();
69
71
waterPotentialDepth.clear ();
70
72
availableWaterDepth.clear ();
71
73
fractionAvailableWaterDepth.clear ();
@@ -257,6 +259,12 @@ bool Crit1DProject::readSettings()
257
259
projectError = " Wrong water content depth in " + configFileName;
258
260
return false ;
259
261
}
262
+ depthList = projectSettings->value (" degreeOfSaturation" ).toStringList ();
263
+ if (! setVariableDepth (depthList, degreeOfSaturationDepth))
264
+ {
265
+ projectError = " Wrong degree of saturation depth in " + configFileName;
266
+ return false ;
267
+ }
260
268
depthList = projectSettings->value (" waterPotential" ).toStringList ();
261
269
if (! setVariableDepth (depthList, waterPotentialDepth))
262
270
{
@@ -1544,7 +1552,12 @@ bool Crit1DProject::createOutputTable(QString &myError)
1544
1552
// specific depth variables
1545
1553
for (unsigned int i = 0 ; i < waterContentDepth.size (); i++)
1546
1554
{
1547
- QString fieldName = " SWC_" + QString::number (waterContentDepth[i]);
1555
+ QString fieldName = " VWC_" + QString::number (waterContentDepth[i]);
1556
+ queryString += " , " + fieldName + " REAL" ;
1557
+ }
1558
+ for (unsigned int i = 0 ; i < degreeOfSaturationDepth.size (); i++)
1559
+ {
1560
+ QString fieldName = " DEGSAT_" + QString::number (degreeOfSaturationDepth[i]);
1548
1561
queryString += " , " + fieldName + " REAL" ;
1549
1562
}
1550
1563
for (unsigned int i = 0 ; i < waterPotentialDepth.size (); i++)
@@ -1604,7 +1617,12 @@ void Crit1DProject::updateOutput(Crit3DDate myDate, bool isFirst)
1604
1617
// specific depth variables
1605
1618
for (unsigned int i = 0 ; i < waterContentDepth.size (); i++)
1606
1619
{
1607
- QString fieldName = " SWC_" + QString::number (waterContentDepth[i]);
1620
+ QString fieldName = " VWC_" + QString::number (waterContentDepth[i]);
1621
+ outputString += " , " + fieldName;
1622
+ }
1623
+ for (unsigned int i = 0 ; i < degreeOfSaturationDepth.size (); i++)
1624
+ {
1625
+ QString fieldName = " DEGSAT_" + QString::number (degreeOfSaturationDepth[i]);
1608
1626
outputString += " , " + fieldName;
1609
1627
}
1610
1628
for (unsigned int i = 0 ; i < waterPotentialDepth.size (); i++)
@@ -1669,7 +1687,11 @@ void Crit1DProject::updateOutput(Crit3DDate myDate, bool isFirst)
1669
1687
// specific depth variables
1670
1688
for (unsigned int i = 0 ; i < waterContentDepth.size (); i++)
1671
1689
{
1672
- outputString += " ," + QString::number (myCase.getWaterContent (waterContentDepth[i]), ' g' , 4 );
1690
+ outputString += " ," + QString::number (myCase.getVolumetricWaterContent (waterContentDepth[i]), ' g' , 4 );
1691
+ }
1692
+ for (unsigned int i = 0 ; i < degreeOfSaturationDepth.size (); i++)
1693
+ {
1694
+ outputString += " ," + QString::number (myCase.getDegreeOfSaturation (degreeOfSaturationDepth[i]), ' g' , 4 );
1673
1695
}
1674
1696
for (unsigned int i = 0 ; i < waterPotentialDepth.size (); i++)
1675
1697
{
0 commit comments