0

The syntax for using eccode to convert GRIB to NetCDF is clear. However, I'm wondering if there's a way to convert an entire folder of GRIB files into NetCDF using the old file names. I attempted to do this using the command below, but it didn't work:

grib_to_netcdf -o *.nc *.grib

Any suggestions on how to accomplish this would be appreciated. Thanks in advance!


Edit: If one prefers not to solve this through the Bash shell, the quickest solution is to use CDO conversion, even though the eccode module is more powerful and comprehensive.

S.Kociok
  • 168
  • 1
  • 14
  • 1
    You will need to use a loop and do the files one by one. The output in your file should only be a single file, not a wild card – Robert Wilson Jan 30 '23 at 18:44
  • Thanks a lot. I install now cdo :D that was faster and i can use it direct in a bash script without anly loops. – S.Kociok Feb 02 '23 at 11:23

0 Answers0