Project

General

Profile

Trouble converting NetCDF to GRIB2 in Cygwin env

Added by Shane Brown 6 months ago

Hello,

We have a legacy system that requires GRIB2 input so I am tasked with converting these new NCAR CONUS404 .nc files to GRIB2.

I am using a Cygwin/Windows environment running CDO 2.0.5 with NetCDF library 4.8.1 and ecCodes library 2.9.0.

Running

cdo -f grb2 -copy in.nc out.grib 
produces this error-

ECCODES ERROR:  Unable to load sample file GRIB2.tmpl in C:\cygwin64\usr\share\eccodes\samples
Error (gribHandleNew):  grib_handle_new_from_samples failed!

From what I can tell, this path, which is part of my PATH variables, points to the ecCodes templates where GRIB2.tmpl exists.

I've attached a sample NetCDF with a handful of variables at a single timestep. Details on the NCAR CONUS404 dataset can be found here (https://rda.ucar.edu/datasets/ds559.0/)

Appreciate any help in getting this conversion to work!


Replies (1)

RE: Trouble converting NetCDF to GRIB2 in Cygwin env - Added by Shane Brown 6 months ago

Turned out all I really needed to do was wipe the slate clean and start over with a fresh package install of CDO and ecCodes. I'm able to run the above command now with no issues.

    (1-1/1)