A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Questions tagged [cfgrib]
39 questions
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
1 answer
xarray read remote grib file on s3 using cfgrib
Can the crgrib engine handle reading remote files? It doesn't look like it according to Martin Durant's comment (https://github.com/ecmwf/cfgrib/issues/198#issuecomment-772852412)
There is a smallish grib file hosted on s3:…

Ray Bell
- 1,508
- 4
- 18
- 45
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
1 answer
Opening files in thread parallel with DASK + CFGrib is really slow
I have been building up a GRIB file reading tool using the following code. I have heterogeneous files so I can't use the xarray.open_mfdatasets or anything like that.
def create_open_delays(file_list: List[str],expected_dataset_count:int) ->…

Matthew Lennie
- 21
- 2
1
vote
0 answers
Jupyter kernel dies when importing file using xarray and cfgrib engine
I am trying to open and extract data from lat/lons using the cfgrib package and ecCodes on Linux.
NOTE: this code works when running outside jupyter - but crashes inside it.
I've installed ecCodes and checked it using python -m cfgrib selfcheck…

Pad
- 841
- 2
- 17
- 45
0
votes
1 answer
How do I properly install cfgrib and eccodes?
I'm trying to run this code on my Mac: https://github.com/EWolffWX/MRMS_Derecho_Composites
When I run it, I get this error ValueError: unrecognized engine cfgrib must be one of: ['netcdf4', 'h5netcdf', 'scipy', 'gini', 'pydap', 'store', 'zarr'] from…

Kaela Williams
- 1
- 3
0
votes
1 answer
Grib2 data extraction with xarray and cfgrib very slow, how to improve the code?
The code is taking about 20 minutes to load a month for each variable with 168 time steps for the cycle of 00 and 12 UTC of each day. When it comes to saving to csv, the code takes even longer, it's been running for almost a day and it still hasn't…

William Jacondino
- 63
- 5
0
votes
1 answer
Xarray mfdataset combining files with different variables using cfgrib engine
I have a folder with several files in .grib2 extension and some of them have the tcc variable (cloud cover) and others don't. I would like to open all files in a single array with this variable but it gives an error. I can only open a single file…

William Jacondino
- 63
- 5
0
votes
0 answers
CFGRIB GFS APCP (Total Precipitation) problem getting data from Time:1
I'm trying to get data from a GFS APCP (Total Precipitation 'tp' accum),
but only can access to time 2.
Time 1 have the accumulated precipitation from RUN hour to the forecast hour.
For example for 06Z , time 1 shows tha acumulated precipitation…

Support2019mp
- 1
- 1
0
votes
1 answer
'cfgrib' is not showing in xarray engine list, when the python code is packaged with pyinstaller to get exe file
I am trying to create an executable file from python code with 'Pyinstaller' package. The code runs in conda environment where the cfgrib selfcheck is good:
Found: eccodes v2.27.0.
your system is ready
However when the executable created by…

Mehdi Firouznia
- 1
- 1
0
votes
0 answers
Setting environment variable in python has no effect on cfgrib
I am using xarray with cfgrib to load grib files in Python. I have custom grib definitions, which I am providing to eccodes (backend for cfgrib) via the environment variable GRIB_DEFINITION_PATH.
This setup works well, as long as I run the Python…

tierriminator
- 587
- 5
- 19
0
votes
1 answer
MetPy and grb2 file opening issue: xarray's Value Error
I found in this script: https://unidata.github.io/python-training/gallery/declarative_500_hpa/
a plot done using a grb2 file. I just copy and paste the code, it works well.
I am trying to do the same, for another date with a downloaded grb2 file…

Efece
- 3
- 2
0
votes
1 answer
Coordinate alignment off when using Metpy assign_y_x coordinates with manual CRS
I am having issues with the function that assigns y and x coordinates values for grid mapping. Essentially my end goal is to be able to extract grid values from a given set of lat/lon pairs, which seems to be way more complicated than it should be…

Cane89
- 3
- 3
0
votes
0 answers
unrecognized cfgrib on my spyder code anaconda
So I need to be working switch my code from jupyter notebook to spyder. I did some research on this error but all I have seen is doing it in jupyter solves the problem. This code came from jupyter and I need to run it on my local pc but now its not…

Kevin Abbot
- 3
- 3
0
votes
1 answer
Using XArray.isel to access data in GRIB2 file from a specific location?
I'm trying to access the data in a GRIB2 file at a specific longitude and latitude. I have been following along with this tutorial (https://www.youtube.com/watch?v=yLoudFv3hAY) approximately 2:52 but my GRIB file is formatted differently to the…

Isabella
- 5
- 4