Index: doc/wflow_hbv.rst =================================================================== diff -u -rca72694fc3223d21ebf18751582047d8d7b0f282 -r934e81e3af5db3b226cf5e66a9c4ace3fe47990b --- doc/wflow_hbv.rst (.../wflow_hbv.rst) (revision ca72694fc3223d21ebf18751582047d8d7b0f282) +++ doc/wflow_hbv.rst (.../wflow_hbv.rst) (revision 934e81e3af5db3b226cf5e66a9c4ace3fe47990b) @@ -380,8 +380,22 @@ +Subcatchment flow +================= +Normally the the kinematic wave is continuous throughout the model. By using the +the SubCatchFlowOnly entry in the model section of the ini file all flow is at the +subcatchment only and no flow is transferred from one subcatchment to another. This can be handy +when connecting the result of the model to a water allocation model such as Ribasim. +Example: +:: + + [model] + SubCatchFlowOnly = 1 + + + Description of the python module -------------------------------- Index: doc/wflow_sbm.rst =================================================================== diff -u -rca72694fc3223d21ebf18751582047d8d7b0f282 -r934e81e3af5db3b226cf5e66a9c4ace3fe47990b --- doc/wflow_sbm.rst (.../wflow_sbm.rst) (revision ca72694fc3223d21ebf18751582047d8d7b0f282) +++ doc/wflow_sbm.rst (.../wflow_sbm.rst) (revision 934e81e3af5db3b226cf5e66a9c4ace3fe47990b) @@ -543,9 +543,20 @@ "bottom: gravels, cobbles, and few boulders", 0.03, 0.04, 0.05 "bottom: cobbles with large boulders", 0.04, 0.05, 0.07 +Subcatchment flow +================= +Normally the the kinematic wave is continuous throughout the model. By using the +the SubCatchFlowOnly entry in the model section of the ini file all flow is at the +subcatchment only and no flow is transferred from one subcatchment to another. This can be handy +when connecting the result of the model to a water allocation model such as Ribasim. +Example: +:: + [model] + SubCatchFlowOnly = 1 + Dynamic wave ------------ Index: wflow-py/wflow/wflow_hbv.py =================================================================== diff -u -r333cba251cf7d46677265453c4e0743834b299db -r934e81e3af5db3b226cf5e66a9c4ace3fe47990b --- wflow-py/wflow/wflow_hbv.py (.../wflow_hbv.py) (revision 333cba251cf7d46677265453c4e0743834b299db) +++ wflow-py/wflow/wflow_hbv.py (.../wflow_hbv.py) (revision 934e81e3af5db3b226cf5e66a9c4ace3fe47990b) @@ -339,6 +339,7 @@ self.ExternalQbase=int(configget(self.config,'model','ExternalQbase','0')) self.SetKquickFlow=int(configget(self.config,'model','SetKquickFlow','0')) self.MassWasting = int(configget(self.config,"model","MassWasting","0")) + self.SubCatchFlowOnly = int(configget(self.config, 'model', 'SubCatchFlowOnly', '0')) # static maps to use (normally default) wflow_subcatch = configget(self.config,"model","wflow_subcatch","/staticmaps/wflow_subcatch.map") @@ -514,7 +515,16 @@ self.logger.info("Initializing of model variables..") self.TopoLdd=lddmask(self.TopoLdd,boolean(self.TopoId)) catchmentcells=maptotal(scalar(self.TopoId)) - + + + # Limit lateral flow per subcatchment (make pits at all subcatch boundaries) + # This is very handy for Ribasim etc... + if self.SubCatchFlowOnly > 0: + self.logger.info("Creating subcatchment-only drainage network (ldd)") + ds = downstream(self.TopoLdd,self.sCatch) + usid = ifthenelse(ds != self.sCatch,self.sCatch,0) + self.TopoLdd = lddrepair(ifthenelse(boolean(usid),ldd(5),self.TopoLdd)) + # Used to seperate output per LandUse/management classes #OutZones = self.LandUse #report(self.reallength,"rl.map") Index: wflow-py/wflow/wflow_sbm.py =================================================================== diff -u -r333cba251cf7d46677265453c4e0743834b299db -r934e81e3af5db3b226cf5e66a9c4ace3fe47990b --- wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 333cba251cf7d46677265453c4e0743834b299db) +++ wflow-py/wflow/wflow_sbm.py (.../wflow_sbm.py) (revision 934e81e3af5db3b226cf5e66a9c4ace3fe47990b) @@ -461,6 +461,7 @@ self.RiverWidth = pcrut.readmapSave(self.Dir + wflow_riverwidth, 0.0) # Experimental self.RunoffGenSigmaFunction = int(configget(self.config, 'model', 'RunoffGenSigmaFunction', '0')) + self.SubCatchFlowOnly = int(configget(self.config, 'model', 'SubCatchFlowOnly', '0')) self.RunoffGeneratingGWPerc = float(configget(self.config, 'defaultfortbl', 'RunoffGeneratingGWPerc', '0.1')) if self.scalarInput: @@ -658,6 +659,15 @@ self.TopoLdd = lddmask(self.TopoLdd, boolean(self.TopoId)) catchmentcells = maptotal(scalar(self.TopoId)) + # Limit lateral flow per subcatchment (make pits at all subcatch boundaries) + # This is very handy for Ribasim etc... + if self.SubCatchFlowOnly > 0: + self.logger.info("Creating subcatchment-only drainage network (ldd)") + ds = downstream(self.TopoLdd,self.sCatch) + usid = ifthenelse(ds != self.sCatch,self.sCatch,0) + self.TopoLdd = lddrepair(ifthenelse(boolean(usid),ldd(5),self.TopoLdd)) + + # Used to seperate output per LandUse/management classes OutZones = self.LandUse