NCEPLIBS-grib_util

June 24, 2026 ยท View on GitHub

Important

This repository is now deprecated. The utilities have been moved to the NCEPLIBS-g2 project. The utilities will continue to be maintained as part of NCEPLIBS-g2. It is no longer necessary to install NCEPLIBS-grib_util.

NCEPLIBS-grib_util

This is a collection of NCEP GRIB related utilities, for GRIB1 and GRIB2.

GRIdded Binary or General Regularly-distributed Information in Binary form (GRIB) is a data format for meteorological and forecast data, standardized by the World Meteorological Organization (WMO). GRIB edition 1 was approved by the WMO Working Group on Data Management (WGDM) in 1994. GRIB edition 2 (GRIB2) was approved by the WGDM in 2003.

This is part of the NCEPLIBS project.

For more information see the NCEPLIBS-grib_util documentation and the NCEP WMO GRIB2 Documentation.

To submit bug reports, feature requests, or other code-related issues including installation and usage questions, please create a GitHub issue. For general NCEPLIBS inquiries, contact Edward Hartnett (secondary point of contact Alex Richert).

The grib_util Utilities

UtilityPurpose
cnvgribConvert between GRIB1 and GRIB2.
copygbCopy all or part of a GRIB1 file.p
copygb2Copy all or part of a GRIB2 file.
degrib2Inventory a GRIB2 file.
grb2indexCreate an index from a GRIB1 file.
grbindexCreate an index from a GRIB2 file.
tocgribCopy some GRIB2 fields to a new GRIB1 file.
tocgrib2Copy some GRIB2 fields to a new GRIB2 file.
tocgrib2superCopy some GRIB2 fields to a new GRIB2 file with super WMO header.
wgribManipulate GRIB1 files.

Prerequisite External Projects

ProjectNotes
JasperJPEG-2000 library
libpngPNG compression library
zlibzlib compression library

Prerequisite NCEPLIBS Projects

RepositoryNotes
NCEPLIBS-baciobinary I/O for NCEP models
NCEPLIBS-ipinterpolating between NCEP grids
NCEPLIBS-spspectral transform functions - only needed for NCEPLIBS-ip v4 and below
NCEPLIBS-g2Fortran implementation of the GRIB 2 functions
NCEPLIBS-w3emcGRIB1 library
RepositoryNotes
NCEPLIBS-g2cC implementation of the GRIB 2 functions
NCEPLIBS-g2tmplUtilities for GRIB2 templates

Authors

UtilityAuthor(s)User(s)
cnvgribStephen Gilbert, Gordon, Mark Iredell, Boi Vuong
copygbStephen Gilbert, Mark Iredell, Trojan, Boi VuongUFS_UTILS
copygb2Stephen Gilbert, Mark Iredell, Boi Vuong
degrib2Stephen Gilbert, Boi Vuongmany GRIB2 users
grb2indexMark Iredell, Stephen Gilbert, Boi Vuong
grbindexW. Ebisuzaki, Farley, Stephen Gilbert, Mark Iredell, Boi VuongFAA and AWIPS (CONUS grid id 211)
tocgribFarley, Stephen Gilbert, R. E. Jones, Boi VuongRAP for FAA
tocgrib2Farley, Stephen Gilbert, R. E. Jones, Boi Vuong(GFS, NAM, SMOKE, RAP, HRRR, NWPS, etc.) in production for AWIPS and NDFD
tocgrib2superFarley, Stephen Gilbert, R. E. Jones, Boi Vuong(GFS, NAM, SMOKE, RAP, HRRR, NWPS, etc.) in production for AWIPS and NDFD
wgribW. EbisuzakiFAA and AWIPS (CONUS grid id 211)

Code Manager : Hang Lei, Ed Hartnett

Installation

git clone https://github.com/NOAA-EMC/NCEPLIBS-grib_util # or download a release from https://github.com/NOAA-EMC/NCEPLIBS-grib_util/releases
# Use $CMAKE_PREFIX_PATH shell variable or -DCMAKE_PREFIX_PATH to point to dependencies
cmake -S NCEPLIBS-grib_util -B NCEPLIBS-grib_util/build # <add'l CMake options>
cmake --build NCEPLIBS-grib_util/build
ctest --test-dir NCEPLIBS-grib_util/build # <add'l CTest options>
# Install to CMAKE_INSTALL_PREFIX (/usr/local by default):
cmake --install NCEPLIBS-grib_util/build

NCEPLIBS-grib_util is also available through Spack as 'grib-util'.

Disclaimer

The United States Department of Commerce (DOC) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. DOC has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any claims against the Department of Commerce stemming from the use of its GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.