Package: pyromb
Runoff Model Builder (pyromb)Author: Tom NormanThe Pyromb (PR) library builds both RORB[1] and WBNM[2] model input files from ESRI shapefiles typically generated through a GIS package. This library's primary reason for existing is for use within the QGIS pluginsRunoff Model: RORBandRunoff Model: WBNMThe library as it stands, is a minimal viable implementation of RORB and WBNM control files. It does however solve the primary issue with text file input models, that is, the need to manually transcribe information from GIS to the text file or graphical editor. Pyromb is now compatible with the RORB GE, therefore the generated control vector files can be easily modified for more complex catchments.MiRORB is a similar more advance tool which uses the GIS package MapInfo. The unavailability of MiRORB for QGIS inspired this project. This library is not however GIS package dependent. Pyromb is a stand alone python package able to be used directly by a python application if necessary. The QGIS plugins developed in conjunction with this project only feeds the shapefiles to this library for processing. As such this library can be used for any GIS software package.https://www.harc.com.au/software/rorb/https://wbnm.com.au/InstallingDependenciesNumpyInstalling python package$ pip install pyrombInstalling for the QGIS Runoff Model Builder plugin:ForMacOS or Linux, QGIS does not have its own python environment so PR can be installed through pip directly from the terminal by using the command above.ForWindows, QGIS has its own python environment. To install PR to work with QGIS, it needs to be installed via the OSGeo4W shell.
Two methods depending on your version of QGIS, for newer versions,Open the OSGeo4W Shell (may need admin permission)Install via pip$ pip install pyrombIf that fails, try:Open the OSGeo4W Shell (may need admin permission)Enterpy3_envInstall via pip$ python -m pip install pyrombInstalling the QGIS Runoff Model Builder PluginInstall PR firstOpen QGIS Plugin Manager, search forRunoff Model: RORBand installRunoff Model: RORB is a processing plugin and is located in the processing toolbox underRunoff ModelSetting Up A CatchmentPR uses four shapefiles to provide the necessary information to build the RORB and WBNM vector, these are detailed below. The attributes that must be present in the shapefile so that PR has can build the control files. The easiest way to ensure the necessary attributes are present is to use the example shapefiles in the data folder.ReachesReaches are the connection between basins and confluences.TypeLine geometry.Attributes'id' - The name of the reach [string].'s' - The slope of the reach (m/m) [double].'t' - The reach type. [integer].SupportType 1 reach only.NotesReach length is derived from the shapefile geometry.CentroidsCentroids represent the basin attributes and are located as close to the basin centroid as possible, while still intersecting a reach.TypePoint geometryAttributes'id' The name of the basin [string]'fi' The fraction impervious $\in[0,1]$ [decimal]SupportFraction imperviousNotesCentroid to Basin matching is done through nearest neighbour. If a centroid is moved too far away from the basin’s true centroid, it may match with another basin, or not match at all.BasinsBasins are only necessary to provide the centroid with an area. This was done to avoid having to transcribe area information into the Centroid shapefile as an attribute.TypePolygon geometry.AttributesNoneSupportNoneNotesNoneConfluencesConfluences are the location where reaches meet, which isn't a centroid (no basin information associated).TypePoint geometryAttributes'id' The name of the confluence [string]'out' Flag whether this confluence is the outfall [integer]SupportConfluence OnlyNotesIn the future, these will represent other features like storage.Example CatchmentBasins are built in the preferred manner. There are various ways to produce the sub-catchments boundaries, please refer to your typical workflow to do so. These are nothing more than polygons that represent the boundaries of your subcatchments.Centroids are created from the basins, either using the in-built centroid tool in QGIS or estimating the location. Centroids represent a sub-area in the RORB Model. These don’t have the be at the centroid, these can be moved to suit the reaches.Confluences are manually located at junctions of reaches, these represent junction nodes in the RORB model and outlet locations in WBNM.Reach is the thalweg of the flow paths through the catchment. These are disjointed at each confluence and centroid, that is, they must start at an upstream confluence or centroid and end at the immediately downstream confluence or centroid.Out location, the outlet of the catchment must be explicitly nominated by setting the GIS attribute as 1. All other confluence should of their out set at 0.An example of a built catchment can be found in the data folder.RoadmapSlowly implementing additional functionality of RORB as I need.