The Unidata Program Center's two summer student interns — Kristen Pozsonyi from Millersville University and Alex Haberlie from Northern Illinois University — have come to the end of their summer appointments. After a summer of dedicated work they presented the results of their projects to the UPC staff on July 29, 2016. You can find a video of their presentation to the UPC staff, along with copies of their presentations, on the Unidata Seminar Series page.
First to present was Kristen Pozsonyi, who after her time at Unidata is returning to Millersville University as a senior to complete her Meteorology degree (along with minors in Mathematics and Computer Science). Kristen spent her time at Unidata working on various MetPy projects, including plotting capabilities, examples, calculations, and finally creating widgets within Jupyter notebooks.
Kristen's first task was adding some standard meteorology calculations to MetPy — with an eye toward replicating functions available in GEMPAK. She wrote calculations to find the Coriolis parameter, pressure to height conversion, equivalent potential temperature, and the saturation mixing ratio. She attempted to add an isallobaric wind calculation, but found her progress stymied by complications within the existing MetPy library.
Kristen's next MetPy project was creating user examples and example galleries. She created sample code to produce wind vector plots, advection, and a meteogram. The data she used to create these examples came from Unidata's THREDDS data server, accessed using the Siphon library.
Interested? Visit the MetPy Examples page.
After adding the MetPy example code, Kristen wanted to improve the user experience by using Jupyter notebooks to provide a visual interface. Users can now browse a gallery of Jupyter notebooks focused on MetPy and Siphon, with imagery to provide a sample of what the finished product will look like.
Visit Unidata's Jupyter Notebook Gallery to see more.
Toward the end of the summer, Kristen began adding user interface widgets to the Jupyter notebooks, allowing users to manipulate sliders to provide parameter values for calculations done in MetPy. She created four widgets using the Tkinter and Ipywidgets toolkits for GUI programming; she found Tkinter to be easier to use for manipulating layouts and specifying where on the window to place each widget.
Next was Alex Haberlie, who is currently earning his PhD at Northern Illinois University (NIU), writing a dissertation on the climatology of mesoscale convective systems. Alex earned his Masters, also at NIU, in Geography with an emphasis in meteorology and his Bachelor's degree in Computer Science from the University of Wisconsin, Platteville.
Alex's project this summer was to improve MetPy mapping functionality by adding point data interpolation capabilities that did not exist in Python. He also wanted to be able to mimic in MetPy some mapping functionalities that exist in GEMPAK.
Before Alex tackled this project, creating mapped, gridded analyses of point meteorological data in MetPy was quite difficult. A user could use SciPy to create gridding, but there were many manual data wrangling tasks needed to get the data into an appropriate format.
Alex wanted to make gridding with MetPy as simple as taking a set of X and Y coordinates and putting them into an array. He also wanted to incorporate the Barnes, Cressman, and natural neighbor interpolation schemes into MetPy. Of these, natural neighbor interpolation was the most challenging, due to the complex geometical processing involved, so Alex chose to begin there.
Natural neighbor interpolation works by creating triangulations from the observation locations. To calculate the value for an interpolated point, the triangulation is used to find the "natural" neighbors of this point. These neighbor points are combined to produce the final estimate of a value at this location.
While the natural neighbor interpolation scheme was difficult to incorporate into MetPy, the effort was worth it, Alex noted. In the end, MetPy's natural neighbor interpolation implementation produces mapping visualizations identical to those from NCAR's NatGrid toolkit. It was a great success.
Incorporating the Barnes and Cressman interpolation schemes into MetPy turned out to be easier than the natural neighbor implementation. These schemes determine mapping by weighting the original data points in inverse proportion to their distance from the interpolation point. In both schemes the number of neighboring points considered can be adjusted, yielding a different end map result.
By the end of the summer, Alex had test coverage for 98% of his MetPy code, along with comparisons of the new interpolations with established mapping functions. Alex's code can be found on the MetPy Github repository.
The Unidata Summer Internships offer undergraduate and graduate students an opportunity to work with Unidata software engineers and scientists on projects drawn from a wide variety of areas in the atmospheric and computational sciences. If you're a student thinking about internships for the summer of 2017, keep Unidata in mind. Unidata's summer internships are generally advertised in early January, so be sure to check back at the beginning of next year. For reference, you can take a look at the Internship page.
We at the Program Center certainly enjoyed having Kristen and Alex working beside us this summer, and we wish them the best of luck in what we're sure will be brilliant careers!