SHARPpy Preview (AMS Presentation)

I should point out that SHARPpy does more than generate images. It is a functioning software package, including dynamic readout. Although SHARPpy requires users to input commands via the command-line at the moment, menus will be added in the coming weeks.

Last July I wrote about software I was developing for displaying forecast soundings. Unfortunately, after discussing what I already had done in preparation for last year’s Hazardous Weather Testbed (HWT) Experimental Forecast Program (EFP), my schedule prevented me from devoting any time toward this project.

In the days before Christmas I realized that I needed to revisit SHARPpy (SkewT and Hodograph Analysis and Research Program in Python) if I was going to have anything for my presentation at the American Meteorological Society’s Annual Meeting in New Orleans, LA. So, the last two weeks has been devoted to frantic code writing to put together some form of SHARPpy in time for my presentation. When I sat down and looked at my old work, I couldn’t understand, nor could I remember, what I had been doing. I decided to throw out my old work and begin anew.

SHARPpy has been completely overhauled. The visual aesthetics are modeled after the Storm Prediction Center’s sounding analysis tool, NSHARP, and the underlying numerical routines are based on SHARP95. SHARPpy is written completely in pure Python — no Numpy, Scipy, or Matplotlib. In other words, once Python is installed on a computer, you can install and run SHARPpy — there are absolutely no additional dependencies to install! The motivation for sticking with pure Python, and sacrificing the speed Numpy, Scipy, and Matplotlib offer, was to allow for simple integration into the National Weather Service’s data visualization software package (Advanced Weather Information Processing System II — AWIPSII), which is currently under development. (Note, SHARPpy 2.0 will most likely be refactored to make use of Numpy, Scipy, and Matplotlib.)

SHARPpy is written in such a manner that the file handing and data management, graphical displays, and numerics are all separate. This greatly increases SHARPpy’s utility. Inside SHARPpy, all calculations are done on a custom data structure, called a Profile Object. The Profile Object consists of 6 data arrays: Pressure, Height, Temperature, Dewpoint, U-component of wind, and V-component of the wind, as well as some meta-data and helper functions to identify things such as the index of the surface layer. (Alternatively, one could provide the Wind Direction in degrees and Wind Speed and the Profile Object will convert these to the U-, V-components on the fly.) The benefit of using the Profile Object is that SHARPpy knows the structure of the data on which it will operate and/or draw. Thus, in order to add support for additional data types (observational, BUFKIT format, raw models, etc) all one has to do is create a wrapper to put the data into the Profile Object. (The Profile Object has helper functions to create itself. All one does is pass the 6 arrays!) Also, since the drawing is separate from the numerics, SHARPpy can be used to compute thermodynamic and kinematic parameters for model output — without having to actually draw individual soundings!

Below are a smattering of sample images created this evening.

The first image is tonight’s sounding from Miami, FL. The temperature trace is in red, the dewpoint trace is in green. The blue trace corresponds to the wet-bulb temperature. The yellow-traces (there are more than one, they just overlap!) are the parcel trajectories for a Surface-Based Parcel, 100-hPa Mixed Layer Parcel, and the Effective-Inflow-Layer Mixed Parcel. In the upper-right, the hodograph is displayed with white dots indicating each 1km AGL interval. (Note, the program goes out to the web and downloads the data, lifts all the parcels, and draws the display in about 1-1.5 seconds!)

SHARPpy Observation Display

In addition to computing the visual SkewT and Hodograph, SHARPpy can compute kinematic variables and parameters. Below are just a sample of the fields that can be computed. Wind information is displayed in a format of U-, V-component, Wind Direction @ Wind Speed. Helicity information is provided positive+negative helicity, positive helicity, and negative-helicity. Again, this takes less than 0.5 seconds to compute and display. (These are for the Miami, FL sounding displayed above.)

SHARPpy Kinematic Parameters

Below is a small sample of the thermodynamic variables and parameters that can be computed. All five parcels (Surface, Mixed-Layer, Most-Unstable, Forecast Surface, and Effective Inflow Layer) are computed. This routine takes about 0.5 seconds to run. (These are for the Miami, FL sounding displayed above.)

SHARPpy Thermodynamic Parameters

Lastly, I’ve incorporated preliminary support for ensemble soundings. Below are five, 4-km storm-scale ensemble member forecasts for Birmingham, Alabama. These model simulations were created in support of last year’s HWT EFP. They were initialized at 00 UTC 27 April 2011 and are valid for 21 UTC 27 April 2011. Each forecast member has over 1100 sounding locations, with 37 forecast soundings at each location. These data are stored in a text file that is approximately 150MB per member! SHARPpy can read these text files, parse out the correct soundings, compute all the parameters, and draw the sounding in less than 5 seconds!

