pygrib icon indicating copy to clipboard operation
pygrib copied to clipboard

Modify some data of one grib2 file?

Open lovechang1986 opened this issue 7 years ago • 3 comments

I just want to modify some data of one grib2 file and then write modified data and the others to a new grib2 file. Is there any way to achieve this goal?

lovechang1986 avatar Aug 02 '17 05:08 lovechang1986

You can modify the data in the grib file, get the binary string associated with the file and write it to a new file. Example at https://jswhit.github.io/pygrib/docs/index.html

jswhit avatar Aug 02 '17 12:08 jswhit

@jswhit thanks, but while midify the values and assign them to grb. Error occurred: gribapi error range of values too large, try a smaller value for decimal precision(less than one). How to solve this error?

lovechang1986 avatar Aug 03 '17 10:08 lovechang1986

don't know - sounds as if the values you are trying to assign to the data are inconsistent with the specified precision and/or range.

jswhit avatar Aug 03 '17 12:08 jswhit