API Summary#

metadata#

The metadata module provides higher-level information on all aspects of pywatershed.

meta

The metadata module.

Control#

Control(start_time, end_time, time_step[, ...])

Control manages global time and options, and provides metadata.

Parameters#

Parameter classes.

Parameters([dims, coords, data_vars, ...])

Parameter base class

parameters.PrmsParameters([dims, coords, ...])

A parameter class with methods for native PRMS files.

parameters.StarfitParameters(dims, coords, ...)

Starfit parameter class.

adapter#

The adapter module adapts various inputs to a common interface for pywatershed inputs.

adapter_factory(var[, variable_name, ...])

A function to return the appropriate subclass of Adapter

Adapter(variable)

Adapter base class for getting data from a variety of sources.

AdapterNetcdf(fname, variable, control[, ...])

Adapter subclass for a NetCDF file

Atmosphere#

Atmospheric process models.

PRMSSolarGeometry(control, discretization, ...)

PRMS solar geometry.

PRMSAtmosphere(control, discretization, ...)

PRMS atmospheric boundary layer model.

Hydrology#

Hydrologic model components.

PRMSCanopy(control, discretization, ...[, ...])

PRMS canopy class.

PRMSSnow(control, discretization, ...[, ...])

PRMS snow pack.

PRMSRunoff(control, discretization, ...[, ...])

PRMS surface runoff.

PRMSRunoffNoDprst(control, discretization, ...)

PRMS surface runoff without depression storage.

PRMSSoilzone(control, discretization, ...[, ...])

PRMS soil zone.

PRMSSoilzoneNoDprst(control, discretization, ...)

PRMS soil zone.

PRMSGroundwater(control, discretization, ...)

PRMS groundwater reservoir.

PRMSGroundwaterNoDprst(control, ...[, ...])

PRMS groundwater reservoir.

PRMSChannel(control, discretization, ...[, ...])

PRMS channel flow (muskingum_mann).

Starfit(control, discretization, parameters, ...)

starfit: Storage Targets And Release Function Inference Tool

FlowGraph#

FlowGraph base classes and subclasses. See FlowGraph for an overview of this functionality.

FlowGraph(control, discretization, ...[, ...])

FlowGraph manages and computes FlowNodes given by FlowNodeMakers.

FlowNode(control)

The FlowNode base class.

FlowNodeMaker([discretization, parameters])

FlowNodeMaker instantiates FlowNodes with their data.

PassThroughFlowNode(control)

A FlowNode instance that gives what it takes and dosent store.

ObsInFlowNode(control, node_obs_data)

A FlowNode that takes inflows but returns observed/specified flows.

StarfitFlowNode(control, grand_id, ...[, ...])

STARFIT FlowNode: Storage Targets And Release Function Inference Tool

StarfitFlowNodeMaker(discretization, parameters)

STARFIT FlowNodeMaker: Storage Targets And Release Function Inference Tool.

PRMSChannelFlowNode(control, tsi, ts, c0, c1, c2)

A FlowNode for the Muskingum-Mann method of PRMSChannel

PRMSChannelFlowNodeMaker(discretization, ...)

A FlowNodeMaker for PRMSChannelFlowNodes.

prms_channel_flow_graph_to_model_dict(...[, ...])

Add nodes to a PRMSChannel-based FlowGraph within a Model's model_dict.

prms_channel_flow_graph_postprocess(control, ...)

Add nodes to a PRMSChannel-based FlowGraph to run from known inputs.

prms_segment_lateral_inflow_components_to_netcdf(...)

Write to NetCDf the components of lateral flow on PRMS segments.

HruSegmentFlowAdapter(parameters, sroff_vol, ...)

Adapt volumetric flows from HRUs to lateral inflows on PRMS segments.

Model#

The Model class.

Model(process_list_or_model_dict[, control, ...])

Build a model in pywatershed.

Base Classes#

Base classes for the modeling system.

base.Accessor()

A base class for dict access on self.

base.DatasetDict([dims, coords, data_vars, ...])

DatasetDict: a data model following NetCDF-like conventions

base.Budget(control, inputs, outputs, ...[, ...])

Budget class for mass and energy conservation.

base.Process(control, discretization, parameters)

Base class for physical process representation.

base.ConservativeProcess(control, ...[, ...])

Base class for representation of conservative physical processes.

Utils#

ControlVariables(control_dict)

PRMS control file class

MmrToMf6Dfw([control_file, control, ...])

PRMS Muskingum-Mann Routing (MMR) to MF6 Diffusive Wave (DFW).

utils.cbh_file_to_netcdf(input_file, ...[, ...])

Convert PRMS native CBH files to NetCDF format for pywatershed

utils.netcdf_utils.subset_netcdf_file(...[, ...])

Subset a netcdf file on to coordinate or dimension values.

utils.netcdf_utils.subset_xr(ds[, ...])

Subset an xarray Dataset or DataArray on to coord or dim values.