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
1 answer
34 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....
user avatar
  • 433
0 votes
0 answers
19 views

How to convert transverse_mercator to regular lat/lon

I want to transform this file from transvers_mercator to a regular lat/lon netcdf file. My input file: netcdf toto { dimensions: x = 548 ; y = 704 ; variables: char transverse_mercator ; ...
user avatar
  • 1
0 votes
1 answer
86 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) ...
user avatar
  • 433
0 votes
0 answers
195 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 ...
user avatar
  • 375
0 votes
1 answer
47 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 ...
user avatar
0 votes
1 answer
310 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 ...
user avatar
  • 124
1 vote
0 answers
70 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 ...
user avatar
  • 11
0 votes
0 answers
355 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 ...
user avatar
1 vote
0 answers
40 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: ...
user avatar
1 vote
0 answers
134 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/...
user avatar
  • 433
2 votes
1 answer
164 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....
user avatar
  • 3,239
0 votes
0 answers
74 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 ...
user avatar
  • 181
1 vote
1 answer
657 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('...
user avatar
1 vote
1 answer
1k 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 +...
user avatar
  • 201
6 votes
1 answer
178 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 ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
  • 293
0 votes
1 answer
672 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 ...
user avatar
1 vote
2 answers
2k 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 ...
user avatar
0 votes
0 answers
368 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 ...
user avatar
  • 103
1 vote
0 answers
25 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'...
user avatar
  • 111
2 votes
2 answers
500 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 ...
user avatar
  • 97
1 vote
0 answers
55 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 ...
user avatar
1 vote
0 answers
65 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 ...
user avatar
  • 197
3 votes
0 answers
90 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 ...
user avatar
  • 141
1 vote
1 answer
380 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 ...
user avatar
  • 1,477
0 votes
1 answer
114 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/...
user avatar
  • 181
2 votes
2 answers
2k 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 ...
user avatar
  • 123
1 vote
1 answer
1k 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 ...
user avatar
2 votes
0 answers
758 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?...
user avatar
  • 1,236
1 vote
0 answers
45 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 ...
user avatar
0 votes
0 answers
715 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 ...
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 ...
user avatar
  • 141
1 vote
1 answer
258 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#.
user avatar
  • 19
1 vote
2 answers
987 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 ...
user avatar
  • 265
2 votes
0 answers
282 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 ...
user avatar
  • 29
3 votes
1 answer
7k 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 ...
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 ...
user avatar
  • 101
2 votes
0 answers
62 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 ...
user avatar
1 vote
0 answers
452 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 ...
user avatar
  • 11
1 vote
0 answers
110 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 ...
user avatar
8 votes
5 answers
5k 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
0 votes
0 answers
196 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, ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
  • 101
2 votes
1 answer
205 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 ...
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" ...
user avatar
2 votes
2 answers
623 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=...
user avatar
  • 133
2 votes
0 answers
357 views

PostGIS: Querying raster data along a path

I've got a raster loaded into PostGIS that contains grib forecast data which I loaded using raster2pgsql using SRID 4326. To keep things simple I am not tiling the raster so I only have one row in my ...
user avatar
  • 133
1 vote
1 answer
682 views

GRIB1 to CSV on linux

Is there any easy way to convert GRIB1 files to CSV in Linux? I've seen that supposedly GRIB2 can readily be converted to CSV, and I've tried to convert the Grib1 files to Grib2 using grib1to2 but its ...
user avatar
  • 157