streambank-model

Streambank erosion model in Matlab

View the Project on GitHub mitchellmcm27/streambank-model

streambank-model

Model in action

Streambank erosion model in Matlab

McMillan, M. and Z. Hu, 2017. A watershed scale spatially-distributed model for streambank erosion rate driven by channel curvature. Geomorphology 294, 146–161. https://doi.org/10.1016/j.geomorph.2017.03.017.

Run the model with supplied data

Clone the repo (in terminal)

cd my/fav/directory
git clone https://github.com/mitchellmcm27/streambank-model.git

Start up Matlab, navigate to the newly created streambank-model folder in your Matlab file tree load “model_data.mat” into matlab, which contains the input data table:

load('model_data')

Run the model on a single site:

train_model_monthly(model_data(44,:), 'animate')

Run the model on all sites:

output = train_model_monthly(model_data)

Output

An example of the model output is saved in the output folder. The model outputs a struct that contains 3 objects:

Model application

After fitting a model, you can estimate erosion rates at any location using the following function. You can write a custom function or other scheme to use the fitted equation in any way you wish. This function is provided as an example of the model application and uses the same datasets that were used in model training and estimates erosion rates throughout an entire river reach.

eval_model_monthly(model_data, 44)

This function is similar to train_model_monthly except that, rather than fitting a model to observed erosion rates, a fitted model is applied to the input data. The function thus requires all of the same data used in model fitting, except for observed erosion rates. The function applies the model on an entire NHD Flowline (vector polyline) matching the COMID of the given row. The function samples a raster dataset representing tree cover at many locations along the reach (see data folder). You must supply the path to the raster data in the function sample_fc_at_points (in the gis folder). Three geotiffs are provided in the forest folder, sufficient to run the model with the given data (obtained from the UMD Global Land Cover Facility).

Many of the other Matlab functions/scripts in the repo are outdated or are used by the functions I mentioned here. Be careful deleting functions (sorry).

Literature folder

The literature folder contains the manuscript based on this model (currently under review). The folder also contains a bibliographic database (.bib file), which contains references for all of the literature cited in the paper. You can browse the .bib file in JabRef or import it into Mendeley or Zotero. The .bib file is a BiBTeX database generated by Mendeley Desktop and cleaned up in JabRef.

Other folders

The other folders contain supporting functions. Some are required for the model calculations, others are only for plotting, colorbars, etc.