Han Zhengzu
Han Zhengzu

Reputation: 3852

Reading grib2 format data without pygrib package

I'm familiar with reading and extracting information on grib2 format meteorology data with the python package pygrib. It's easy to implement.

I have tried to install the pygrib package in Linux cluster using conda install.

But when I import this package, the error comes with follow information:

Traceback (most recent call last): File "", line 1, in ImportError: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /home/hyf/anaconda2/lib/python2.7/site-packages/../../libgrib_api.so)

I could't update the glibc version to 2.7 due to the privilege limits. I have tried to compile the glibc-2.7 manually but causing terrible Segmentation faults.

Is there any alternative method to read grib2 data without the support of pygrib.

Any comments and advice would be appreciate!

Upvotes: 1

Views: 2189

Answers (1)

Stankinator
Stankinator

Reputation: 41

If you can read netcdf and don't mind relying on an external program, you should be able to convert grib2 to netcdf with wgrib2:

wgrib2 grib2_file.grb2 -netcdf netcdf_file.nc

Upvotes: 4

Related Questions