2

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 ?

1 Answer 1

3

[...] is there a way to display a u / v information from mesh as a vector field ?

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

1

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.

2

Then, I also exported the virtual layer to geopackage. These are the grib2 and vector layer together.

3

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.

4

This is the information contained in the u component of the wind vectors, in a raster of one band rendered in pseudocolor:

5

3
  • any idea how to proceed to make a mean for all winds within a month or a year? all the data i get is of 1 day forecast. nomads.ncep.noaa.gov ? Commented Dec 24, 2022 at 1:40
  • @assayag.org - speeds & directions ? ... does it make sense to mean directions? i'd suggest a count or % of the 8 main directions instead where total = number of days with wind > xy knots (or even better based on hours..)
    – robert tuw
    Commented Feb 11, 2023 at 15:29
  • id just wanted to know "where does the wind come from", in general, most of the time. Commented Apr 10, 2023 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.