Questions tagged [grib]

GRIB (GRIdded Binary or General Regularly-distributed Information in Binary form) is a concise data format commonly used in meteorology to store historical and forecast weather data. It is standardized by the World Meteorological Organization's Commission for Basic Systems, known under number GRIB FM 92-IX, described in WMO Manual on Codes No.306.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

How to properly store raster data in GRIB format

I have some raster data stored as individual uncompressed geotiff files (one file per time step) that I would like to store in a more compact way. I have decided to try different formats and see which ...
Miguel Garcia's user avatar
2 votes
1 answer
52 views

Crossing English channel in a boat

GRIB file = (U-V) component. from enter link description here GRIB represents currents. Vectors(U-V) blue arrows and a color scale --> Magnitude and direction. Blue'ish to the left. Yellowish to ...
Lennert Pronk's user avatar
4 votes
0 answers
69 views

Looking up whole time-series for specific point from 45 GB file

I want to look-up 8760 times for a single lat/lon combo in less than a second from 43.82 GB file of wind data containing: 8760 times (every hour in a year) 721 latitudes (every 0.25° from -90.0° to ...
user212905's user avatar
0 votes
1 answer
889 views

Why do rioxarray reprojection and pyproj transform give different values when selecting a pixel by point coordinates?

I'm opening this grib file using rioxarray and reprojecting to WGS84 in the following manner with the goal of grabbing pixel values by coordinates. import rioxarray url = 'https://noaa-hrrr-bdp-pds....
JWB's user avatar
  • 524
1 vote
1 answer
1k views

How does one get the metadata of each band of a grib file using rasterio?

Is there a way to see the metadata of each band of a grib file using rasterio? Using gdal this can be accomplished by: import gdal path = r"D:\path\to\somewhere.grib" ds = gdal.Open(path) ...
JWB's user avatar
  • 524
0 votes
0 answers
1k views

Reading grib file without extension using Xarray

Is it possible to read a file without an extension from Xarray and let Xarray infer the correct datatype? Context: I downloaded files with .Z compression from https://data.eol.ucar.edu/. An example ...
PPR's user avatar
  • 481
0 votes
1 answer
182 views

Error when creating geodataframe from lists [geographic coordinates and GRIB CRS]

I'm working with meteorological data and I want to insert the grid points and also their polygon in a GeoDataFrame. They are generated by ERA5 and in a GRIB format. When I try to create the ...
Jno Zrc's user avatar
1 vote
1 answer
934 views

Unable to convert grib2 files to geoJSON file (as polygons)

I have been working with the following GRIB2 files at https://mrms.ncep.noaa.gov/data/3DZdr/MergedZdr_02.00/. I need to setup a process to convert these to geoJSON polygons. I have tried official ...
David 's user avatar
  • 232
1 vote
0 answers
230 views

Continued issue with ECCODES_DEFINITION_PATH for use with cfgrib

I have found a few posts that address this general topic: ECCODES ERROR when opening .GRIB file in Spyder/Visual Studio Code https://github.com/ecmwf/cfgrib/issues/85 The first link is the exact ...
Scott's user avatar
  • 11
0 votes
0 answers
1k views

How to convert a GRIB file to CSV/ASCII

I have downloaded the ERA5-Land hourly-ECMWF climate reanalysis data from Copernicus. The data come in .grib format. It would be easy for me to manipulate the data in .csv or ASCII format. The idea is ...
corp_guy's user avatar
1 vote
0 answers
114 views

GDAL: wrong corner coordinates from KNMI grib file

I'm trying to parse KNMI grib files to extract weather forecasts for The Netherlands. I use gdal.netcore which is a .NET wrapper for gdal 3.2.0. On the website of KNMI they say the following: ...
Carpenter's user avatar
2 votes
0 answers
238 views

GDAL's ReadAsArray() incredibly slow when reading an in-memory raster?

So I have a script set up in a conda environment on macOS Catalina running python 3.7, I'll post a paraphrased version of it: from osgeo import gdal import numpy as np grib_url = '/vsicurl/...
JWB's user avatar
  • 524
2 votes
1 answer
332 views

Plotting grib file in Java GeoTools

I'm fairly new to Java and GeoTools and I'm trying to plot this grib of meteorological data; I have the code for shapefiles, but I don't know where to go from here: File file = JFileDataStoreChooser....
Elio Diaz's user avatar
  • 3,444
0 votes
0 answers
167 views

Reading some NOMADS grib files fails

I am trying to read in a file from https://nomads.ncep.noaa.gov I can read all multigrid files like here but my script fails to read files from other links that are supposed to be Grib files such as ...
El Dude's user avatar
  • 181
1 vote
1 answer
2k views

Unable to read GRIB datas with XArray

I used this code to read grib data import os import numpy as np import pandas as pd import xarray as xr path = "gfsanl_4_2019101000.g2" os.chdir(path) ds = xr.open_dataset('...
Berke Şentürk's user avatar
2 votes
1 answer
2k views

Converting GRIB2 to GeoTIFF

I am trying to convert a GRIB2 file to a GeoTIFF file using gdal. My Commands: gdal_translate -b 1 -a_srs EPSG:3857 some.grib2 some.grib2.tif gdalwarp -t_srs '+proj=longlat +datum=WGS84 +ellps=WGS84 +...
arnpry's user avatar
  • 211
7 votes
1 answer
232 views

+0-180 degrees of mesh layer are displaying as horizontal lines [QGIS]

I have been trying to display weather data from ECMWF in QGIS on top of a base map, but half of the heatmap rendered from the mesh layer (imported via grib) displays as straight horizontal lines. I ...
Michal Paszkiewicz's user avatar
2 votes
1 answer
6k views

Converting GRIB to CSV or to binary data

The challenge is to extract multidimensional data (weather and ocean data in this case) from .grib files, without having to download and install any new software on the computer by running ...
Stormwind's user avatar
  • 293
0 votes
1 answer
1k views

Extract values from Grib-files at several specific locations

I have got a GRIB file from ECMWF for a small area in the Antarctic. It contains hourly data for one month of multiple variables (eg. wind, seaicecover, sst etc.). I want to extract this data to .txt ...
RedKite75's user avatar
1 vote
2 answers
3k views

ECCODES ERROR when opening .GRIB file in Spyder/Visual Studio Code

I have accessed Anaconda Prompt for the environment that I will be working. Once there, I have changed the directory to the place where I have the grib files that I will be working with, in order to ...
Gonçalo Peres's user avatar
0 votes
0 answers
670 views

Installing eccodes with conda install windows

I am trying to install eccodes using conda forge, following the advice on https://anaconda.org/conda-forge/eccodes, on a windows 10 computer. I keep getting an error message: failed with initial ...
ushham's user avatar
  • 103
1 vote
0 answers
95 views

Proper way to calculate a selection of GRIB2 data points?

I have a GRIB2 file that I have successfully parsed and got an array of temperatures for a specific latitude and longitude. What would be the proper way to convert this array to a single value? I wasn'...
Sam's user avatar
  • 111
2 votes
3 answers
907 views

ERA5 grib file: how to know what each band means?

I downloaded monthly averaged data for a given area, 2 variables and 3 years. I read the grib file on R and I see there are 72 bands (12*2*3). Great. But how do I know what each one is? I would expect ...
pkry's user avatar
  • 107
1 vote
0 answers
133 views

In ArcGIS, exporting a GRIB file to a different format changes the cell values of the original raster

I downloaded some climate variables from Copernicus as GRIB format. ArcGIS 10.7.1 allows me to directly add them to my table of contents and it shows me, as usual, some maximum and minimum values. The ...
Salvatore Valente's user avatar
1 vote
0 answers
106 views

SRID mismatch while loading in PostGIS?

I have a grib2 file from GFS. I tried to load it as a raster like so... gdalwarp -t_srs EPSG:4326 example.grib2 warp_example.grib2 raster2pgsql -I -C -M -d warp_example.grib2 table | psql $database ...
Craeft's user avatar
  • 197
3 votes
0 answers
159 views

Geoserver does not wrap GRIB raster points to coordinates where x < 0

I am new to the GeoServer and want to use it for plotting wind barbs based on a GRIB file over land data. The wind barbs are properly created but nothing is shown on coordinates x < 0. The map ...
Tobi's user avatar
  • 141
1 vote
1 answer
708 views

grib2 idx files - dealing with bands with identical byte ranges

I am using GDAL to process grib2 data. This data is downloaded from NCEP using HTTP random access based on the byte ranges specified in the index file for each grib file. This .idx file looks like ...
Thomas's user avatar
  • 1,477
0 votes
1 answer
287 views

NOMADS grib file naming

I am looking to run https://polar.ncep.noaa.gov/waves/examples/usingpython.shtml#example_2 example on wave model data. It refers to downloading grib files from https://nomads.ncep.noaa.gov/pub/...
El Dude's user avatar
  • 181
2 votes
2 answers
3k views

Getting data closest to specified point in a grib file (Python)?

I have a grib file. I would like to be able to do something like this: grib_data = grib_data_nearest_point(grib_file='grib_file.grib2', lat=15.5, lon=23.3) Is there a library that can accomplish ...
P.V.'s user avatar
  • 123
1 vote
1 answer
2k views

Grib Metadata with GDAL in Python

I'm trying to use GDAL in python to conditionally select raster bands from a grib file based on the time when the weather feature was measured (think temperature). If I run GetMetadata() on the ...
user144118's user avatar
2 votes
0 answers
974 views

Python GDAL showing incorrect metadata for GRIB file

I'm trying to read a GRIB file containing ERA-5 single level data that I downloaded from the Climate Data Store (CDS, https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?...
Bert Coerver's user avatar
  • 1,861
1 vote
0 answers
69 views

Produce a filtered version of a GRIB file

How can you produce a filtered GRIB file containing a subset of information from an original "bigger" GRIB file? Let's say I have a GRIB file covering pressure, temperature and wind direction for a ...
daniloquio's user avatar
0 votes
0 answers
1k views

Transforming GRIB file into GeoTIFF that is correctly georeferenced using Python GDAL?

I am trying to transform a GRIB file into a GeoTIFF to be used in a ArcGIS, but am having trouble getting the image to display in the correct location. I have been able to create a GeoTIFF, using GDAL ...
glayne's user avatar
  • 11
8 votes
1 answer
2k views

Handling raster data in a "rotated pole projection" with R?

My question is about using R to transform raster data from a rotated pole projection to a regular latlon grid - and then plotting it. I am working with data from a numerical weather model, which is ...
jonaswp's user avatar
  • 141
1 vote
1 answer
387 views

Coding or converting grib files

I want to convert my text file to grib file. But it seems not possible. How can I code grib files in Fortran or C#.
k112's user avatar
  • 19
1 vote
2 answers
2k views

Unknown projection of GRIB file

I have issues extracting geometrical shaped data from a GRIB raster of soil moisture. The file is for example https://gimms.gsfc.nasa.gov/SMOS/jbolten/FAS/L03/20100113_20100115.as1.grib Using either ...
Pateheo's user avatar
  • 265
2 votes
0 answers
382 views

Reprojecting raster file with unknown datum using ArcGIS Desktop?

I am new to GIS. I had a grib format data file and it's coordinate system shown below. I want to project it to WGS84, however, the datum of original file is unknown. I know I need to provide the datum ...
Krystal's user avatar
  • 29
3 votes
1 answer
9k views

Using GDAL to read data from GRIB file in Python?

I am attempting to use GDAL to read corresponding latitude, longitude, and temperature values from a GRIB file. I would like to store these data points in a 2-D list. I was able to do this using the ...
Jacob Huss's user avatar
0 votes
1 answer
2k views

Creating GeoJSON from GRIB2 format using Python?

My ultimate goal is to create geoJSON from GRIB2 format using Python in order to display it at the Leaflet-open-street map. I have the following data extracted from GRIBs: Multi-dimensional array ...
techkuz's user avatar
  • 101
2 votes
0 answers
72 views

Soil type info from grib file

I want to read soil type info from grib file, but dont know a variable name. I expect that this variable contains a value between 1 and 9, corresponding to the possible different types of soil for ...
Alessio Frabotta's user avatar
1 vote
1 answer
687 views

How to displaying u and v components of wind data from a grib file as geoserver coverage?

I have generated a coverage view from a grib file (u,v components), but I can't style the result of both components. Is there any way to style both wind components (u and v)? My style is the next ...
tom's user avatar
  • 11
1 vote
0 answers
132 views

Seeking source for grib data download?

I am trying to integrate wind maps into an existing map and I would like to download the latest wind data for a local area like zyGrib does and then attach it into the map. I am aware that there are ...
Bazinga777's user avatar
10 votes
5 answers
6k views

WKT for EPSG:4326 with LON 0 to +360 instead of -180 to +180

I have GRIB2 files that seem to be in a projection similar to EPSG: 4326, except that instead of longitude between -180 and +180 it is between 0 and 360. My intention is to get these files into ...
Mike Furlender's user avatar
2 votes
1 answer
2k views

GDAL program produces only zeroes, regardless

I have been working on this problem for a while now and have asked two seperate questions regarding it (Counting events from a GRIB raster, ValueError: array larger than output file, or offset off ...
peroman200's user avatar
2 votes
1 answer
4k views

ValueError: array larger than output file, or offset off edge Python GDAL

I have been working on this iterator that would count instances where data conformed to a set of conditions over a number of rasters. I had people help me with other aspects of this script (Counting ...
peroman200's user avatar
0 votes
0 answers
224 views

Counting events from a GRIB raster

I have been attempting to find a solution to the problem of limited access to GRIB_API(on Windows) through using GDAL in Python. The main thing I want to achieve is to be able to set some conditions, ...
peroman200's user avatar
0 votes
1 answer
80 views

How to analyze temporal change in wind?

I have daily data for several years (GRIB but also available as netCDF), I would like to investigate how the wind speed and direction has changed along the migratory route of a bird (in spring) and ...
MSS's user avatar
  • 101
2 votes
1 answer
284 views

Dangerous wind from Grib file

I need to filter out the low speed winds from the values inside a Grib file. This is my first time using this kind of data. I can read the file, and iterate inside all the GeoSpatialValues (getting ...
eried's user avatar
  • 121
2 votes
1 answer
1k views

Interpolate grib2 data from GFS

I downloaded a grib2 file containing GFS data. I need to get wind and temperature from altitudes ranging from 1000 ft to 42000 ft I know the grib2 (GFS) only have data for specific "isobaricInhPa" ...
guilhermecgs's user avatar
2 votes
2 answers
724 views

PostGIS: Having trouble getting a value from a raster

I'm working on a subsetted grib file that I retrieved using this URL: http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t12z.pgrb2.0p25.f001&lev_925_mb=on&var_RH=on&subregion=...
boozedog's user avatar
  • 133