Coder Social home page Coder Social logo

liupeng / herbie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blaylockbk/herbie

0.0 0.0 0.0 53.07 MB

Python for downloading model data (HRRR, RAP, GFS, NBM, etc.) from NOMADS, NOAA's Big Data Program partners (Amazon, Google, Microsoft), ECMWF open data, and the University of Utah Pando Archive System.

Home Page: https://blaylockbk.github.io/Herbie/_build/html/

License: MIT License

Python 100.00%

herbie's Introduction

Herbie: Retrieve NWP Model Data ๐ŸŽ๐Ÿ

DOI Code style: black

Herbie is a python package that downloads recent and archived numerical weather prediction (NWP) model output from different cloud archive sources. NWP data is usually in GRIB2 format and can be read with xarray+cfgrib. Much of this data is made available through the NOAA Big Data Program which has made weather data more accessible than ever before.

Herbie helps you discover and download data from:

Install

Requires cURL and Python 3.8+ with requests, numpy, pandas, xarray, and cfgrib. Optional packages are matplotlib, cartopy, and Carpenter Workshop.

pip install herbie-data

or

pip install git+https://github.com/blaylockbk/Herbie.git

or, create the provided conda environment.

Capabilities

  • Search different data sources for model output.
  • Download full GRIB2 files
  • Download subset GRIB2 files (by grib field)
  • Read data with xarray
  • Read index file with Pandas
  • Plot data with Cartopy (very early development)
  graph TD;
      d1[(HRRR)] -.-> H
      d2[(RAP)] -.-> H
      d3[(GFS)] -.-> H
      d33[(GEFS)] -.-> H
      d4[(ECMWF)] -.-> H
      d5[(NBM)] -.-> H
      d6[(RRFS)] -.-> H
      H((Herbie))
      H --- .download
      H --- .xarray
      H --- .read_idx

      style H fill:#d8c89d,stroke:#0c3576,stroke-width:4px,color:#000000
Loading
from herbie.archive import Herbie

# Herbie object for the HRRR model 6-hr surface forecast product
H = Herbie(
  '2021-01-01 12:00',
  model='hrrr',
  product='sfc',
  fxx=6
)

# Download the full GRIB2 file
H.download()

# Download a subset, like all fields at 500 mb
H.download(":500 mb")

# Read subset with xarray, like 2-m temperature.
H.xarray("TMP:2 m")

Data Sources

Herbie downloads model data from the following sources, but can be extended to include others:

  • NOMADS
  • Big Data Program Partners (AWS, Google, Azure)
  • ECMWF Open Data Azure storage
  • University of Utah CHPC Pando archive

History

During my PhD at the University of Utah, I created, at the time, the only publicly-accessible archive of HRRR data. Over 1,000 research scientists and professionals used that archive.

โœ’ I wrote a paper about archiving HRRR data in the cloud

Blaylock B., J. Horel and S. Liston, 2017: Cloud Archiving and Data Mining of High Resolution Rapid Refresh Model Output. Computers and Geosciences. 109, 43-50. https://doi.org/10.1016/j.cageo.2017.08.005

In the later half of 2020, the HRRR data was made available through the NOAA Big Data Program. Herbie organizes and expands my original download scripts into a more coherent package with the extended ability to download more than just the HRRR and RAP model data and from many different archive sources.

I originally released this package under the name โ€œHRRR-Bโ€ because it only dealt with the HRRR data set and the โ€œBโ€ was for my first name initial. Since then, I have added the ability to download RAP, GFS, NBM, RRFS, and others with potentially more models in the future. Thus, this package was rename Herbie, named after one of my favorite childhood movie characters.

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Contributing Guidelines
๐Ÿ’ฌ GitHub Discussions
๐Ÿš‘ GitHub Issues
๐ŸŒ Personal Webpage
๐ŸŒ University of Utah HRRR archive

Thanks for using Herbie, and Happy Racing ๐ŸŽ๐Ÿ

- Brian

P.S. If you like Herbie, check out my other repos:

  • ๐ŸŒŽ GOES-2-go: A python package to download GOES-East/West data and make RGB composites.
  • ๐ŸŒก SynopticPy: A python package to download mesonet data from the Synoptic API.
  • ๐Ÿ”จ Carpenter Workshop: A python package with various tools I made that are useful (like easy funxtions to build Cartopy maps).
  • ๐Ÿ’ฌ Bubble Print: A silly little python package that gives your print statement's personality.
  • ๐Ÿ“œ MET Syntax: An extension for Visual Studio Code that gives syntax highlighting for Model Evaluation Tools (MET) configuration files.

Alternative Download Tools

As an alternative you can use rclone to download files from AWS or GCP. I quite like rclone. Here is a short rclone tutorial

herbie's People

Contributors

blaylockbk avatar djgagne avatar gitter-badger avatar wtoma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.