ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
407 stars 77 forks source link

CLI utility for filtering grib files by variable and coordinates. #397

Open chriss1245 opened 3 months ago

chriss1245 commented 3 months ago

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

cfgrib filter --variables vars.txt --min_lon 12 --max_lon 25 ---min_lat 21 --max_lat 23.4

Describe alternatives you've considered

I am starting in the world of whether forecastings and their specific data formats. From my perspective, filtering a file by variables and coordinates should be easy. But it has been a problem for me. I started using the python library, but ended up with a bad implementation for filtering by variables and coordinates. In general it was very slow and memory inefficient.

So i decided to search for cli commands already working. I didnt find any which allowed me to do both filtering by variables and filtering by coordinates. I had really high expectations for a tool called grib_filter. This tool has a rules file which allow filtering. However it seems to support only variable filtering. There is no much documentation about it.

Additional context

No response

Organisation

No response