Herbie 2024.7.0
I'm excited about this release because I brought in some tools for plotting data that I've developed over the years from Carpenter_Workshop into Herbie. I hope people will test it, tell me if they are helpful for you, and tell me if I've broken anything.
Optional Dependencies
The "core" function of Herbie is to download data and read it with xarray. Thus, extra features, like plotting and extracting data at a point, now require installing "extra" dependencies that are not automatically installed. These optional dependencies include cartopy
, metpy
, matplotlib
, and scikit-learn
.
- Installing Herbie from conda-forge will always install extra dependencies.
- Install from pip
pip install herbie-data
will only install core dependencies. - Install from pip
pip install herbie-data[extras]
will install dependencies for extra features.
I anticipate this might cause some breaking changes for people. If this change didn't get it right, please open an issue (and offer some help).
Numpy <2.0
Related to dependencies, it seems pygib isn't working with Numpy 2.0 jswhit/pygrib#251, so I've tagged Herbie to require numpy<2.0
. Please let me know if this changes or you have an idea to fix this. Actually, pygrib is only used by Herbie to parse the coordinate reference system from the grib files. It would be nice if Herbie didn't need to depend on pygrib (PR anyone??). Maybe pygrib should be another optional dependency.
Mature functions from Carpenter_Workshop moved into Herbie
I use my Carpenter Workshop repository as a workshop for building new stuff and testing ideas. Some of the tools I made there I use nearly every day (my EasyMap class for making Cartopy more simple), so I've migrated some of the mature features into Herbie.
from herbie.toolbox import EasyMap
EasyMap lets you make a cartopy axes without a lot of boilerplate code. I find it useful. Read more in the docs.ax = EasyMay('50m', crs=..., figsize=[10,8]).STATES().LAND().OCEAN().BORDERS().ax
from herbie.toolbox import ...
Other stuff in the toolbox, like unit conversionsfrom herbie import paint
Paint is a bunch of additional colormaps I've collected over the years that I think look nice. For example, here are the National Weather Service standard color curves:
I'm not completely satisfied with how these are implemented and organized, so this is considered an unstable feature. The documentation is fresh and incomplete.
What's Changed
- Add GFS GraphCast AI Model by @karlwx in #313
- Include
uvRelativeToGrid
as GRIB key included in DataArray attrs by @blaylockbk in #316 - Improving HerbieWait by @karlwx in #322
- Optional dependencies by @rafa-guedes in #319
- Migrate mature capabilities from Carpenter_Workshop into Herbie by @blaylockbk in #312
- Add xarray accessor
with_wind()
to compute wind speed/direction by @blaylockbk in #314 - add accessors to_180 and to_360 by @blaylockbk in #335
New Contributors
- @karlwx made their first contribution in #313
- @rafa-guedes made their first contribution in #319
Full Changelog: 2024.5.0...2024.7.0