easy_vic_build.build_hydroanalysis
Hydroanalysis utilities for level-0 and level-1 VIC workflows.
Public functions
buildHydroanalysis_level0Run level-0 hydroanalysis from an existing DEM file.
buildHydroanalysis_level1Create level-1 DEM, flow direction/accumulation rasters, and flow distance.
buildRivernetwork_level1Build river-network graphs from level-1 hydroanalysis outputs.
Notes
The current implementation only supports flow_direction_pkg="wbw".
Functions
|
Run level-0 hydroanalysis from a prepared DEM raster. |
|
Build level-1 hydroanalysis products for one case. |
|
Build river-network graphs from level-1 hydroanalysis outputs. |
- easy_vic_build.build_hydroanalysis.buildHydroanalysis_level0(evb_dir, dem_level0_path, flow_direction_pkg='wbw', **kwargs)[source]
Run level-0 hydroanalysis from a prepared DEM raster.
- Parameters:
evb_dir (Evb_dir) – Case directory manager. Results are written under
evb_dir.Hydroanalysis_dir.dem_level0_path (str) – Path to the level-0 DEM raster.
flow_direction_pkg (str, optional) – Flow-direction backend. Only
"wbw"is supported.**kwargs – Extra keyword arguments forwarded to
hydroanalysis_wbw.hydroanalysis_for_level0.
- Return type:
None
- easy_vic_build.build_hydroanalysis.buildHydroanalysis_level1(evb_dir, params_dataset_level1, domain_dataset, reverse_lat=True, stream_acc_threshold=None, flow_direction_pkg='wbw', crs_str='EPSG:4326', **kwargs)[source]
Build level-1 hydroanalysis products for one case.
- Parameters:
evb_dir (Evb_dir) – Case directory manager. Output files are written to
evb_dir.Hydroanalysis_dir.params_dataset_level1 (netCDF4.Dataset) – Parameter dataset that provides level-1
latandlon.domain_dataset (netCDF4.Dataset) – Domain dataset that provides
x_lengthandy_length.reverse_lat (bool, optional) – Whether latitude order should be reversed when exporting DEM.
stream_acc_threshold (float, optional) – Threshold forwarded to the WBW hydroanalysis implementation.
flow_direction_pkg (str, optional) – Flow-direction backend. Only
"wbw"is supported.crs_str (str, optional) – CRS used when writing output rasters.
**kwargs – Extra keyword arguments forwarded to
hydroanalysis_wbw.hydroanalysis_for_level1.
- Returns:
This function writes:
dem_level1.tif,flow_direction.tif,flow_acc.tif, andflow_distance.tif.- Return type:
None
- easy_vic_build.build_hydroanalysis.buildRivernetwork_level1(evb_dir, threshold=None, domain_dataset=None, plot_bool=False, labeled_nodes=None)[source]
Build river-network graphs from level-1 hydroanalysis outputs.
- Parameters:
evb_dir (Evb_dir) – Case directory manager.
flow_direction.tifandflow_acc.tifare read fromevb_dir.Hydroanalysis_dir.threshold (float, optional) – Flow-accumulation threshold used to extract the network.
domain_dataset (netCDF4.Dataset, optional) – Domain dataset that provides the
maskvariable. IfNone,evb_dir.domainFile_pathis opened internally.plot_bool (bool, optional) – If
True, generate plotting figures and include them in the output.labeled_nodes (iterable, optional) – Optional node labels forwarded to the plotting routine.
- Returns:
Dictionary containing river-network graphs, path statistics, and optional figure objects.
- Return type:
dict