cambecc / grib2json

converts GRIB2 files to JSON
MIT License
357 stars 154 forks source link

Filtering by values #32

Open dafekt1ve opened 6 years ago

dafekt1ve commented 6 years ago

When trying to filter a grib file by numeric value, if the value is a negative number, the grib2json command fires off "Unexpected options" errors.

As an example, the "Potential Vorticity" surface is positive in the Northern Hemisphere and negative in the Southern Hemisphere. This means that if you want to filter by value, you would do the following for the northern hemisphere: grib2json -n --fp 5 -fs 109 --fv 2.0000000000000003E-6 2018112500.gfs.t00z.pgrb2.1p00.f000

and the following for the southern hemisphere: grib2json -n --fp 5 -fs 109 --fv -2.0000000000000003E-6 2018112500.gfs.t00z.pgrb2.1p00.f000

but this second command fails after the minus sign. I have tried wrapping the value in "", '', and escaping the - with a . None of these worked.

Do you have an option in grib2json that makes this work for negative numbers?

Thanks for any response.