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
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
-
Thank you. However I get this error:
Error (operatorInqModID) : operator missing! input.grib is a file on disk!
– bjornasmCommented Nov 24, 2016 at 11:38 -