Index: wflow-py/wflow/wflow_sbm.py =================================================================== diff -u -r4c69c4ddd4aacb4689885492bed255b3f733ea69 -r0b6a9ba1c8974538fb1e29f3b2e9adfb2238ac23 --- wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 4c69c4ddd4aacb4689885492bed255b3f733ea69) +++ wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 0b6a9ba1c8974538fb1e29f3b2e9adfb2238ac23) @@ -118,7 +118,7 @@ sys.exit(0) -def actEvap_SBM(RootingDepth, WTable, UStoreDepth, FirstZoneDepth, PotTrans, smoothpar): +def actEvap_SBM(RootingDepth, WTable, UStoreDepth, FirstZoneDepth, PotTrans, smoothpar,ust=0): """ Actual evaporation function: Actual evaporation function: @@ -128,6 +128,8 @@ - it uses an S-Curve the make sure roots het wet/dry gradually (basically) representing a root-depth distribution + if ust is True, all ustore is deems to be avaiable fro the roots a + Input: - RootingDepth,WTable, UStoreDepth,FirstZoneDepth, PotTrans, smoothpar @@ -154,7 +156,10 @@ # now try unsat store #AvailCap = min(1.0, max(0.0, (WTable - RootingDepth) / (RootingDepth + 1.0))) - AvailCap = max(0.0,ifthenelse(WTable < RootingDepth, cover(1.0), RootingDepth/(WTable + 1.0))) + if ust >= 1: + AvailCap = UStoreDepth * 0.99 + else: + AvailCap = max(0.0,ifthenelse(WTable < RootingDepth, cover(1.0), RootingDepth/(WTable + 1.0))) MaxExtr = AvailCap * UStoreDepth ActEvapUStore = min(MaxExtr, RestPotEvap, UStoreDepth) UStoreDepth = UStoreDepth - ActEvapUStore @@ -451,8 +456,8 @@ self.updateFile = configget(self.config, "model", "updateFile", "no_set") self.LateralMethod = int(configget(self.config, "model", "lateralmethod", "1")) self.maxitsupply = int(configget(self.config, "model", "maxitsupply", "5")) + self.UST = int(configget(self.config, "model", "Whole_UST_Avail", "0")) - if self.LateralMethod == 1: self.logger.info("Applying the original topog_sbm lateral transfer formulation") elif self.LateralMethod == 2: @@ -1157,7 +1162,8 @@ self.zi, self.UStoreDepth, self.FirstZoneDepth, self.PotTrans, - self.rootdistpar) + self.rootdistpar, + ust=self.UST) # Run only if we have irrigation areas or an externally given demand, determine irrigation demand based on potrans and acttrans