Skip to content

Commit

Permalink
update 1D
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Dec 19, 2024
1 parent cb08f53 commit a407616
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion criteria1DWidget/tabWaterContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void TabWaterContent::computeWaterContent(Crit1DCase &myCase, int firstYear, int
{
if (isVolumetricWaterContent)
{
waterContent = myCase.soilLayers[i].getVolumetricWaterContent();
waterContent = myCase.soilLayers[i].getVolumetricWaterContent() * myCase.soilLayers[i].soilFraction;
maxWaterContent = MAXVALUE(waterContent, maxWaterContent);
}
else
Expand Down
2 changes: 1 addition & 1 deletion criteriaModel/criteria1DCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ double Crit1DCase::getTotalWaterContent()
*/
double Crit1DCase::getVolumetricWaterContent(double computationDepth)
{
computationDepth /= 100; // [cm] --> [m]
computationDepth /= 100.; // [cm] --> [m]

if (computationDepth <= 0 || computationDepth > mySoil.totalDepth)
return NODATA;
Expand Down
6 changes: 3 additions & 3 deletions soil/soil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ namespace soil
critical = FC;

// hygroscopic humidity
double hygroscopicHumidity = -2000; // [kPa]
double volWaterContentHH = soil::thetaFromSignPsi(hygroscopicHumidity, *horizonPtr); // [m3 m-3]
double hygroHumPotential = -2000; // [kPa]
double volWaterContentHH = soil::thetaFromSignPsi(hygroHumPotential, *horizonPtr); // [m3 m-3]
HH = volWaterContentHH * soilFraction * thickness * 1000.; // [mm]

return true;
Expand Down Expand Up @@ -715,7 +715,7 @@ namespace soil


/*!
* \brief return current volumetric water content [-]
* \brief return current volumetric water content (soil fraction) [-]
*/
double Crit1DLayer::getVolumetricWaterContent()
{
Expand Down

0 comments on commit a407616

Please sign in to comment.