Overview
The geomorphic upscale empirically estimates geomorphic assemblages and modelling responses for each River Style and Condition variants in your network and then upscales responses onto the entire network using your River Styles designations and Condition scenarios. UpscaleWrapper.R is the user editable file from which the upscale is run.
Step 1: Create and point to your inputs
The first thing you will need to do is to point to the locations of your inputs. You will need to generate three user generated tables: selections.csv, braid.index.csv, and network.csv. You will also need to download and point to the Geomorphic Upscale Repo.
User defined Inputs
selections.csv (see example)
This is the file specifying the empirical subsets for each of your River Styles and Conditions that was either generated by RSselection.R or manually created (see selecting instructions).
braid.index.csv (see example)
This is a .csv with at least three columns (“RS”, “Condition”, “C”). RS is your river style code which matches the RS codes used in selections.csv. Condition is the condition varients which match the conditions in selections.csv. C is the average braiding index (total length of all stream threads/ total length of main stream thread) for each RS and Condition combination. C is used as a scalar used to increase stream area due to increases or decreases in multi-threads between condition variations of the same river style.
network.csv (see example)
This is flat table which has a row for every stream segment on the basin network that you would like to upscale. At the minimum it should have these fields:
- ReachID Field: A unique ID is required to join outputs back to spatial data layers for mapping “segmentID” is used as default in scripts.
- bf.width.m : An estimate of bankfull width (meters) for each stream segment. If multi threads this is the average width of one of the channels when at bankful discharge, not the entire floodplain or valley width. “bf.width.m” is used as default in scripts.
- length.m: An estimate of stream segment length (meters). “length.m” is used as default in scripts.
- RS : mapped River Style segment. code should match those in braid.index.csv and selections.csv. “RS” is used as default in scripts.
- Condition0 : Mapped condition of reach. set to ‘NA’ if condition was not mapped. “Condition0” is used as default in scripts.
- ConditionScenario: Optional restoration condition scenarios. One field for each scenario. You can name them whatever you want.
Except for the condition scenarios, these field names are used as defaults in scripts. So, it is easier to keep the names as above, but you can pass variables to allow for different field names.
Local directory path to GeomorphicUpscale
The scripts call R code housed in the scripts subfolder and the training data subfolder. The training dataset includes, for each site, a table of geoindicators, geomorphic unit maps, and summaries of pyGUT geomorphic units and fish habitat model results for Steelhead and Chinook. Summaries were calculated at the reach scale as well as the geomorphic unit scale using code that can be found here.
Step 2: Define user variables
Needed for upscale
- species: Fish species to upscale. Options: “steelhead”, “chinook”
- model: Response model to upscale. Options: “nrei”, “fuzzy”
- lifestage: Lifestage to upscale. Options: “juvenile”, “spawner”
- gu.type: Unit type to upscale. Options: “UnitForm”, “GU”
- response.pool: Specifies how you want to average responses: over the entire dataset (All), pooling by river styles (RS) or pooling by each river style and condition variant (RSCond). Options: “All”, “RS”, “RSCond”
- seg.id.col: column header name for unique reach segment ID in network input file
- length.col: column header name for length of segment in m in network input file
- width.col: column header name for estimates of stream width in network input file
- area.col: column header name for estimates of reach area in network input file (if set to NA upscale.response.R will estimate area using the braid.index input)
- cond.cols: vector of column headers for condition scenarios in network input file. Example: c(“Condition1”, “Condition2”)
- basin.col: column header name for unique basin id (e.g., “HUC_08”)
Step 3: Estimate assemblages an review output
Once your inputs and variables have been set and run, you can estimate assemblages by sourcing assemblage.R in the UpscaleWrapper.R
Here are some example assemblage outputs for Tier 2 Transition and Tier 3 GUT outputs.
Step 4: Estimate responses and review output
Once your inputs and variables have been set and run, you can estimate responses by sourcing response.R in the UpscaleWrapper.R
Responses in the training dataset available to upscale are fish capacity predictions. The fish capacity predictions predict actual individual fish locations summarized as density of fish by geomorphic unit type. Please refer to the Familiarize page for further explanation of the response variables. These estimates can be summarized over all selected reaches or pooled by river reach type and condition.
Step 5: Upscale to the network and review output
Once you have run both your estimates, you can get upscaled estimates by sourcing upscale.response.R in the UpscaleWrapper.R .
What’s next?
You are now ready to analyze your results and decide if they make any sense. Good luck! Check out our full write up of our example from the Asotin Basin.