|
NEP 2.7.0
NetCDF Extension Pack
|
GRIB2 is the standard binary format used by NOAA, ECMWF, and other meteorological agencies for gridded NWP model output and wave forecasts.
Transparent Access: Read GRIB2 files with nc_open(), nc_get_var(), and ncdump.
Product-to-Variable Mapping: Each GRIB2 product becomes a named NC_FLOAT variable with shared [y, x] dimensions. Variable names come from g2c_param_abbrev(); duplicates are uniquified with _2, _3 suffixes.
Full Grid Expansion: NC_GRIB2_get_vara() expands the full [ny, nx] grid, substituting _FillValue = 9.999e20f for bitmap-masked (land) points.
Metadata: Per-variable attributes (long_name, _FillValue, GRIB2_discipline, GRIB2_category, GRIB2_param_number) and global attributes (Conventions = "GRIB2", GRIB2_edition = 2).
**.ncrc Autoload**: Append the installed .ncrc to ~/.ncrc and nc_open() / ncdump work on .grib2 files with no code changes.
Use Cases: NOAA GDAS, GFS, NAM, HRRR model output; ocean wave forecasts.
Enabling:
Dependencies: NOAA NCEPLIBS-g2c ≥ 2.1.0, libjasper ≥ 3.0.0.
Resources: NCEP GRIB2 Documentation · WMO GRIB2 Specification · NCEPLIBS-g2c
Example:
Or with ncdump: