netcdfgribcdo-climate

Convert grib to netcdf file


Is there a way to convert a grib file into a NetCDF format on Windows?
I use a software named tkdegrib but it catches one argument by one argument whereas I want all my grib's arguments in the same file. Unfortunately, I can't use Linux.


Solution

  • I would use Unidata's NetCDF-Java library.

    It reads GRIB and GRIB2 files (as well as many others), and can write NetCDF files. And since it's Java, you don't have to build anything, and it works on all platforms. There is a ToolsUI application that you can use if you want a GUI, but more likely you want to do it from the command line using something like this:

     java -Xmx512m -classpath netcdfAll-4.3.jar ucar.nc2.dataset.NetcdfDataset -in infile.grib2 -out outfile.nc
    

    Good luck!