iwfm.calib.stacdep2obs¶
- iwfm.calib.stacdep2obs(budget_file, reach_file, nwidth=20)[source]¶
Convert stream-groundwater flows from IWFM Stream Budget to the SMP file format for use by PEST.
(Based on STACDEP2OBS.F90 by Matt Tonkin, SSPA with routines by John Doherty.)
Reads
budget_fileandreach_file, then delegates the SMP/INS formatting toformat_stacdep_smp(). Use that helper directly if you already have parsed budget data.- Parameters:
- Returns:
stacdep (list) – Stream-depletion observation values for each group in SMP format.
ins (list) – Corresponding PEST instructions for the SMP file.
- Raises:
FileNotFoundError – If
reach_filedoes not exist.IndexError – If any group references a reach number beyond the budget file’s reach count (propagated from
format_stacdep_smp()).ValueError – If the budget or reach file is malformed (numeric tokens fail to parse).