basically i am trying to get out the direction and magnitude information of the current (flow/movement of water) information layer of a grib weather data file – which is a mesh in qgis terminology. I was following the instrucionts in Tutorial on using QGIS for marine data. the tools used there need a raster dataset for u and v components of the current. so far i have found information of how to transfer grib2 to geotiff. but the GDAL / raster analysis / translate function from Processing Toolbox doesn't seem to support mesh-data as input type. is there a straigth forward way within qgis to convert mesh into raster? or is there a way to display a u / v information from mesh as a vector field ?
QGIS Mesh: How to Convert GRIB2 Data to GeoTIFF
meshqgis
Best Answer
Not exactly within QGIS, but yes. I am working with grib2 files right now and I just found
degrib
, a really nice utility to extract grib information to vector files:https://www.weather.gov/mdl/degrib_archive
I exported messages #1 and #2, which are UGRD and VGRD, for the first period of time, to point shapefiles.
Once added as layers in QGIS, I converted them to geopackage and generated a virtual layer with the information contained in both.
Then, I also exported the virtual layer to geopackage. These are the grib2 and vector layer together.
Finally, we can just rasterize the vector layer. Note that the step of merging the two vector layers would not be necessary if you want them rasterized.
This is the information contained in the u component of the wind vectors, in a raster of one band rendered in pseudocolor: