Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -r77194d628eb5380f03db806ed483bb4d10ac2676 -r556834c2ddcf620b5d7d3d2954ecc171b5c80cf4 --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 77194d628eb5380f03db806ed483bb4d10ac2676) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 556834c2ddcf620b5d7d3d2954ecc171b5c80cf4) @@ -425,6 +425,7 @@ if st == "None": rinfo = configget(self._userModel().config,'run','runinfo',"None") + rinfo = os.path.join(self._userModel().Dir,rinfo) if rinfo != "None": self.datetime_firststep = getStartTimefromRuninfo(rinfo) self.currentdatetime = self.datetime_firststep @@ -438,6 +439,8 @@ self._d_firstTimestep = 1 self._userModel()._setFirstTimeStep(self._d_firstTimestep) self._d_lastTimestep = int(nrseconds/self.timestepsecs) + else: + self.logger.warn("Not enough information in the [run] section. Need start and end time or a runifo file...") else: self.datetime_firststep=datetime.datetime.strptime(st, "%Y-%m-%d %H:%M:%S") self.currentdatetime = self.datetime_firststep @@ -456,6 +459,7 @@ + if self.ncfile != "None": mstacks = configsection(self._userModel().config,"inputmapstacks") varlst = [] Index: wflow-py/wflow/wflow_sbm.py =================================================================== diff -u -r78b81240834b72259fab14b4081f2b9cf0cd44ec -r556834c2ddcf620b5d7d3d2954ecc171b5c80cf4 --- wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 78b81240834b72259fab14b4081f2b9cf0cd44ec) +++ wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 556834c2ddcf620b5d7d3d2954ecc171b5c80cf4) @@ -161,6 +161,7 @@ # use sCurve to determine if the roots are wet.At the moment this ise set # to be a 0-1 curve wetroots = sCurve(WTable, a=RootingDepth, c=smoothpar) + #wetroots = ifthenelse(WTable <= RootingDepth, scalar(1.0), scalar(0.0)) ActEvapSat = min(PotTrans * wetroots, FirstZoneDepth) FirstZoneDepth = FirstZoneDepth - ActEvapSat @@ -326,7 +327,7 @@ """ Initial part of the model, executed only once. Reads all static data from disk - + *Soil* :var M.tbl: M parameter in the SBM model. Governs the decay of Ksat with depth [-] @@ -397,9 +398,9 @@ self.OverWriteInit = int(configget(self.config, "model", "OverWriteInit", "0")) self.updating = int(configget(self.config, "model", "updating", "0")) self.updateFile = configget(self.config, "model", "updateFile", "no_set") - self.origTopogLateral = int(configget(self.config, "model", "origTopogLateral", "0")) + self.LateralMethod = int(configget(self.config, "model", "lateralmethod", "0")) - if self.origTopogLateral == 0: + if self.LateralMethod == 0: self.logger.info("Applying the original topog_sbm lateral transfer formulation") else: self.logger.warn("Using the original (depreciated!!) wflow lateral transfer formulation") @@ -1135,10 +1136,10 @@ if self.waterdem: - if self.origTopogLateral: + if self.LateralMethod == 0: Lateral = self.FirstZoneKsatVer * tan(self.waterSlope) * exp(-self.SaturationDeficit / self.M) else: - if self.origTopogLateral == 1: + if self.LateralMethod == 1: Lateral = self.FirstZoneKsatVer * self.waterSlope * exp(-self.SaturationDeficit / self.M) else: Lateral = Ksat * self.waterSlope @@ -1151,10 +1152,10 @@ #MaxHor = max(0,min(self.FirstZoneKsatVer * self.Slope * exp(-SaturationDeficit/self.M),self.FirstZoneDepth*(self.thetaS-self.thetaR))) * timestepsecs/basetimestep #MaxHor = max(0.0, min(self.FirstZoneKsatVer * self.Slope * exp(-self.SaturationDeficit / self.M), # self.FirstZoneDepth)) - if self.origTopogLateral: + if self.LateralMethod: Lateral = self.FirstZoneKsatVer * tan(self.waterSlope) * exp(-self.SaturationDeficit / self.M) else: - if self.origTopogLateral == 1: + if self.LateralMethod == 1: Lateral = self.FirstZoneKsatVer * self.waterSlope * exp(-self.SaturationDeficit / self.M) else: Lateral = Ksat * self.waterSlope