Index: examples/wflow_rhine_sbm/intbl/N_Floodplain.txt =================================================================== diff -u --- examples/wflow_rhine_sbm/intbl/N_Floodplain.txt (revision 0) +++ examples/wflow_rhine_sbm/intbl/N_Floodplain.txt (revision add65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8) @@ -0,0 +1 @@ +<,7] <,20] 1 0.1 \ No newline at end of file Fisheye: Tag add65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8 refers to a dead (removed) revision in file `examples/wflow_rhine_sbm/tes.csv'. Fisheye: No comparison available. Pass `N' to diff? Index: examples/wflow_rhine_sbm/wflow_sbm.ini =================================================================== diff -u -r0fc7439329d0ea7ec14ea9360d97a18ebbcf82c0 -radd65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8 --- examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision 0fc7439329d0ea7ec14ea9360d97a18ebbcf82c0) +++ examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision add65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8) @@ -16,16 +16,6 @@ # this is optional inflow (positive) or outflow (negative) of the kin-wave reservoir Inflow = /inmaps/IF -[fit] -parameter_0 = M -#parameter_1 = RootingDepth -Q = testing.tss -ColMeas = [1,8,7] -ColSim = [1,8,7] -WarmUpSteps = 1 -areamap=staticmaps/wflow_subcatch.map -areacode=[1,8,7] - [run] # either a runinfo file or a start and end-time are required #runinfo=runinfo.xml @@ -34,7 +24,7 @@ # required, base timestep of the model timestepsecs = 86400 #start model with cold state -reinit=1 +reinit=0 # Model parameters and settings [model] @@ -137,7 +127,6 @@ # Alle runoff in mm self.InwaterMM=specrun.csv - # Neerslag in mm self.Precipitation=prec.csv @@ -147,6 +136,4 @@ # Totale storage in mm self.UStoreDepth + self.FirstZoneDepth + self.CanopyStorage = store.csv -# water budget not taking Delta S and GW flux into account -self.Precipitation - self.ActEvap - self.Interception - self.InwaterMM = watbalnostore.csv Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -r8eaca5ca3a2b02ab61d19d247194c9b41806e2c6 -radd65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8 --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 8eaca5ca3a2b02ab61d19d247194c9b41806e2c6) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision add65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8) @@ -1820,7 +1820,9 @@ else: self.logger.error("This Kind of climatology not implemented yet: " + str(kind)) - def wf_readmap(self, name, default, verbose=True): + + + def wf_readmap(self, name, default, verbose=True,fail=False): """ Adjusted version of readmapNew. the style variable is used to indicated how the data is read:: @@ -1853,7 +1855,10 @@ if hasattr(self._userModel(), "_inInitial"): if self._userModel()._inInitial(): - newName = name + nameSuffix + if os.path.splitext(name)[1] == ".map": + newName = name + else: + newName = name + nameSuffix if self._inResume(): timestep = self._userModel().firstTimeStep() @@ -1877,7 +1882,10 @@ return mapje else: if verbose: - self.logger.debug("Forcing data (" + path + ") for timestep not present, returning " + str(default)) + self.logger.debug("Input data (" + os.path.abspath(path) + ") for timestep not present, returning " + str(default)) + if fail: + self.logger.error("Required map: " + os.path.abspath(path) + " not found, exiting..") + sys.exit(1) return scalar(default) elif style == 2: # Assuming they are set in memory by the API # first get basename (last bit of path) Index: wflow-py/wflow/wflow_routing.py =================================================================== diff -u -rf6a174037a258e9427bb2155eb988f8a840aa97b -radd65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8 --- wflow-py/wflow/wflow_routing.py (.../wflow_routing.py) (revision f6a174037a258e9427bb2155eb988f8a840aa97b) +++ wflow-py/wflow/wflow_routing.py (.../wflow_routing.py) (revision add65e2f3f0e848e03d5b4f45ab1b4e057e5a2d8) @@ -283,33 +283,33 @@ wflow_soil = configget(self.config, "model", "wflow_soil", "staticmaps/wflow_soil.map") # 2: Input base maps ######################################################## - subcatch = ordinal(readmap(os.path.join(self.Dir,wflow_subcatch))) # Determines the area of calculations (all cells > 0) + subcatch = ordinal(self.wf_readmap(os.path.join(self.Dir,wflow_subcatch),0.0,fail=True)) # Determines the area of calculations (all cells > 0) subcatch = ifthen(subcatch > 0, subcatch) - self.Altitude = readmap(os.path.join(self.Dir,wflow_dem)) # * scalar(defined(subcatch)) # DEM - self.TopoLdd = readmap(os.path.join(self.Dir,wflow_ldd)) # Local - self.TopoId = readmap(os.path.join(self.Dir,wflow_subcatch)) # area map - self.River = cover(boolean(readmap(os.path.join(self.Dir,wflow_river))), 0) + self.Altitude = self.wf_readmap(os.path.join(self.Dir,wflow_dem),0.0,fail=True) # * scalar(defined(subcatch)) # DEM + self.TopoLdd = self.wf_readmap(os.path.join(self.Dir,wflow_ldd),0.0,fail=True) # Local + self.TopoId = self.wf_readmap(os.path.join(self.Dir,wflow_subcatch),0.0,fail=True) # area map + self.River = cover(boolean(self.wf_readmap(os.path.join(self.Dir,wflow_river),0.0,fail=True)), 0) - self.RiverLength = cover(pcrut.readmapSave(os.path.join(self.Dir,wflow_riverlength), 0.0), 0.0) + self.RiverLength = cover(self.wf_readmap(os.path.join(self.Dir,wflow_riverlength), 0.0), 0.0) # Factor to multiply riverlength with (defaults to 1.0) - self.RiverLengthFac = pcrut.readmapSave(os.path.join(self.Dir,wflow_riverlength_fact), 1.0) + self.RiverLengthFac = self.wf_readmap(os.path.join(self.Dir,wflow_riverlength_fact), 1.0) # read landuse and soilmap and make sure there are no missing points related to the # subcatchment map. Currently sets the lu and soil type type to 1 - self.LandUse = readmap(os.path.join(self.Dir,wflow_landuse)) + self.LandUse = self.wf_readmap(os.path.join(self.Dir,wflow_landuse),0.0,fail=True) self.LandUse = cover(self.LandUse, nominal(ordinal(subcatch) > 0)) - self.Soil = readmap(os.path.join(self.Dir,wflow_soil)) + self.Soil = self.wf_readmap(os.path.join(self.Dir,wflow_soil),0.0,fail=True) self.Soil = cover(self.Soil, nominal(ordinal(subcatch) > 0)) - self.OutputLoc = readmap(os.path.join(self.Dir,wflow_gauges)) # location of output gauge(s) - self.InflowLoc = pcrut.readmapSave(os.path.join(self.Dir,wflow_inflow), 0.0) # location abstractions/inflows. - self.RiverWidth = pcrut.readmapSave(os.path.join(self.Dir,wflow_riverwidth), 0.0) - self.bankFull = pcrut.readmapSave(os.path.join(self.Dir,wflow_bankfulldepth), 999999.0) - self.floodPlainWidth = pcrut.readmapSave(os.path.join(self.Dir,wflow_floodplainwidth), 8000.0) - self.floodPlainDist = pcrut.readmapSave(os.path.join(self.Dir,wflow_floodplaindist), 0.5) + self.OutputLoc = self.wf_readmap(os.path.join(self.Dir,wflow_gauges),0.0,fail=True) # location of output gauge(s) + self.InflowLoc = self.wf_readmap(os.path.join(self.Dir,wflow_inflow), 0.0) # location abstractions/inflows. + self.RiverWidth = self.wf_readmap(os.path.join(self.Dir,wflow_riverwidth), 0.0) + self.bankFull = self.wf_readmap(os.path.join(self.Dir,wflow_bankfulldepth), 999999.0) + self.floodPlainWidth = self.wf_readmap(os.path.join(self.Dir,wflow_floodplainwidth), 8000.0) + self.floodPlainDist = self.wf_readmap(os.path.join(self.Dir,wflow_floodplaindist), 0.5) - self.OutputId = readmap(os.path.join(self.Dir,wflow_subcatch)) # location of subcatchment + self.OutputId = self.wf_readmap(os.path.join(self.Dir,wflow_subcatch),0.0,fail=True) # location of subcatchment self.ZeroMap = 0.0 * scalar(subcatch) #map with only zero's