13 November 2017 - Unidata

MetPy Mondays #18 - Skew-t Fiducial Lines

On this week's MetPy Monday find out how to add special lines and annotations to your Skew-T plots! MetPy Docs: https://unidata.github.io/MetPy/latest/MetPy ...


hello I'm John Lehman a software engineer at you know data and welcome to another met PI Monday we're continuing our series on skew T's and we have a pretty good-looking skew T where we left off last week we've got our wind Barb's properly down sampled we have the temperature and dew point lines plotted and the axis limits are set where things look pretty good but often times we want to have some special lines plotted on the skew T something that could be thought of as a fiducial line so what is the dry adiabatic adiabatic mixing ratio lines on here these are all things that you could compute with functions that are in met pi and then plot them over a range on here and that would be fine but we've already built that in so that it's a simple one-line command one of the easiest way to discover these things is by using tab completion so I'm gonna skew dot for a plot and I'm just gonna hit tab and you can see look at all of these options in here so I can shade areas shade cape shade sin but let's go ahead and add some of these special lines so I want plot dry eight events if I shift tab you see that I don't have to pass it anything there are defaults

already in there if I wanted to change things I could but I'm pretty happy with the defaults while we're at it we're going to go ahead and plot muy stadia bets and finally we're going to plot the mixing lines again save yourself some keystrokes and help find new things by using things like tab completion and then I'll type fig so that we redisplay the figure run that cell all right and we just had a lot of information added to our plot with just three lines of Python so that was relatively simple but what if I wanted to mark out a special pressure or a special temperature a special isotherm well if we want to do this on a normal plot with matplotlib we would use the ax H line for horizontal line and a XV line for vertical line here we can do the same thing we've implemented the transform for you so skew a X to get to the axis object a X H line and then let's say I want my special line here at say 500 millibars so special to me here and I'm going to go ahead and make that a black line and then redisplay the figure now you see we've got this black line here at 500 hecto Pascal's okay so

that's nothing too special but what about an isotherm a true vertical line on this plots not an isotherm because it's a skew T but if you use the ax V line function here let's make the the freezing point of water here zero C and we'll color its cyan and show the figure again we take care of that transform for you so see now we've got our special line here so these are a couple of quick and easy ways to mark things on your plot and make it a lot easier and a lot more useful to look at if you're trying to figure out well what would my parcel path be by hand that's something that next week we'll cover is how map I can calculate a parcel path for you and then you can shade things like areas of Cape and sin as always feel free to contact us with any questions or problems that you run into and share what you're doing with us on the social media app met PI and at you know data thanks for joining me on this week's met PI Monday

XML Transcript: