Data

Documentation of all functions and classes defined within the rrmpg.data module.

CAMELSLoader

class rrmpg.data.CAMELSLoader[source]

Interface for loading basin data from the CAMELS dataset.

This class provides an easy to use interface to load different basins from the CAMELS [1] dataset provided within this Python package. CAMELS stands for Catchment Attributes for Large-Sample Studies and is a hydrological dataset provided by NCAR for 671 catchments in the USA. The data entire data can be downloaded for free at [2]. Within this package we provide the data of just a few catchments as toy data for this package.

[1] Addor, N., A.J. Newman, N. Mizukami, and M.P. Clark, 2017: The CAMELS data set: catchment attributes and meteorology for large-sample studies. version 2.0. Boulder, CO: UCAR/NCAR. doi:10.5065/D6G73C3Q

[2] https://ncar.github.io/hydrology/datasets/CAMELS_attributes

get_basin_numbers()[source]

Return a list of all available basin numbers.

get_station_height(basin_number)[source]

Return the elevation of the meteorological station of one basin.

Parameters

basin_number – String of the basin number that shall be loaded.

Returns

The elevation of the meteorological station.

Raises

ValueError – If the basin number is an invalid number. Check the .get_basin_numbers() function for a list of all available basins.

load_basin(basin_number)[source]

Load basin data pandas Dataframe.

Load the meteorological data, as well as observed discharge and modeled potential evapotranspiration of the specified basin from the CAMELS data set.

Parameters

basin_number – String of the basin number that shall be loaded.

Returns

A pandas DataFrame with the data of the basin.

Raises

ValueError – If the basin number is an invalid number. Check the .get_basin_numbers() function for a list of all available basins.