1

Is there any easy way to convert GRIB1 files to CSV in Linux? I've seen that supposedly GRIB2 can readily be converted to CSV, and I've tried to convert the Grib1 files to Grib2 using grib1to2 but its a nightmare as the documentation and software is no good. Is there any other way to get a CSV or any other easily readable format out of GRIB1?

1 Answer 1

3

There is probably a cleaner approach, but the following should work for you under Linux. Using CDO (Climate Data Operators), you could convert your GRIB file to NetCDF:

cdo -f nc copy input.grb2 output.nc

You could then convert your NetCDF to plain text using ncdump, e.g.:

ncdump output.nc

You will probably want to review some examples about ncdump to ensure that you export the parts (and region) of the NetCDF file that you want.

You can install the relevant packages on linux (e.g. Ubuntu as follows)

sudo apt-get install cdo nco netcdf-bin
2
  • Thank you. However I get this error: Error (operatorInqModID) : operator missing! input.grib is a file on disk!
    – bjornasm
    Commented Nov 24, 2016 at 11:38
  • insert copy in cdo (see update above)
    – dmci
    Commented Nov 24, 2016 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.