Python module for reading and writing GRIB (editions 1 and 2) files. GRIB is the World Meterological Organization standard for distributing gridded data.
Questions tagged [pygrib]
51 questions
1
vote
1 answer
How to insert items to a tkinter listbox from a grib file without duplicates?
I'm trying to insert items to a tkinter listbox from a grib file using keywords like name or forecastTime, but I don't want the listbox to contain duplicates just one of each value. Couldn't get it to work using lists and ifs only work for specific…

Michał Romanowski
- 11
- 1
1
vote
0 answers
ImportError: libeccodes-8df36f07.so: cannot open shared object file: No such file or directory
I installed Python Pygrib and eccodes libraries.
When I import Pygrib I get error:
$ python -m pygrib selfcheck
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code =…

Theo75
- 477
- 4
- 14
1
vote
1 answer
Loading a GRIB from the web in Python without saving the file locally
I would like to download a GRIB file from the web:
Opt1: https://noaa-gfs-bdp-pds.s3.amazonaws.com/gfs.20210801/12/atmos/gfs.t12z.pgrb2.1p00.f000
Opt2:…

Jeremy
- 11
- 1
1
vote
2 answers
How to extract data from grib files in AWS without downloading?
I'm looking to access a grib file to extract parameters (such as temperature, etc) from within the cloud without ever having to store the file locally. I've heard this can be done with the cfgrib API, but can't find any example documentation (I…

Zach Rieck
- 419
- 1
- 4
- 23
1
vote
0 answers
Pygrib UnicodeEncodeError
I use python 3.9.1 on macOS Big Sur with an M1 chip.
I would like to open the grib format file which is provided by Japan Meteorological Agency.
So, I tried to use the pygrib library as below:
import pygrib
gpv_file =…

Irene
- 33
- 8
1
vote
2 answers
Read grb2 files is very slow
Reading a grb2 file of about 100 megabytes takes me 5 minutes with the following code:
import cfgrib
datasets = cfgrib.open_datasets(grib_path, backend_kwargs={'indexpath': ''})
Is there any way or library with which I can read these files more…

Javier
- 71
- 6
1
vote
0 answers
Error: "GRIB_API ERROR : Unknown stepType=[7] timeRangeIndicator=[7] " using eccodes
I'm working with grib files from Nasa - files from NLDAS Noah model.
I'm using pygrib and grib tools (both based on eccodes engine).
When I try to get data from the file (using grib_get_data/grib_ls) or using readline (with pygrib)
I get the same…

tomerbelkin
- 11
- 1
1
vote
1 answer
alternative (faster) way to get grib values given boundary?
I've used pygrib to extract all grib values for a specific band within given boundaries.
The function will return a Json object that contains all the values for each analyzed data.
Now that I've to read approximately 73 grib for each run, the…

Davide Raro
- 25
- 6
1
vote
0 answers
read pygrib file parameters in parallel
I am dealing with quite big meteorological grib files containing more than 50000 messages each of them. There is information of many parameters (temperature, geopotential, vorcitity, etc.), and I need to access it. I use pygrib in order to read…

Pere Munar
- 49
- 7
0
votes
0 answers
Reading NCEP GFS atmospheric data using Pygrib gives different output with wgrib2
I have been struggling with this problem for quite some time. I will be grateful if someone would please help resolve it.
I am trying to read NOAA's GFS weather data which is in .grb2 format with Pygrib in PYTHON. An example of the data can be found…

Tee
- 41
- 7
0
votes
0 answers
Dimensions of C (1801, 3600) are incompatible with X (3600) and/or Y (1801); see help(pcolormesh)
I'm looking to show surface wind data from "https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land?tab=form"
I'm using the code below to unpack the data in the form of a…

Samuel B
- 13
- 3
0
votes
0 answers
Plot a subset of data from a grib file on google colab
I'm trying to plot a subset of a field from a grib file on google colab. The issue I am finding is that due to google colab using an older version of python I can't get enough libraries to work together to 1.) get a field from the grib file and then…

Derek Hodges
- 1
- 1
0
votes
1 answer
In the C API for a new scientific library, should I use size_t, unsigned long long, or uint_64t?
I am working on a new API for reading GRIB2 files - part of an open-source library for meteorologists and climate scientists.
The library needs to handle 64-bit integers (in addition to 8, 16, and 32 bit integers). Signed and unsigned integer types…

Edward Hartnett
- 882
- 7
- 16
0
votes
0 answers
'grib_api.h': No such file or directory on Windows
I am trying to install pygrib on windows. i already installed VS build tools for c++
I am getting this error
`Building wheels for collected packages: pygrib
Building wheel for pygrib (pyproject.toml) ... error
error:…

zaheer
- 143
- 10
0
votes
0 answers
Why does gribmessage.data(...) return 1-d arrays when I specify the boundary lons/lats?
I want to extract data from a pygrib.gribmessage, and I would like to get it in 2-d arrays, but the data(...) method returns 1-d arrays, and I don't know why. The GRIB file contains WRF data, if that's relevant, and the same problem occurs with any…

natka_m
- 1,297
- 17
- 22