Skip to main content

Python interface to the NCEP G2C Library for reading/writing GRIB2 files.

Project description

grib2io

Build Status Python 3.6 Python 3.7 Python 3.8 Python 3.9 Python 3.10 PyPI version Binder

Introduction

grib2io provides a Python interface to the NCEP GRIB2 C library for reading and writing GRIB2 files. The World Meteorological Organization (WMO) GRIdded Binary, Edition 2 (GRIB2) is a table-driven, binary data format designed for transmitting large volumes of gridded meteorological and atmospheric data.

grib2io is the successor to ncepgrib2 which was a module within pygrib. As of pygrib v2.1, development of ncepgrib2 was dropped in favor of continued development of the pygrib module which provides an interface to the ECMWF ecCodes library. grib2io aims to provide a fast, efficient, and easy-to-use interface to the NCEP g2c library. One way to accomplish this is to leverage the NCEP GRIB2 Tables which are included in grib2io. With these tables included and functions interact with them, grib2io provides a translation of GRIB2's integer coded metadata to human-readable language.

Required Software

  • Python 3.6+
  • setuptools 34.0+
  • NumPy 1.12+
  • pyproj 1.9.6+
  • C Compiler: GCC, Intel, and Apple Clang have been tested.

Optional Software

By default, grib2io will automatically attempt to identify compression library and include paths. The default JPEG compression library is OpenJPEG. The automatic searching has been testing on macOS 12 (Monterey) using Homebrew and Linux (RHEL/Fedora, openSUSE, and Debian/Ubuntu).

Installation

For root or sudo installations:

sudo pip3 install grib2io

For user installations:

pip3 install grib2io --user

Build and Install from Source

  • Clone GitHub repository or download a source release from GitHub or PyPI.

  • Copy setup.cfg.template to setup.cfg, open in text editor, follow instructions in comments for editing OR in your shell environment, define the library-specific environment variables.

  • Build and install. Use --user to install into personal space ($HOME/.local).

python3 setup.py build
python3 setup.py install

Development

The intention of grib2io is to become the offical Python interface for the NCEP g2c library. Therefore, the development evolution of grib2io will mainly focus on how best to serve that purpose and its primary user's -- mainly meteorologist, physical scientists, and software developers supporting the missions within NOAA's National Weather Service (NWS) and National Centers for Environmental Prediction (NCEP).

GitPod

For an even easier way to begin developing with grib2io, you can use the included Gitpod configuration file. You can quickly get started by doing one of the following:

Gitpod will spin up a new throw-away containerized development environment just for you with all of required dependencies already installed, then launch Visual Studio Code in your browser...You're Ready to Code!

Best of all, Gitpod is free for up to 50hrs per month!

Learn more about Gitpod here or take a look at their FAQ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grib2io-1.0.2.tar.gz (896.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page