What is displayed are the temperature, dewpoint, wet-bulb temperature, and hodograph for each of the 5 members. The thicker lines are from the “control member” and the other lines are from various perturbations. I should also point at that the wind barbs plotted on the right of the skewt are from the control member, as well.

SHARPpy Ensemble Display

I still have a lot of work left ahead of me (such as fixing up some of the displays and incorporating the text output on the main graphical display), but SHARPpy is coming along nicely. If you will be attending the AMS Annual Meeting later this month, please be sure to stop by my talk! It’s in the Python Symposium and will take place Tuesday morning at 11:15 AM. After my presentation, I hope to release SHARPpy to the open-source community. This will give people the ability to download and test SHARPpy while it is still under development, provide feedback, and even help develop new features! Some features that I’m interested in including are time-height cross-sections, more winter weather support, and whatever else might come to mind! It is my hope that SHARPpy can become a community supported sounding analysis package that the meteorological community can coalesce around!

And, for my international friends, if you aren’t fond of SkewTs, SHARPpy can also make STUVEs!

sharppy_stuve

Please let me know what you think!

A special thanks must go out to John Hart and Rich Thompson from the Storm Prediction Center. John provided the basic drawing classes and helped me understand how the drawing works. Rich helped me understand some of the internals and track down minor bugs! Without these two, SHARPpy would be a long ways off!

Caption This: Me at the Weather Ready Nation Conversation

Those who know me well know that I absolutely love to tease those with whom I am friends. To this end, below is a rather unflattering picture of me taken this week at the Weather Ready Workshop. I encourage everyone to take a moment and create a caption for this photograph. Please post your caption in the comments! (And, please, try and keep the captions somewhat clean!)

UPDATE: You can view more photographs from the Weather Ready Nation Conversation on the Flickr Stream.
Weather Ready Nation

Think Different

Tonight, as many mourn the loss of Steve Jobs, keep in mind that the next person to change the world as he did might be you.

On Any Given Saturday

Every Saturday during the fall, life in the southeastern United States comes to a stop. Attention turns toward college football and the escape from reality it offers. This break from reality has never been more needed for the city of Tuscaloosa, AL. Home to the University of Alabama, this city was devastated by a tornado during the historic 27 April 2011 tornado outbreak. Here’s a good story from ESPN on the impact of today’s Alabama-Kent State football game on the region.

One weekend in July, four Kent State players and a few athletic department officials came down to participate. One of them, senior running back Jacquise Terry, is from Phenix City, Ala., on the Georgia border. He played AAU basketball with Crimson Tide corner DeQuan Menzie.

“I have done Habitat before,” said Jacquise, who is minoring in construction management, “but I have never done it with players I compete with. That was the good part about it. We were able to put aside what we were about to do a month later and go in and help for a good cause. We fell right in together. They told us they appreciated us coming down. We bonded with those guys.”

Don’t Mock the Meteorologist

Meteorologists all across the country are having questions today regarding the perceived over-hyping of Hurricane Irene. Leaving aside the discussion about whether or not Irene was over-hyped, and who might actually be to blame (spoiler-alert: It’s not the meteorologists…), comedian Dean Obeidallah offers a defense of meteorologists in his opinion piece titled “Don’t Mock the Weatherguy

In short, Mr. Obeidallah offers this warning, “If we continue to mock these heroic weatherpeople who try to make our lives in a challenging world a little better, then don’t be surprised when, one day, we hear them collectively announce, ‘Enough!’” and leave the population “…like cavemen to predict weather based on the sounds of insects and our swollen feet.”

Long Hiatus Ends

A lot has taken place the last few months and this has prevented me from being able to blog. Since my last post the United States has experienced a devastating tornado outbreak (27 April 2011 in the southeast), the deadliest tornado since 1947 (22 May 2011 in Joplin, MO), and a violent tornado outbreak in the more tradition area of Oklahoma (24 May 2011). What makes this year remarkable is the number of tornadoes that have hit heavily populated areas, which has contributed to the number of direct tornado fatalities being well over 500. It’s certainly been an emotional year for meteorologists. Also during my blogging hiatus, the National Severe Storms Laboratory and the Storm Prediction Center held another successful Experimental Forecast Program. The datasets generated will provide researchers ample opportunities for discovery.

This post is short, but serves to end my blogging drought. In the coming days, weeks, and months, I hope to share what’s been keeping me busy. Here’s to getting back into the habit of putting my thoughts in words.

Updated Tornado Information Coming Soon!

Greg Carbin, Warning Coordination Meteorologist at the Storm Prediction Center (SPC), informed me today that he has updated the SPC tornado database up through 2010. Thus, in the coming days, I’ll updated the graphics to include the last 2 years worth of tornadoes. I look forward to playing with the updated data!