Skip Navigation Links www.nws.noaa.gov 
NOAA logo - Click to go to the NOAA home page National Weather Service   NWS logo - Click to go to the NWS home page
Climate Prediction Center
 
 

 
About Us
   Our Mission
   Who We Are

Contact Us
   CPC Information
   CPC Web Team

 
HOME > Monitoring_and_Data > Oceanic and Atmospheric Data > Reanalysis: Atmospheric Data > wgrib2-end
 

wgrib2: -nc4, -nc3

Introduction

Wgrib2 can be compiled to use either the netCDF v3 (netCDF3) or netCDF v4 (netCDF4) libraries. If wgrib2 is compiled with the netCDF3, you can neither read nor write netCDF4 files. However, if wgrib2 is compiled with netCDF4, wgrib2 can read and write netCDF3 and netCDF4 files. The disadvantage of linking in netCDF4 is that the wgrib2 executable is much larger, compiling wgrib2 can now take hours (1.1 GHz Apollo Lake), and problems have been encountered in compiling the latest hdf5 library with newer compilers (12/2018).

The -nc4 and -nc3 options toggle the type of netcdf file written. The former option will have the netcdf file be netcdf-4 format with compression turned on. The latter will have the netcdf file be uncompressed in netcdf-3 format.

Simple usage

-nc3
-nc4

Example 1

$ wgrib2 ../example/eta.t00z.awphys18.grb2 -nc4 -netcdf eta.nc

The above line converts the grib2 file into a netcdf4 file assuming wgrib2 was
compiled with netCDF4.

See also: -netcdf, -nc3 -nc4


NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5830 University Research Court
College Park, Maryland 20740
Climate Prediction Center Web Team
Page last modified: Jan. 27, 2014
Disclaimer Privacy Policy