bmorph

bmorph is a package for streamflow bias correction. bmorph is designed to work in conjunction with the mizuRoute streamflow routing model. bmorph provides methods for performing bias corrections that are spatially consistent as well as offers methods which can account for process-dependent biases. We discuss bmorph’s methodological details on the bias correction page. For an overview of the structure of bmorph, see the package overview, below.

Installation

We recommend installing bmorph using mamba using the command:

mamba create -n bmorph -c conda-forge bmorph

If you want to install from source, we provide an environment in environment.yml to manage the dependencies. You can build the environment by running:

mamba env create -f environment.yml

Then, to install bmorph run,

conda activate bmorph
python setup.py develop
python -m ipykernel install --user --name bmorph

Getting started

You can run through our interactive tutorial here. A static version of the tutorial can be found here.

bmorph Overview

Flowchart describing bmorph package directory structure to key directories util, core, and evaluation. util describes mizuroute_utils as "Configuring output from mizuRoute into input for bmorph. Blending and Conditioning pre-processing occurs here." core describes workflows as "Automated workflows for applying bmorph across multiple sites and time intervals" and bmorph as "Where bias correction computations take place for individual site and time increments." evaluation describes plotting as "Plotting functions for analyzing and visualizing bias corrections relative to reference and uncorrected data" and simple_river_network as "Pseudo-physical river network visualization for depicting spatial variables at stream segments across the watershed."

core

The core directory is where the functions for performing bias correction are located. The bmorph.py module contains the functions for individual bias corrections. workflows.py contains the functions that define some helper workflows that make it easier to apply bias corrections across a stream network. More on the specifics of how bias correction is performed can be found in the Bias Correction page.

util

The util directory contains the mizuroute_utils.py module for organizing data exported by mizuRoute into an easily accessible form for bmorph. More on how data is handled can be found on the Data Overview page.

evaluation

The evaluation directory provides tools for plotting and analyzing results. More on plotting functions and implemented statistics can be found on the Evaluation of Bias Correction page. More on the Simple River Network tool can be found on the Simple River Network (SRN) page.

Sitemap