Skip to content

agumartina/grib_reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grib Reader

A few scripts to read, reproject and rasterize GRIB, GRIB2 or NetCDF data, from Copernicus ERA5 model, to a data serie in csv.

Usage/Examples

Examples how to use

Reproject and save as Geotiff

This script takes a directory full of grib files, reprojects them to WGS84 and save it as a raster in GeoTiff format.

    python gen_geotiff.py --path /path/to/grib/files 

Extract data

This scripts use the points declared in a shapefile, get the data from de rasters and generate a serie in a csv file.

    python rasterize.py --path /path/to/geotiff --shapefile /path/to/shapefile 

Calculate wind direction and speed

Because the model has U and V components of wind, and wind speed (wspd) and wind direction (wdir) are desired.

    python products.py --path /path/to/U_V_csv/file

Installation

Required packages

Package Version
gdal 3.1.14
xarray >= 0.17
rasterio 1.2.0
rasterstats >= 0.14.0
pandas 1.2.2
netcdf4 1.5.6

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages