easy_vic_build.tools.dpc_func.select_basin_shp

Basin selection helpers based on streamflow and basin attributes.

This module provides filtering utilities for basin-level GeoDataFrames, such as filtering by streamflow completeness, area range, and zero-flow behavior.

Functions

selectBasinBasedOnArea(basin_shp, min_area, ...)

Select basins by area range.

selectBasinBasedOnAridity(basin_shp, aridity)

Select basins by aridity threshold.

selectBasinBasedOnElevSlope(basin_shp, ...)

Select basins by elevation-slope threshold.

selectBasinStreamflowWithZero(basin_shp, ...)

Select basins that have many zero streamflow records.

selectBasinremovingStreamflowMissing(basin_shp)

Remove basins with missing streamflow within a given date period.

easy_vic_build.tools.dpc_func.select_basin_shp.selectBasinremovingStreamflowMissing(basin_shp, date_period=['19980101', '20101231'])[source]

Remove basins with missing streamflow within a given date period.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing hru_id values.

  • date_period (list of str, optional) – Two-element date range [start, end] in YYYYMMDD format.

Returns:

Filtered basin dataset with valid streamflow records for date_period.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.select_basin_shp.selectBasinBasedOnArea(basin_shp, min_area, max_area)[source]

Select basins by area range.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing AREA_km2.

  • min_area (float) – Minimum basin area in square kilometers.

  • max_area (float) – Maximum basin area in square kilometers.

Returns:

Filtered basin dataset with AREA_km2 in [min_area, max_area].

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.select_basin_shp.selectBasinStreamflowWithZero(basin_shp, usgs_streamflow, streamflow_id, zeros_min_num=100)[source]

Select basins that have many zero streamflow records.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset containing hru_id values.

  • usgs_streamflow (list of pandas.DataFrame) – Streamflow tables corresponding to basin IDs.

  • streamflow_id (list) – Streamflow IDs corresponding to usgs_streamflow.

  • zeros_min_num (int, optional) – Minimum zero-flow count threshold. Basins with counts greater than this value are retained.

Returns:

Filtered basin dataset with selected zero-flow basins.

Return type:

geopandas.GeoDataFrame

easy_vic_build.tools.dpc_func.select_basin_shp.selectBasinBasedOnAridity(basin_shp, aridity)[source]

Select basins by aridity threshold.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset to filter.

  • aridity (float) – Aridity threshold value.

Returns:

This function is currently not implemented.

Return type:

None

easy_vic_build.tools.dpc_func.select_basin_shp.selectBasinBasedOnElevSlope(basin_shp, elev_slope)[source]

Select basins by elevation-slope threshold.

Parameters:
  • basin_shp (geopandas.GeoDataFrame) – Basin dataset to filter.

  • elev_slope (float) – Elevation-slope threshold value.

Returns:

This function is currently not implemented.

Return type:

None