This repo has code for the SWOT discharge integrator, to eventually replace an earlier version on SWOT Confluence (https://github.com/swOT-Confluence/moi).
This repo is designed to hold code, notebooks and functions to enable reproduction of the calculations in the first manuscript describing the algorithm, to be submitted to WRR in September, 2025.
Description of files:
- IntegrateWillamette.ipynb: integrator algorithm run on the Willamette River. (Ohio and Loire notebooks to be added)
- adjust_lsq_mult.py: function to implement least squares adjustment for multiplicative error: essentially just a wrapper to call the actual adjustment function iteratively until weights are optimal
- adjust_lsq.py: function to implement least squares adjustment
- B-willamette.csv, B-ohio.csv, B-loire.csv: intermediate products saved by the notebook to save computation time
- fix_drainage_area.py: function to implement least squares adjustment to fix drainage area estiamtes
- gage_qbar_willamette.csv, gage_qbar_ohio.csv, gage_qbar_loire.csv: dataframes with gage data across each basin
- sfoi_experiment.py: class to hold all experiment data, plot, etc.
- sfoi_utils.py, SolutionUtils.py: functions to assist in implementing algorithms
- sic4dvarintgrator_init_willamette.csv, sic4dvarintgrator_init_upohio.csv, sic4dvarintgrator_init_loire.csv: dataframes that hold the reach-scale discharge estimates for each reach
- sword_patches_v216_willamette.json, sword_patches_v216_ohio.csv, sword_patches_v216_loire.csv: patch files, readable by Confluence, to fix data elements in SWORD