easy_vic_build.tools.dpc_func.aggregate

Aggregation utilities for basin-level time series.

This module aggregates grid-level time-series products (for example precipitation, soil moisture, evaporation, and snow water equivalent) into basin-level series using mean-based aggregation rules.

Functions

aggregate_ERA5_SM(basin_shp[, aggregate_column])

Aggregate ERA5 soil-moisture series for each basin.

aggregate_GLDAS_CanopInt(basin_shp[, ...])

Aggregate GLDAS canopy interception for each basin.

aggregate_GLEAMEDaily(basin_shp)

Aggregate daily GLEAM evaporation (E) for each basin.

aggregate_GLEAMEpDaily(basin_shp)

Aggregate daily GLEAM potential evaporation (Ep) for each basin.

aggregate_GlobalSnow_SWE(basin_shp[, ...])

Aggregate GlobalSnow SWE series for each basin.

aggregate_TRMM_P(basin_shp)

Aggregate TRMM precipitation for each basin.

aggregate_func_SWE_axis0(data_array)

Aggregate SWE values with invalid-code filtering (axis-0 variant).

aggregate_func_SWE_axis1(data_array)

Aggregate SWE values with invalid-code filtering (axis-1 variant).

easy_vic_build.tools.dpc_func.aggregate.aggregate_GLEAMEDaily(basin_shp)[source]

Aggregate daily GLEAM evaporation (E) for each basin.

Parameters:

basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

Returns:

Input dataset with an added aggregated_E column.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.aggregate.aggregate_GLEAMEpDaily(basin_shp)[source]

Aggregate daily GLEAM potential evaporation (Ep) for each basin.

Parameters:

basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

Returns:

Input dataset with an added aggregated_Ep column.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.aggregate.aggregate_TRMM_P(basin_shp)[source]

Aggregate TRMM precipitation for each basin.

Parameters:

basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

Returns:

Input dataset with an added aggregated_precipitation column.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.aggregate.aggregate_ERA5_SM(basin_shp, aggregate_column='swvl1')[source]

Aggregate ERA5 soil-moisture series for each basin.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

  • aggregate_column (str, optional) – Grid column name to aggregate (default is "swvl1").

Returns:

Input dataset with an added aggregated_<aggregate_column> column.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.aggregate.aggregate_func_SWE_axis1(data_array)[source]

Aggregate SWE values with invalid-code filtering (axis-1 variant).

Parameters:

data_array (array-like) – SWE values to aggregate.

Returns:

Mean SWE after removing invalid values.

Return type:

float

Notes

Values < 0, NaN, and 0.001 are excluded before averaging.

easy_vic_build.tools.dpc_func.aggregate.aggregate_func_SWE_axis0(data_array)[source]

Aggregate SWE values with invalid-code filtering (axis-0 variant).

Parameters:

data_array (array-like) – SWE values to aggregate.

Returns:

Mean SWE after removing invalid values.

Return type:

float

Notes

Values < 0, NaN, and 0.001 are excluded before averaging.

easy_vic_build.tools.dpc_func.aggregate.aggregate_GlobalSnow_SWE(basin_shp, aggregate_column='swe')[source]

Aggregate GlobalSnow SWE series for each basin.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

  • aggregate_column (str, optional) – Grid column name to aggregate (default is "swe").

Returns:

Input dataset with an added aggregated_<aggregate_column> column.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.aggregate.aggregate_GLDAS_CanopInt(basin_shp, aggregate_column='CanopInt_tavg')[source]

Aggregate GLDAS canopy interception for each basin.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing an intersects_grids column.

  • aggregate_column (str, optional) – Grid column name to aggregate (default is "CanopInt_tavg").

Returns:

Input dataset with an added aggregated_<aggregate_column> column.

Return type:

geopandas.GeoDataFrame