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
1
vote
0answers
27 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/...
2
votes
1answer
38 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....
0
votes
0answers
33 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 ...
0
votes
0answers
9 views

Add extra metadata to each message of a GRIB file?

I wonder, is there a tool to allow one add an extra metadata to each message of a GRIB file? For example: from grib_dump of a GRIB file, I have: #============== MESSAGE 6 ( length=976330 ) ...
0
votes
0answers
6 views

Missing grib metadata when using CDO tool to invert Lat axis from South-North to North-South?

I have a grib file (it is quite big) and I tried to use cdo to copy it to another grib file. cdo -R copy ws10m_mean24h.grib test.grib However, in this diff: https://www.diffchecker.com/w25sayVz it ...
1
vote
1answer
64 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('...
0
votes
0answers
10 views

GRIB data format investigating octets of sections with Python

I'm trying to learn GRIB data format and I found this helpful guide to dive into https://www.wmo.int/pages/prog/www/WDM/Guides/Guide-binary-2.html#Section3. I had an experience with Gdal and Pygrib. ...
1
vote
1answer
256 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 +...
4
votes
0answers
90 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 ...
2
votes
1answer
971 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 ...
0
votes
1answer
124 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 ...
0
votes
2answers
386 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 ...
0
votes
0answers
122 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 ...
1
vote
0answers
15 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'...
0
votes
0answers
20 views

Summarising multilayer raster file without reading whole dataset

Is there a computationally 'lite' way of processing a multiband raster dataset (in this case a grib file, but the point stands for any file type) without reading the whole thing in as a brick first? ...
1
vote
2answers
195 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 ...
0
votes
0answers
26 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 ...
1
vote
0answers
39 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 ...
0
votes
0answers
15 views

Match bands with label (or label bands on import)

I extract the pressure levels from a GFS grib like this ./wgrib2 -match \":$pl:\" $fname -grib $ofile Next I load them into postgis like this raster2pgsql -I -C -M -d warp_$ofile pl$pl | psql ...
3
votes
0answers
54 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 ...
1
vote
1answer
151 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 ...
0
votes
1answer
67 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/...
2
votes
2answers
1k 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 ...
1
vote
1answer
708 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 ...
2
votes
0answers
561 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?...
1
vote
0answers
42 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 ...
0
votes
0answers
508 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 ...
4
votes
1answer
1k 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 ...
1
vote
1answer
201 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#.
1
vote
2answers
569 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 ...
2
votes
0answers
223 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 ...
4
votes
1answer
5k 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 ...
0
votes
0answers
1k 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 ...
2
votes
0answers
60 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 ...
1
vote
0answers
374 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 ...
1
vote
0answers
104 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 ...
7
votes
5answers
3k 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 ...
2
votes
1answer
965 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 ...
2
votes
1answer
2k 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 ...
0
votes
0answers
191 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, ...
0
votes
1answer
72 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 ...
2
votes
1answer
140 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 ...
2
votes
1answer
853 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" ...
2
votes
2answers
510 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=...
2
votes
0answers
318 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 ...
1
vote
1answer
576 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 ...
0
votes
1answer
671 views

Data conversion from csv into GRIB or NetCDF format

I want to use Crayfish plugin for spatial temporal analysis of oil spill events. These data are available in csv format. Does anyone has an idea of how csv data can be converted into GRIB or NetCDF ...
1
vote
1answer
2k views

Grib to CSV use lat lon

I have some grib files that I converted to csv. I would like to view the data in a table using the lat, lon, and variable as column headers. How can I do this using the grid data/dimensions within ...
2
votes
1answer
558 views

How to calculate the percentage of the area that a polygon covers a cell in a raster in QGIS

I'm having trouble with using QGIS. I have a GRIB file containing meteorological data, this is loaded in QGIS as raster data if I'm not mistaken. I also have a shapefile containing a polygon, ...
2
votes
0answers
360 views

Grib file information to create QGIS projection

I'm trying to create a specific projection with QGIS (something like that: +proj=lcc +lat_1=69.75 +lat_2=52.87 +lat_0=61.31 +lon_0=7.665 +x_0=0 +y_0=720 +ellps=GRS80 +units=m +no_defs). I have some ...