Skip to content

Commit

Permalink
correction fSL
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcaceres committed Jun 12, 2024
1 parent 3453a72 commit d53cbbc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lightextinction_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ NumericVector layerSunlitFraction(NumericMatrix LAIme, NumericMatrix LAImd,
s2 += kb[j]*ClumpingIndex[j]*0.5*(LAIme(i,j)+LAImd(i,j));
}
fSL[i] = exp(-1.0*s1)*exp(-1.0*s2);
if(fSL[i]<0.00001) fSL[i] = 0.0; //Avoids overestimation of absorbed radiation per leaf area when sunlit fraction is close to zero
}
return(fSL);
}
Expand Down
1 change: 1 addition & 0 deletions src/spwb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ List spwbDay_advanced(List x, NumericVector meteovec,
_["ShadeLeaves"] = transp["ShadeLeaves"],
_["ExtractionInst"] = soilLayerExtractInst,
_["PlantsInst"] = PlantsInst,
_["RadiationInputInst"] = transp["RadiationInputInst"],
_["SunlitLeavesInst"] = transp["SunlitLeavesInst"],
_["ShadeLeavesInst"] = transp["ShadeLeavesInst"],
_["LightExtinction"] = transp["LightExtinction"],
Expand Down
1 change: 1 addition & 0 deletions src/transpiration_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ List transpirationAdvanced(List x, NumericVector meteovec,
_["SunlitLeaves"] = Sunlit,
_["ShadeLeaves"] = Shade,
_["ExtractionInst"] = soilLayerExtractInst,
_["RadiationInputInst"] = ddd,
_["PlantsInst"] = PlantsInst,
_["SunlitLeavesInst"] = SunlitInst,
_["ShadeLeavesInst"] = ShadeInst,
Expand Down

0 comments on commit d53cbbc

Please sign in to comment.