LAIR: Land-Air Interactions Research#
lair is a collection of tools that I have developed/acquired for my research
regarding land-air interactions. It is designed to make it easier to work with
atmospheric data: meteorological calculations, emissions inventories, NOAA
greenhouse-gas products, soundings, HRRR winds, background estimation, mobile
transects, geospatial helpers, and plotting.
Installation#
Install from the git repository with pip:
pip install git+https://github.com/jmineau/lair.git
or clone the repository and install it as an editable package:
git clone https://github.com/jmineau/lair.git
cd lair
pip install -e .
lair requires Python 3.10 or higher.
Optional dependencies#
The core install is light. Modules that need heavier packages import them only
when used; install the matching extra (e.g. pip install "lair[geo,science]"):
Extra |
Packages |
Used by |
|---|---|---|
|
boto3, requests, s3fs, siphon |
|
|
zarr, numcodecs, fastkml, lxml |
|
|
cartopy, networkx, pyproj, rasterio, rioxarray, shapely |
|
|
molmass, scipy |
|
|
xesmf |
|
|
all of the above |
xesmf needs the ESMF library, which is easiest to get from conda-forge:
mamba install -c conda-forge esmpy
Data locations#
lair has no built-in data paths. Functions and classes that read from a
local data archive take an explicit directory argument and otherwise fall back
to an environment variable:
Variable |
Used by |
|---|---|
|
|
|
|
|
|
|
|
|
cached results (default |
For example:
export LAIR_INVENTORY_DIR=/path/to/inventories
Verbosity#
Verbosity is set via lair.config.verbose as a boolean:
import lair
lair.config.verbose = False
For early versions of the package verbose defaults to True; this will
change in a future version.
Acknowledgements#
This package was partially inspired by, and uses some code generously provided by, Brian Blaylock’s Carpenter Workshop. Background filtering wraps NOAA GML’s CCG curve-fitting code.
Disclaimer#
Portions of this package were written with AI-based tools including GitHub Copilot, ChatGPT, and Google Gemini.
Various code snippets were borrowed from StackOverflow and other online resources.
Contributing#
Contributions are welcome! Please take a look at the current issues and feel free to submit a pull request with new features or bug fixes. Please document your code using numpydoc style docstrings.
Citation#
If you use any portion of this package in your research, please cite the software and/or acknowledge me.