Salt Lake Valley python modules
git clone https://github.com/jmineau/slv.git
cd slv
uv sync # or: pip install -e .To include the inversion module:
uv sync --extra inversion # or: pip install -e ".[inversion]"uv sync also installs the dev group (tests, linting, docs), which includes the
inversion extra.
The EPA and EDGAR priors are regridded with xesmf, which needs a compiled ESMF
library from conda-forge, so install into the conda environment instead:
git clone https://github.com/jmineau/slv.git
cd slv
conda env create -f ci/environment.yml
conda activate slv
pip install --no-deps -e .A map of the valley:
from slv.basemap import SaltLake
m = (SaltLake(tiles="terrain") # Stadia stamen_terrain; needs $STADIA_API_KEY
.add_population()
.add_trax(lines="RG")
.add_sites(["wbb", "ldf", "hdp"], labels={"wbb": "UOU"})
.add_mesowest()
.add_legend().add_inset().add_north_arrow())
m.fig.savefig("slv.png", dpi=300)A methane inversion (builds the Jacobian from the PYSTILT footprints; run it through SLURM):
from slv.inversion import InversionConfig, SLVMethaneInversion
config = InversionConfig(tstart="2016-01-01", tend="2024-01-01", flux_freq="MS",
sites=["wbb"], footprint="0.01", cache="./cache")
problem = SLVMethaneInversion(config).run()The usage guide also covers loading measurements, hyperparameter sweeps and building TRAX receptors.
Full documentation is available at https://jmineau.github.io/slv/
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
James Mineau - jmineau