Expanding Declarative Syntax Capabilities in MetPy

Nathaniel Martinez
Nathaniel Martinez

The focus of my summer internship was working on MetPy, both adding new functionality and updating existing documentation to reflect recent updates to MetPy. In particular, I focused on expanding current declarative syntax functionality to Matplotlib’s pcolormesh via the RasterPlot class. Declarative syntax enables quick and easy plotting of data, particularly for users new to Python or MetPy.

Currently, users can use declarative syntax to make plots that use the Matplotlib functions contour(), contourf(). Though these functions are able to make a wide range of plots, using pcolormesh() declaratively was missing. Given that pcolormesh() is commonly used to create raster plots, radar plots, etc., we found it important to add declarative syntax support to MetPy.

Declarative syntax
MetPy's declarative syntax (click to enlarge)

With declarative syntax (shown at left), users do not have to call the Matplotlib function pcolormesh() and can simply pass through the data, field, and level the user would like to plot. The Matplotlib calls would happen in the backend and output the image to the right. To do this, we followed the software development process of planning, designing, implementing, testing, and integrating. I found this to be particularly exciting since this was my first time going through the development process on a piece of code that was to be released and utilized by users.

visualization
The resulting visualization

Outside of adding declarative syntax for raster plots, I also worked on updating, improving, and adding example documentation for radar. Some functions that were tagged in past releases were not included in the radar documentation and I worked to make sure functions like azimuth_range_to_lat_lon that MetPy has were used in tutorials for new or beginning users to MetPy.

I could not have done all of this work without the support of Drew Camron, Ryan May, and the entire Unidata staff. I’d also like to thank fellow Unidata interns Hassan and Rhoen, and the other NCAR/UCAR/UCP and SOARS interns for a great summer together in Boulder!

Comments:

Post a Comment:
Comments are closed for this entry.
Unidata Developer's Blog
A weblog about software development by Unidata developers*
Unidata Developer's Blog
A weblog about software development by Unidata developers*

Welcome

FAQs

News@Unidata blog

Take a poll!

What if we had an ongoing user poll in here?

Browse By Topic
Browse by Topic
« October 2024
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today