Input Parameters
Input Parameters
The DRC runs in several different modes. The user specifies these modes by setting internal flags supplied through a plain text input file. The user also specifies the locations of files that are read into the DRC, lists of irrigation diversions where output is desired, and which weather stations to include in the analysis with this file. The input file must be placed in the working directory with the DRC program (DiversionRunoffCalculator.py) being run. The name of the text file must match the simulation name assigned within the program.
Below is an example input file for a simulation in the Duchesne Basin:
Example Input File:
[Year Settings]
year_start = 1991
year_end = 2023
[Flags]
UpdateIntersectedFile = True
Calculate_Gradient_DarcyK = True
Conduct_Basin_Analysis_Duchesne = False
RiverWareAggregation = False
EvaluateChangeCase = False
[Input File Paths]
CANAL_LIST = ../CanalList_For_JournalPaper.csv
GDBDataFile = ../Duchesne_RWconfig.gdb
WRLULayer = WRLU
FlowlineLayer = Flowlines
NetFieldsLayer = Fields
DiversionsLayer = Diversions
OpenETLayer = ET_DEMANDS
NetPathlinesTable = ../GIS Inputs/DWRi Distro Network/NetPathlines Table.xlsx
NetPathPointsTable = ../GIS Inputs/DWRi Distro Network/PathPoints Table.xlsx
NetPathsTable = ../GIS Inputs/DWRi Distro Network/NetPaths Table.xlsx
OpenET_InputCSV_Name = ../GIS Inputs/ET DEMANDS/Compiled_NIWR_Calc_IrrigStatus.csv
UT_Table_Folder = ../Utah ET Tables
UT_Table_File = ../Utah ET Tables/UT_Table_ConsumptiveUse.xlsx
UtahTableLayer = UtahTableLayer
ObsFlow_Folder = ../DWRi Flow Records
CanalFlowCSV = ../DWRi Flow Records/Observed_List.csv
WaterRightExcelFileName = ../DWRi Water Rights/000_WaterRights_CompiledData.xlsx
IntersectedFile = output.gpkg/IntersectedFile
[Connection Files for Runoff]
Field_to_Field_Filename = ../Connection Files for Runoff/DUC_OutFile_Fields.txt
Canal_to_Field_Filename = ../Connection Files for Runoff/DUC_OutFile_CanalToFields.txt
Canal_to_River_Filename = ../Connection Files for Runoff/DUC_OutFile_CanalToRiver.txt
Field_to_River_Filename = ../Connection Files for Runoff/DUC_OutFile_RiversCanals.txt
The year_start and year_end parameters tell the DRC the start year and end year of the simulation. These are both set in the DRC input file.
Example:
[Year Settings]
year_start = 1991
year_end = 2023
A number of flags are used to set the DRC run modes. The section shown below is where these boolean flags are set.
Example:
[Flags]
UpdateIntersectedFile = True
Calculate_Gradient_DarcyK = True
Conduct_Basin_Analysis_Duchesne = False
RiverWareAggregation = False
EvaluateChangeCase = False
The DRC takes the intersection of the Water Related Landuse, NetFields (canal service areas), and OpenET Demands layers. This geospatial intersection is written to a GeoPackage. This only needs updated when the input files change so an option is given to read-in the intersected layer from the GeoPackage if it already exists in order to save processing time. Then the UpdateIntersectedFile is set to 'False', the GeoPackage is read-in instead of re-created. If the GeoPackage doesn't exist, the program will create irregardless of the flag.
Example:
UpdateIntersectedFile = False
When this flag is 'True', the program will back-calculate Darcy's K-value (saturated hydraulic conductivity) based on a published study by Cruff and Hood (1976) involving Grey Mountain Canal and Rocky Point Canal. Otherwise, average conductivity values will be used. This only applies in the Duchesne Basin. When running for other areas this flag should be set to 'False'.
Example:
Calculate_Gradient_DarcyK = True
The DRC has hard-coding to perform a detailed analysis of the Duchesne Basin. The was used specifically in crafting a paper for the Journal of Irrigation and Drainage Engineering. This 'Conduct_Basin_Analysis_Duchesne' flag should only be selected, i.e. "True', when running the Duchesne Basin to recreate results similar to those published by Follum et al. (2024). Otherwise, the flag should be set to 'False'.
Example:
Conduct_Basin_Analysis_Duchesne = False
The DRC writes output for each irrigation canal included in the canal list. It is possible to lump these individual water users together in larger scale water budgeting tools like RiverWare. Results for individual canals can be lumped together if this is the case. This is done by setting the 'RiverWareAggregation' flag to 'True' through the input flag. Include the following statement along with node names in the 'RWNode' field of the Diversions layer. Specifying the desired groupings in these fields along with this flag will cause the DRC to aggregate the output into a single file called 'ObservedAndDRCDiverisions.xlsx'.
Example:
RiverWareAggregation = True
The DRC performs scenario-based simulations to evaluate potential changes in landuse, crop type, irrigation practice, canal lining, and field fallowing. The user specifies whether to run the standard baseline scenario, or a change case that includes modifications. This is done by setting the 'EvaluateChangeCase' flag to 'True' through the following statement in the input file.
Example:
EvaluateChangeCase = True
The DRC relies on a variety of inputs, including water rights records, observed datasets, and geospatial data. Users provide a configuration list that maps each required DRC variable to its corresponding file or dataset. These mappings can be listed in any order and support both relative and absolute file paths.
Each entry in the list specifies a DRC input variable followed by the path or name of the file/layer it references. For geospatial data stored in a single GeoDatabase (e.g., .gdb), only the layer names are required, as the database file is assumed to be the same for all layers. For data located outside a GeoDatabase (e.g., shapefiles, GeoPackages, Excel spreadsheets, or CSV files), the full file path including the file name and extension must be provided.
The DRC supports a mix of input types including:
GeoDatabase layers (.gdb)
GeoPackages (.gpkg)
Shapefiles (.shp)
CSV files (.csv)
Excel files (.xlsx)
An example configuration is shown below:
Example:
[Input File Paths]
CANAL_LIST = ../CanalList_For_JournalPaper.csv
GDBDataFile = ../Duchesne_RWconfig.gdb
WRLULayer = WRLU
FlowlineLayer = Flowlines
NetFieldsLayer = Fields
DiversionsLayer = Diversions
OpenETLayer = ET_DEMANDS
NetPathlinesTable = ../GIS Inputs/DWRi Distro Network/NetPathlines Table.xlsx
NetPathPointsTable = ../GIS Inputs/DWRi Distro Network/PathPoints Table.xlsx
NetPathsTable = ../GIS Inputs/DWRi Distro Network/NetPaths Table.xlsx
OpenET_InputCSV_Name = ../GIS Inputs/ET DEMANDS/Compiled_NIWR_Calc_IrrigStatus.csv
UT_Table_Folder = ../Utah ET Tables
UT_Table_File = ../Utah ET Tables/UT_Table_ConsumptiveUse.xlsx
UtahTableLayer = UtahTableLayer
ObsFlow_Folder = ../DWRi Flow Records
CanalFlowCSV = ../DWRi Flow Records/Observed_List.csv
WaterRightExcelFileName = ../DWRi Water Rights/000_WaterRights_CompiledData.xlsx
IntersectedFile = output.gpkg/IntersectedFile
Connection files are derived form a digital elevation model. These text files describe the runoff paths that connect fields, rivers, and canals. These only need to be updated when the DWRi Distribution network is updated. They are defined in the DRC input file in the same way other files are assigned above as shown below:
Example:
[Connection Files for Runoff]
Field_to_Field_Filename = ../Connection Files for Runoff/DUC_OutFile_Fields.txt
Canal_to_Field_Filename = ../Connection Files for Runoff/DUC_OutFile_CanalToFields.txt
Canal_to_River_Filename = ../Connection Files for Runoff/DUC_OutFile_CanalToRiver.txt
Field_to_River_Filename = ../Connection Files for Runoff/DUC_OutFile_RiversCanals.txt
Note: Connection files are quasi-static inputs. They don't change unless the Geospatial Data from Utah Division of Water Rights (i.e. NetNodes, NetFlowlines, NetFields, NetPathPoints Table_TableToExcel.xlsx, NetPathLines Table_TableToExcel.xlsx, and NetPaths Table_TableToExcel.xlsx) files are updated. To regenerate these connection files follow "Terrain Processing" instructions.
All the files needed to run the Duchesne simulation are available in the directly linked below (account permissions required for access):
See contact information below to request access to the the files.