Index: doc/framework.rst =================================================================== diff -u -r504c0ea7310f40dd1dc984a080e2e6fa68682491 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- doc/framework.rst (.../framework.rst) (revision 504c0ea7310f40dd1dc984a080e2e6fa68682491) +++ doc/framework.rst (.../framework.rst) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -2,10 +2,10 @@ =================== This section only gives a brief description of the framework focussing on the extensions -made for OpenStreams. A full description of the current version of the framwork can be found +made for OpenStreams. A full description of the current version of the framework can be found at http://www.pcraster.eu. -In order to build a dynamic model the one needs to define a model class and add several methods +In order to build a dynamic model you will needs to define a model class and add several methods to the class to describe the model behaviour. The easiest way to get started is to copy and modify the ``wflow_sceleton.py`` example model. You can also use the other models for inspiration. Index: examples/wflow_rhine_hbv/wflow_hbv.ini =================================================================== diff -u -r9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- examples/wflow_rhine_hbv/wflow_hbv.ini (.../wflow_hbv.ini) (revision 9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42) +++ examples/wflow_rhine_hbv/wflow_hbv.ini (.../wflow_hbv.ini) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -70,3 +70,14 @@ samplemap=staticmaps/wflow_gauges.map self.SurfaceRunoff=run.csv +[outputtss_0] +samplemap=staticmaps/wflow_gauges.map +self.SurfaceRunoff=run.tss + + +# add extra summary maps here +[summary] +self.Altitude=Altitude.map + + + Index: examples/wflow_rhine_sbm/intbl/MaxLeakage.tbl =================================================================== diff -u -r9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- examples/wflow_rhine_sbm/intbl/MaxLeakage.tbl (.../MaxLeakage.tbl) (revision 9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42) +++ examples/wflow_rhine_sbm/intbl/MaxLeakage.tbl (.../MaxLeakage.tbl) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -1,6 +1 @@ -1 <,14] 1 0.0 -2 <,14] 1 0.0 -3 <,14] 1 0.0 -4 <,14] 1 0.0 -5 <,14] 1 0.0 -6 <,14] 1 0.0 +<,10] <,14] 1 0.0 Index: examples/wflow_rhine_sbm/wflow_sbm.ini =================================================================== diff -u -rfaafd5e1b8eee13781bd50c2d05d4a264b9047c3 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision faafd5e1b8eee13781bd50c2d05d4a264b9047c3) +++ examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -55,8 +55,10 @@ self.TopoLdd=ldd #self.FirstZoneDepth=fir #self.watbal=wat +self.ActLeakage=lek - +[summary] +self.MaxLeakage=MaxLeakage.map # Save and average these per LU type [outputcsv_0] samplemap=staticmaps/wflow_landuse.map @@ -68,6 +70,9 @@ self.SurfaceRunoff=run.tss self.WaterLevel=lev.tss +[outputtss_1] +samplemap=staticmaps/wflow_gauges.map +self.ActLeakage=lek.tss # Save and sample these at gauge locations [outputcsv_1] @@ -77,6 +82,7 @@ # Alle runoff in mm self.InwaterMM=specrun.csv + # Neerslag in mm self.Precipitation=prec.csv Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -raa4ba73eb56f3267b8cd1234df89a0c3bfddece8 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision aa4ba73eb56f3267b8cd1234df89a0c3bfddece8) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -56,6 +56,8 @@ sys.excepthook = log_uncaught_exceptions + + class wf_exchnageVariables(): """ List of exchange variables @@ -224,9 +226,9 @@ self._d_firstTimestep = firstTimestep self._userModel()._setFirstTimeStep(self._d_firstTimestep) self.APIDebug = 0 - + def _wf_shutdown(self): """ @@ -345,6 +347,10 @@ self.outputFormat = int(configget(self._userModel().config,'framework','outputformat','1')) self.APIDebug = int(configget(self._userModel().config,'framework','debug',str(self.APIDebug))) + + # Add the summary/statistics variable to the class + # self._addAttributeToClass("summap",self._userModel().clone) + # Now gather all the csv/tss/txt etc timeseries output objects # Print .ini defined outputmaps per timestep Index: wflow-py/wflow/wflow_sceleton.py =================================================================== diff -u -r9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42 -ref66b8e21f94f3f322fbf29dbacc22ec45914a9b --- wflow-py/wflow/wflow_sceleton.py (.../wflow_sceleton.py) (revision 9dd1a78b1a2e6aa0e67e970d6235e4923b8bfc42) +++ wflow-py/wflow/wflow_sceleton.py (.../wflow_sceleton.py) (revision ef66b8e21f94f3f322fbf29dbacc22ec45914a9b) @@ -169,7 +169,14 @@ exec "self." + s + " = cover(1.0)" - + def default_summarymaps(self): + """ + *Optional* + + Return a default list of variables to report as summary maps in the outsum dir. + """ + return ['self.Altitude'] + def dynamic(self): """ *Required*