Questions tagged [grib]

GRIB is a binary format for storing spatial information, used most often in meteorology. Use this tag for questions about programmatically encoding and/or decoding data to/from GRIB files.

GRIB is binary file format defined by the World Meteorological Organization (WMO). It is a compact format for storing gridded meteorological data such as air temperature or pressure. There are two major versions of the format: GRIB1 and GRIB2.

Selected tools and interfaces

References

202 questions
11
votes
5 answers

Installing pygrib Package

Apologies in advance for what is probably a bad/poorly phrased question, but I merely dabble in programming and am very unfamiliar with under the hood aspects of package installation, etc. Basically, I am trying to install the pygrib package…
Matt Stalley
  • 111
  • 1
  • 1
  • 3
9
votes
4 answers

Converting NetCDF to GRIB2

I know there is software like wgrib2 that will convert files in grib and grib2 format to NetCDF files, but I need to go the other way: from NetCDF to grib2, because the local weather offices here can only consume gridded data in grib2 format. It…
Rich Signell
  • 14,842
  • 4
  • 49
  • 77
8
votes
3 answers

Convert grib to netcdf file

Is there a way to convert a grib file into a NetCDF format on Windows? I use a software named tkdegrib but it catches one argument by one argument whereas I want all my grib's arguments in the same file. Unfortunately, I can't use Linux.
piecess
  • 187
  • 4
  • 11
7
votes
2 answers

Possible bug in GDAL?

Given this file: http://mtarchive.geol.iastate.edu/2019/02/18/mrms/ncep/GaugeCorr_QPE_01H/GaugeCorr_QPE_01H_00.00_20190218-150000.grib2.gz … I get different output depending on the software I use. wgrib2 2019021815.grib2 -csv wgrib2.csv and cdo…
Rick Hitchcock
  • 35,202
  • 5
  • 48
  • 79
6
votes
1 answer

How to load a directory of GRIB files into a Dask array

Suppose I have a directory with thousands of GRIB files. I want to load those files into a dask array so I can query them. How can I go about doing this? The attempt below seems to work, but it requires each GRIB file to be opened, and it takes a…
6
votes
1 answer

pygrib GRIB2 segmenation fault while reading data

I ran into a trouble with a python script that downloads recent weather data from a weather model (GFS) in grib2 format. It used to work but now it doesn't anymore (i.e. with the recent files for download on the GFS server). Trying to access the…
Laetitia
  • 409
  • 5
  • 8
5
votes
2 answers

Processing GRIB data in .NET

Does anyone know of a .NET library for processing GRIB data?
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
5
votes
1 answer

Extracting Lon and Lat range of a grib file

I am pretty new to the GRIB format but I currently need to deal with it. Using wgrib, I managed to extract the fields I wanted, corresponding times, etc .. But I miss the coordinates of the points of th grid, or the latitude and longitude range of…
Liris
  • 1,399
  • 3
  • 11
  • 29
5
votes
1 answer

Getting configure error installing wgrib2 on macOS

I am trying to install wgrib2 on macOS Sierra. I've followed the instructions on this blog. Here is what's happening in the terminal: rm tmpaec.tar cd "/usr/local/grib2/libaec-1.0.0" && export CFLAGS="-I/usr/local/grib2/include -Wall…
yves
  • 51
  • 2
5
votes
0 answers

The different result when I set `vmin` and `vmax` with different plot type

Background For plotting 2-d spatial distribution of some attribute, contourf and pcolormesh are both good choice as a visualization form. Due to the actual meaning of the plotting data, I want to set the value nearby zero are showing in white…
Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
5
votes
5 answers

Using R to open grib files

I am using R to work with meteorological data. I proceed in two steps: convert grib to netcdf using the command line function ncl_convert2nc from ncar command language use package ncdf in R to import the netcdf data. I still have one problem: 2-…
robin girard
  • 561
  • 1
  • 7
  • 13
5
votes
2 answers

Extract data from grib weather model

I have downloaded grib1 model data from GFS, I am using a Mac OS X and was able to build the wgrib2 file from NOAA but was unable to extract the data. I have not found a grib1 utility for MAC. Then I run to this program…
neavilag
  • 609
  • 1
  • 8
  • 20
4
votes
0 answers

How to read GRIB files with R / GDAL?

I'm trying to read a GRIB file wavedata.grib with wave heights from the ECMWF ERA-40 website, using an R function. Here is my source code until now: mylat = 43.75 mylong = 331.25 # read the GRIB…
user974722
  • 71
  • 1
  • 4
4
votes
2 answers

Convert grib2 files to csv

I am working on a classification problem with grib2 files. I have been trying Xarray, pynio, pygrib to read these data but couldn't solve it yet. Can anybody explain what is the structure of grib2 files? How they are created? Is there any quick way…
psuresh
  • 535
  • 2
  • 13
  • 25
4
votes
0 answers

Dealing with large grib files using xarray and dask

I'm reading some (apparently) large grib files using xarray. I say 'apparently' because they're ~100MB each, which doesn't seem too big to me. However, running import xarray as xr ds = xr.open_dataset("gribfile.grib", engine="cfgrib") takes a…
jezza
  • 331
  • 2
  • 13
1
2 3
13 14