blaylockbk / Herbie

Download numerical weather prediction datasets (HRRR, RAP, GFS, IFS, etc.) from NOMADS, NODD partners (Amazon, Google, Microsoft), ECMWF open data, and the University of Utah Pando Archive System.
https://herbie.readthedocs.io/
MIT License
480 stars 72 forks source link

Enhancement: New helper functions to find the latest model data, `HerbieLatest` and `HerbieWait` #274

Closed blaylockbk closed 8 months ago

blaylockbk commented 8 months ago

Building on the discussion in https://github.com/blaylockbk/Herbie/discussions/272, this PR adds two Herbie helper functions

These functions are simply loop over making a Herbie class until a recent model grid is found.

HerbieLatest will return the most recent model available while HerbieWait will wait for the next available. I haven't been patient enough to test that HerbieWait actually works, but I think it should.

These might be helpful to people who need to get the latest real-time model data rather than looking for archived content.

To use,

from herbie import HerbieLatest

H = HerbieLatest(model='hrrr')

(See also the notebook in the documentation User_Guide>Tutorials>Latest_Data