Displaying and Animating Mesh Weather Data in QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] um [Music] um [Music] [Music] um [Music] um will you uh take over and uh it's yours yes thank you um thanks for the introduction i'm going to be talking about displaying and animating wesh dethered wet mesh weather data in qgis and it's really exciting to be here um just part of the cutest brewer group here in denmark um i've only been here for six weeks uh just hired by septima and started two weeks ago so this is exciting and i'm excited to become more a part of this user group i do a mix of spatial analysis cartography and teaching i'm a qgis certified instructor and as was mentioned i'm an asia charter member and when i was in the u.s i was one of the ones who got the us qgis user group started and was the voting member of that so like i said i'm excited to become part of the danish accuser cutest user group now these are the two books that michael mentioned q just for hydrological applications recipes for catchment hydrology and water management that i wrote with my dutch colleague hans vonderkost and discover cuda's 3x on the right which is a big 400 page workbook uh that's a a very broad treatment of all the capabilities of qgis and they're available from locate press so a shameless plug there so in this talk i'm going to talk about weather mesh data and along the way i'm going to introduce a couple new features or at least new since i published discover qgis 3x and one of those new features is new mesh vector renderers that were introduced at 312 um about a year ago and then the other is the temporal controller which was introduced to qgis 314 pi last summer so a little bit about mesh data if you're not familiar with it mesh data is a hybrid data model so it's a collection of vertices edges and faces a lot like tins if you're familiar with those and it's used for meteorological hydrological and oceanographic data sets and other model outputs typically so a mesh data file can contain multiple data sets so for example in the data that i'm going to be working with in this demo it contains wind temperature and precipitation values as well as time so it's really interesting data to work with and i've been i really love the data visualization features of qgis and i've been i was excited when mesh data began supported and this is an animation that i put together for some of the the 2017 hurricane season in the atlantic where there were several category 5 hurricanes that went through and you know wreaked havoc on the caribbean islands in florida and i wanted to see for this talk what what i could do with some of the data from some big danish storms so that's what we're going to look at so the storms that we're going to focus on is a stillman bodil which hit denmark in december of 2013 and a little trivia on this one it's the first officially named storm in denmark the other one i'll look at is the december hurricane which was also coined adam at the time unofficially and this was in 1999 and there were 51 meter per second wind gusts recorded before the anenometer blew over and this is the highest wind speed ever measured on danish soil so these are the two storms we will explore and the data that i'm going to use comes from the copernicus climate data store and specifically this data pool called the era 5 hourly data on single levels so i'm going to get out of this and we're going to do a demo for most of the rest of the talk and i want to start by whoops let me move that out looking at the let me find the right tab here let me get this um zoom control out of the way so this is the the website that is going to be the source of the data for the talk and if i click on data sets here you'll see the whole rich series of data sets that are contained on this site so if i scroll down to the bottom you'll see some of the other era 5 data on pressure levels we're looking for yeah era 5 hourly data on single level so 1979 to present they have this data actually all the way back to 1950 they have it broken into two data pools anyway i'm not gonna when you click on one of these you basically get a nice overview of the data and then a link to download the data and for the data that we're going to be working with i had selected temperature wind and precipitation and for these when you scroll down to the bottom you can select specific time periods so i selected just the windows that these storms hits for the specific month year and time and i selected 24 time periods through a day so hourly data for each of these storms and then down here i was able to just specify the spatial envelope of what i wanted to download and focus it just on denmark which made it a fairly small download and it came as a grid file so i have queued this up now and it's a simple map document with just country boundaries and what i'm going to do is add data that i downloaded from bodil and you'll see the grid file here in the browser panel you can simply drag and drop to add it to qgis and if you haven't worked with mesh data if you open up the data source manager you'll notice that there's also a tab for mesh data that you can use to browse for mesh data sets as well so when this comes in this is just the default color ramp i'm going to reorder things so we still see the country boundaries and um you'll notice right away that there's a little clock here in the layers panel in the indicator space that indicates that this is a temporal layer so i'm using 316 and so if you're using greater than 314 and you have the temporal controller functionality it picks up on the temporal component of mesh data automatically i'm going to be using the layer styling panel and you'll notice that when you're working with a mesh data set you get some slightly different looking options than you would with raster or vector data and this left hand tab here shows that we have wind temperature and precipitation aspects of this data and we're going to be working with the wind in this demo and over here we have this kind of colored block that's the raster component that we're looking at on the screen and these purple colors so we can start by making that look a little better so click on the contour tab and i'm just going to change the color ramp to red yellow blue and the default color ramp needs to be inverted because now it's showing the low wind speeds as red and we want the low wind speeds to be blue so i'm going to right click on this and invert the color ramp so it's looking a little better now and you can also go in here and adjust the max stretch on here so that you know you get slightly more saturated colors when we get into where that what the storm looks like so the next thing we'll look at is the the vector data so if i switch back to this first tab i can click on that little arrow to activate the vectors and you'll see all these wind vectors appear on the map and i can adjust those by clicking on this vector tab and the first thing i'll do with these is change the color to like a nice dark blue so that they're visible but aren't dominating the map so much and with these arrows you can also control the spacing so i can activate display on user grid and make it a little coarser than that default 15 by 15 pixels and then another thing i really like to do is down under arrow length is change that from defined by min max to scale to magnitude and this will scale the arrows to be the same to so to be bigger arrows where there's higher wind speeds and smaller arrows for lower wind speeds and instead of this factor of 10 i'm gonna reduce it down to like a factor of two so that it's a little nicer to look at so you can see out here we have some bigger wind speeds with bigger arrows and over denmark the smaller arrows where the wind speeds are lower and so let's look at the temporal controller now that we're looking at this wind speed if i click on this indicator for temporal controller in layer properties there's a temporal tab and it displays the time range that our data set is set up with and i'm going to activate the temporal controller panel and activate time and this is the time range of our data set right here you can also go to this this setting and make sure it's set to bow deal to adjust the min max time in that data set and now i'll click to the fixed animation frame which gives you these forward and backward buttons and so with this we can start using the slider or the buttons to slide through in time until we start seeing where this storm is starting to hit which is right about in there where we're starting to get the um the red the higher winds starting to approach denmark so with this i want to show you some of the other options for these vectors the arrows are nice but last summer they added a couple more options for this so first off instead of arrows we can show this vector data as streamlines and usually i find these can be a little overwhelming you can certainly adjust that by changing the spacing on here but the the one i really i'm going to use today that i really have become fond of is the traces option so this shows the the winds as kind of nice flowing traces that really give a nice visual effect um look at my notes um so the other thing is and down here this is the full extent i downloaded basically four or five days of data for the storm because i wasn't sure exactly when it hit and when it exited denmark so i can go in here and i can adjust the overall dates to something that's a little more tightly confined around the storm actually hitting denmark so starting on december 5th and descent instead of the third and at the high end setting this to the seventh and then i could go back to the beginning and i could be hit the play button to begin having cue just play this animation it's a little jerky like this um but we can start to see it changing and it's changing here every frame is one hour to one hour of data and we can adjust this to make it go faster to have each frame be a larger piece of time so now we're seeing the the storm passing over denmark and so this is um nice i'm going to pause it one thing that we didn't get with this temporal controller yet that we used to have with the time manager plug-in is the ability to label time on the map but there's a nice quick way to do that i'm going to add a point data set so i'm going to go to layer create layer i'm going to create a new temporary scratch layer i'm going to call this layer time and i'll make it a point layer and i'm not going to add any attributes but i will put it in the same crs as the rest of the data and click ok so now i have this time layer and i'm going to simply digitize a point where i want the timestamp to appear on the map and then i can put this out of edit mode and with this i'm going to the first thing i'm going to do is change it from single symbol to no symbols because i don't want to see the point i just want to label it with the time so the point goes away and i switch to the labels tab and i'll set that to single labels and we don't have any attributes but i'm going to use an expression to put time on the map so in the expression dialog if i search for time you'll see that there are some variables associated with the temporal controller map end and start time so these are the start times at the beginning and ending of each frame so i can use map start time to place the timestamp of the current time on the map but it's not really formatted the way i would like so i can go back into that and use the format time function to put or format date rather to put this into a format that's more to my liking i already have this on my clipboard i'll just close the parentheses so i've put in here hour hour day day month month month year year so that i get a nice formatted time the way i want to see it so i'm seeing the hour the day the month and the year right here on the map so now as i play it i do have the the time advancing on the label there it's going every three hours since i have it set to that and if you wanted to make an animation say using the way you do that is you um like an actual animated gif you can use this export animation button to animate to export a series of still images that you can then stitch together and when we're working in the temporal controller we're working in this map canvas and so we don't have the benefit of things in the print composer like being able to add a title but we do have decorations that we can use for that so i can go to the view menu to decorations and choose title label and just type in the name of the storm here and you have options for font and background color and position and i can click ok and so now i have a title on my map canvas that would get exported with the map another thing you can do with decorations that's nice is add a scale bar north arrow i'm going to add an image which could be a logo the default one in qgis is the qgis logo so that's fine i'll just click ok to accept that now i have a cue just logo in the lower left and if i wanted to export this out and create an animation i'd click that button and choose the folder choose the click map canvas extent i could specify the output height and width in pixels the date range and anything else and it would export all my still frames and i'll talk about how to do that in near the end so that that's this first storm i'm going to now take a look at the second storm whoops so this is the december hurricane from 99 and i've added it to the map but i'm not seeing it and that's simply because i have the temporal controller activated and it's set to the time frame for bodil not the december hurricane so i'm going to go click on this middle temporal controller button and tell it to set the time range to the december hurricane and now i see that data and i'm going to use this to show you one other option on styling here what i'm going to do is turn off the contours and just show the vectors on top and i'm going to make the vectors white and you'll see why in a minute and i'll make them traces again and now i'm going to turn on the google satellite and this is nice because i can do a nice animation that shows and you know the the white stream lines over the dark background and if i get into the middle here you'll see that the vortex for this december hurricane which i would have to also change in my decorations so that it's properly labeled and now i have a map that i could use to export an animation of that storm's data so you can see it's pretty quick and easy to both obtain the data and start working with it in qgis from this data pool at copernicus so i want to show you um the results of exporting these out so i used to create some animations from both of these storms and it's it's very simple there's only three steps you open up you go to file open as layers and you open up all the individual pngs that you exported from qgis you then go to the filter menu to animation and choose optimize for gif and finally then you just export the gif and when you get to the export images gif there's some options there and i i chose you know made sure i checked as animation i chose loop forever and you can set a delay between frames to basically speed up or slow down the animation i set it at near nearly half a second and then you can use that delay for all the frames so those are the settings that i put in and so this is the animation of the storm beaudiel so you can see as it passes over denmark both the intensity of the wind and the direction of the wind so really nice graphics the this is the december hurricane and this one really had a really strong vortex that goes over northern jetland that we can see with the mesh traces and finally i put one together of just the white traces over the google satellite base map to kind of show how you can make a just a simpler visualization of just the wind without the the contours being part of it so um that's what i wanted to show and i think we have a few moments for questions we do indeed and you're well in within your time so thank you very much now i have to stop my watch so right let's uh go to the chat and see if uh if there are any questions i'm trying to find the chat uh yeah it's uh in the bottom yeah it's just small well there's a comment awesome there we go okay i should mention um that it's also um in qgis if you're going to use the print composer a new feature in the print composer is that there are settings for temporal data so if you're using a temporal controller you can basically go into the print composition and set your map frame to a specific period of time within that data set so that you can make a print composition and i'm pretty sure you could use the atlas to export a series of map images from the print composer at different time stamps using expressions to generate an animation out of the print composer too although i haven't actually tried that yes so now i'm just waiting for somebody to hire me to do that otherwise i'll have to do it in the evening myself um okay questions coming in okay one question um what kind of analysis apart from visualization can you do with mesh data it is possible mesh data usually is for visualization it's um usually good for showing the output of some of um hydrologic models that may be developed in things like heck grass where you can show flooding scenarios what happens to a landscape with increased water inundation and you can actually use the mesh data to show that and so there are some processing tools in qgis now that allow you to create your own mesh data sets from other raster sources and or or generate it in a another piece of software modeling software that can show that and it says one question we could never answer is risk or falling in relation to weather changes frost first day versus a period of frost would that be manageable in qgis we have time injury data since 1980 although not with xy except for traffic injuries yeah i mean i guess that would be i don't know what variables will be involved in that kind of analysis and i'm not sure mesh would necessarily need to be involved but i'm sure that that's something that could be modeled in qgis yeah so in principle you could have a mesh for the city absolutely and you could generate that from a variety of different input data sets with some of the processing tools that are now available and what i created for the animations was was a a gif gef so our code wasn't for you it was for the i know you haven't dated downloaded data from dme next night foreign [Music] yeah i should also mention there is a plugin called grid downloader that you can use to download weather data for your map extent in cougars and uh from jesper could the traces be paired with another layer so that they would change color with the locations where they were destructive yeah yes but i think you probably do that with um different blending modes perhaps um because you can apply blending modes to the mesh traces and so um they they could be there could be some underlying layer that they would interact with to pull off an effect like that perhaps [Music] m [Music] so while we're waiting kurt maybe you could uh make paddle the powell the next presenter on the next host if oh that changed me you already uh host so maybe it's done now yes uh where can you buy the book locatepress.com there's a note here sean johansen is occasionally putting out dmi data on twitter and i will say i just wanna know i am learning danish and next time i hope to present in danish but i did want to subject everyone to that today all right you
Info
Channel: QGIS Brugergruppe Danmark
Views: 954
Rating: undefined out of 5
Keywords:
Id: bzyB6sTNVfI
Channel Id: undefined
Length: 29min 38sec (1778 seconds)
Published: Tue Feb 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.