Skip to content

Herbie 2024.7.0

Compare
Choose a tag to compare
@blaylockbk blaylockbk released this 02 Jul 04:55
· 57 commits to main since this release
4d9b6d4

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.

  1. Installing Herbie from conda-forge will always install extra dependencies.
  2. Install from pip pip install herbie-data will only install core dependencies.
  3. 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.

  1. 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
  2. from herbie.toolbox import ... Other stuff in the toolbox, like unit conversions
  3. from 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:
    image
    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

New Contributors

Full Changelog: 2024.5.0...2024.7.0