update: 1mUrban code is updated; codes in master's branch are not yet updated.
We use two sets of tools for building RHESSys model from scratch: one for SSURGO (ssurgo_extraction) and the other one for GRASS (GIS2RHESSys). We assume a certain RHESSys directory and file system (below) for a project/catchment (e.g., BAISMAN). Under the project directory, user also needs to create the sub-directory structures (e.g., obs, raw_data, grass_dataset, rhessys). "obs" holds the streamflow records. "raw_data" holds the downloaded GIS data. Folders under "grass_dataset" are LOCATIONS for GRASS GIS, which will be generated by the GIS2RHESSys scripts. Note that we are matching the GRASS GIS LOCATIONS to the RHESSys models contained by rhessys folders (e.g., rhessys_baisman3m and rhessys_baisman10m). GIS2RHESSys is designed to be downloaded and edited in order to build a specific/customized RHESSys model. Thus, GIS2RHESSys is saved under each rhessys folder.
There are two branches of "GIS2RHESSys" handling different GIS data structures. The master branch handles the most straightforward GIS data (see below), while 1mUrban branch deals with high resolution GIS data (e.g., 1 m) by auto-aggregating data to 3-m or 10-m resolution and build RHESSys patch object by the multiple LULC fractions.
There may be more than one 'workflows.sh' in the "GIS2RHESSys". The workflows.sh is a bash/shell script to 1) set the system library paths; 2) make grass datasets and GIS data post-processing; 3) delineate catchment; and 4) extract GIS information to build RHESSys models. Certain procedures are organized in groups in workflows.sh (it's similar to Jupyter Notebook). The workflows.sh for building RHESSys from RAW GIS data (i.e., from scratch) has the most procedures while workflows.sh for rebuild RHESSys from existing GRASS GIS dataset could have a fewer procedures. User should customize the workflows.sh for his/her tasks. Advanced users should also look into the "g2w" and "cf" for more controls. For example, one modifies the existing LULC maps in the GRASS GIS dataset and saves the edited information as a new map "newLULC". Then one should edit the "g2w" and "cf" scripts to look up the "newLULC" for LULC information. The "template" file is fully imbedded into the "g2w" and "cf" scripts.
Other links:
RHESSys github: https://github.com/RHESSys/RHESSys
RHESSys wiki: https://github.com/RHESSys/RHESSys/wiki
RHESSys tools by Will from U.S. west coast https://github.com/RHESSys/RHESSys/tree/master/RHESSysPreprocessing Will's RHESSys tools are also written in R with R-studio. Major difference between GIS2RHESSys and Will's is that GIS2RHESSys is designed to simplify the existing code and be friendly to command line/Jupyter notebook/server-client environment.