bakaano.veget¶
Runoff generation and routing using the VegET formulation.
Role: Compute daily runoff and route flow to river network.
- class bakaano.veget.VegET(working_dir, study_area, start_date, end_date, climate_data_source, routing_method='mfd', runoff_output_dir=None, tree_cover_tiff=None, herb_cover_tiff=None, ndvi_pickle_path=None)[source]¶
Bases:
objectRole: Orchestrate VegET runoff generation and routing.
- compute_veget_runoff_route_flow(resume=True, checkpoint_days=30)[source]¶
Compute VegET runoff and route flow to the river network.
This routine loads climate inputs, computes PET, simulates soil moisture and runoff, and performs routing to produce daily routed runoff outputs.
- Parameters:
resume (bool) – Resume from checkpoint state if available.
checkpoint_days (int) – Number of simulated days between checkpoints.
- Returns:
None. Writes routed runoff outputs to
{working_dir}/runoff_output.
- bakaano.veget.update_soil_and_runoff(soil_moisture, eff_rain, ETa, max_allowable_depletion, whc)¶
Corrected Numba-optimized soil moisture and runoff update. All inputs must be float32 NumPy arrays (2D).
- Parameters:
soil_moisture (np.ndarray) – Current soil moisture grid (ny, nx).
eff_rain (np.ndarray) – Effective rainfall grid (ny, nx).
ETa (np.ndarray) – Actual evapotranspiration grid (ny, nx).
max_allowable_depletion (np.ndarray) – Max allowable depletion grid.
whc (np.ndarray) – Water holding capacity grid.
- Returns:
(updated soil_moisture, surface runoff).
- Return type:
tuple[np.ndarray, np.ndarray]