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. pixi installs it beside everything
else, from pixi.lock:
git clone https://github.com/jmineau/slv.git
cd slv
pixi install # builds .pixi/envs/default
pixi run python # or: pixi shellA 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_locator_map().add_north_arrow())
m.fig.savefig("slv.png", dpi=300)A methane inversion (builds the Jacobian from the PYSTILT footprints; run it through
SLURM, in the pixi environment: the default prior needs xesmf, and on Python 3.14 a
script needs an if __name__ == "__main__": guard, see the
usage guide):
from slv.inversion import InversionConfig, run
config = InversionConfig(tstart="2016-01-01", tend="2024-01-01", flux_freq="MS",
sites=["wbb"], variant="hrrr", cache="./cache")
post = run(config) # a fips Posterior: post.estimate, post.variances, post.cov(W)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 developed with the help of AI coding agents, directed and reviewed by the maintainer, who owns the design and the science.
This project is licensed under the MIT License - see the LICENSE file for details.
James Mineau - jmineau