easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.hydroanalysis

Module easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.hydroanalysis.

Functions

hydroanalysis_for_level0(working_directory, ...)

Run full hydrological analysis at level-0 DEM resolution.

hydroanalysis_for_level1(working_directory, ...)

Run hydrological analysis at level-1 (routing/model grid scale).

easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.hydroanalysis.hydroanalysis_for_level0(working_directory, dem_level0_path, stream_acc_threshold=None, filldem_kwargs={}, d8_flowdirection_kwargs={}, d8_flowaccumulation_kwargs={}, calculate_streamnetwork_threshold_kwargs={}, d8_streamnetwork_kwargs={}, snap_outlet_to_stream_kwargs={}, delineate_basins_for_snaped_outlets_kwargs={}, crs_str='EPSG:4326', esri_pointer=True, outlets_with_reference_coords=None)[source]

Run full hydrological analysis at level-0 DEM resolution.

The workflow includes DEM filling, flow direction/accumulation, stream extraction, outlet detection/snapping, basin delineation, and stream clipping.

Parameters:
  • working_directory (str) – Path to working directory where outputs will be saved.

  • dem_level0_path (str) – Path to input DEM file for level 0 analysis.

  • stream_acc_threshold (float, optional) – Stream extraction threshold. If None, it is estimated from inputs.

  • filldem_kwargs (dict, optional) – Extra keyword arguments forwarded to fill_dem.filldem.

  • d8_flowdirection_kwargs (dict, optional) – Extra keyword arguments for D8 flow direction.

  • d8_flowaccumulation_kwargs (dict, optional) – Extra keyword arguments for D8 flow accumulation.

  • calculate_streamnetwork_threshold_kwargs (dict, optional) – Extra keyword arguments for threshold estimation.

  • d8_streamnetwork_kwargs (dict, optional) – Extra keyword arguments for stream extraction.

  • snap_outlet_to_stream_kwargs (dict, optional) – Extra keyword arguments for outlet snapping.

  • delineate_basins_for_snaped_outlets_kwargs (dict, optional) – Extra keyword arguments for basin delineation.

  • crs_str (str, optional) – CRS used when creating outlet vectors.

  • esri_pointer (bool, optional) – Whether D8 direction encoding follows ESRI convention.

  • outlets_with_reference_coords (tuple, optional) – Reference outlet coordinates as (x_coords, y_coords). Each element should be an iterable of equal length.

Returns:

True if analysis completes successfully.

Return type:

bool

Notes

Typical outputs include filled_dem.tif, flow_direction.tif, flow_acc.tif, stream/outlet shapefiles, and basin polygons.

easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.hydroanalysis.hydroanalysis_for_level1(working_directory, dem_level1_path, stream_acc_threshold=None, filldem_kwargs={}, d8_flowdirection_kwargs={}, d8_flowaccumulation_kwargs={}, calculate_streamnetwork_threshold_kwargs={}, d8_streamnetwork_kwargs={}, snap_outlet_to_stream_kwargs={}, crs_str='EPSG:4326', esri_pointer=True, outlets_with_reference_coords=None, fill_dem_bool=True)[source]

Run hydrological analysis at level-1 (routing/model grid scale).

Outputs are used by downstream routing preparation workflows (for example, RVIC parameter construction).

Parameters:
  • working_directory (str) – Path to working directory where outputs will be saved.

  • dem_level1_path (str) – Path to input DEM file for level 1 analysis.

  • stream_acc_threshold (float, optional) – Stream extraction threshold. If None, it is estimated from inputs.

  • filldem_kwargs (dict, optional) – Extra keyword arguments forwarded to fill_dem.filldem.

  • d8_flowdirection_kwargs (dict, optional) – Extra keyword arguments for D8 flow direction.

  • d8_flowaccumulation_kwargs (dict, optional) – Extra keyword arguments for D8 flow accumulation.

  • calculate_streamnetwork_threshold_kwargs (dict, optional) – Extra keyword arguments for threshold estimation.

  • d8_streamnetwork_kwargs (dict, optional) – Extra keyword arguments for stream extraction.

  • snap_outlet_to_stream_kwargs (dict, optional) – Extra keyword arguments for outlet snapping.

  • crs_str (str, optional) – CRS used when creating outlet vectors.

  • esri_pointer (bool, optional) – Whether D8 direction encoding follows ESRI convention.

  • outlets_with_reference_coords (tuple, optional) – Reference outlet coordinates as (x_coords, y_coords). Each element should be an iterable of equal length.

  • fill_dem_bool (bool, optional) – If True, run DEM filling first; otherwise use dem_level1_path directly as analysis DEM.

Returns:

True if analysis completes successfully.

Return type:

bool

Notes

Main outputs include flow_direction.tif, flow_acc.tif, stream_raster.tif, and snapped outlet shapefiles.