Code used to upscale model results to networks utilizing GUT summaries
title: Geomorphic Upscaling —
Go back to home
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.
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.
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).
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.
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:
Except for the condition scenarios, these field names are used as defaults in scripts. So, it is easier to keep them names as above, but you can pass variables to allow for different field names.
The scripts call R code housed in the scripts subfolder and the Database subfolder. The database includes, for each site, a table of geoindicators, geomorphic unit maps, and summaries of PyGUT mappings of geomorphic landforms and fish modelling results for Steelhead and Chinook. Summaries were done at the reach scale as well as the geomorphic unit scale. The summaries summaries were generated using the Supporting RTools associated with PyGUT. We provide documentation on the database, which is helpful understand what is available for analysis within in the database.
You only need to specify the following variables if they differ from the defaults.
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.
Once your inputs and variables have been set and run, you can estimate responses by sourcing response.R in the UpscaleWrapper.R . You can change up your variables and run many times to get different fish response results. Note, at this point, the response.R is not synced with new data formats and will not run.
Responses in the database available to upscale are fish capacity predictions as well as percent suitable habitat for NREI and HSI models of steelhead salmon. The fish capacity predictions predict actual individual fish locations summarized as density of fish by geomorphic unit type. Percent suitable habitat is the percent of each geomorphic unit type in which the model showed fish could be present. 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, reach type and condition.
If you would like to upscale a different variable, you need to provide a table similar to: ???? in which your response is related to each geomorphic unit type. You can have your response differ between river reach and condition variants or stay the same across variants. your choice.
Once you have run both your estimates, you can get upscaled estimates by sourcing upscale.R in the UpscaleWrapper.R . Note, at this point, the upscale.R is not synced with new data formats and will not run.
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.
Go back to home