Skip to content

Commit

Permalink
Fixed #37: Using the wet_canopy_fraction as regulator between AIR and
Browse files Browse the repository at this point in the history
PTR
  • Loading branch information
philippkraft committed May 14, 2018
1 parent 61869f3 commit 81bcb16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmf/cmf_core_src/upslope/vegetation/ShuttleworthWallace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,10 @@ void cmf::upslope::ET::ShuttleworthWallace::refresh( cmf::math::Time t )
double VOL_IN_CANOPY = cell.get_canopy() ? cell.m3_to_mm(cell.get_canopy()->get_volume()): 0.0;
double MAX_VOL_IN_CANOPY = LAI * cell.vegetation.CanopyCapacityPerLAI;
// Calculate actual interception rate from wet leave case and canopy wetness
AIR = piecewise_linear(VOL_IN_CANOPY,0,MAX_VOL_IN_CANOPY,0,PIR);
double wet_canopy_fraction = piecewise_linear(VOL_IN_CANOPY, 0, MAX_VOL_IN_CANOPY);
AIR = wet_canopy_fraction * PIR;
// Already for leave evaporation used energy cannot be used for transpiration
PTR -= AIR;
PTR *= 1 - wet_canopy_fraction;
// If energy for transpiration is left (dry or partial dry leaves)
if (PTR>0.001) {
// Calculate actual transpiration
Expand Down
2 changes: 1 addition & 1 deletion demo/surface-sw-et.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self):
def __call__(self, days=7):
self.c.vegetation.LAI = 7
self.c.vegetation.height = 10
self.c.vegetation.CanopyClosure = 1
self.c.vegetation.CanopyClosure = 0.1
l = self.c.layers[0]
self.c.surfacewater.depth = 0.05
l.soil.Ksat = 0.02
Expand Down

0 comments on commit 81bcb16

Please sign in to comment.