AWIPS Tips: Plotting NEXRAD Data in Python

AWIPS Tips

Welcome back to AWIPS Tips!

Today we’re going to take a look at another python-awips example notebook. This notebook demonstrates how to work with radar data by investigating available radar sites and seeing what products are available for a given site. The plots created in this notebook are from NEXRAD 3 algorithm, precipitation, and derived product data, not the base data. If you are not familiar with python-awips, please feel free to check out our documentation or visit previous AWIPS Tips for python-awips.

As shown in many of our other example notebooks, one of the first steps is to establish a connection to an EDEX server and create a data request for the type of data you’re interested in. In this case, we connect to our public EDEX server and create a new request for radar data.

  DataAccessLayer.changeEDEXHost("edex-cloud.unidata.ucar.edu")
  request = DataAccessLayer.newDataRequest("radar")

From here we can look at the available location names, which happen to be radar sites, for this dataset. We can also investigate the available parameters by using the DataAccessLayer.getAvailableParameters() function, and we find that we get two “types” of parameters returned. To view the parameters we can use the following radar-specific functions:

  productIDs = DataAccessLayer.getRadarProductIDs(availableParms)
  productNames = DataAccessLayer.getRadarProductNames(availableParms)

After printing out the productIDs and productNames we can more clearly distinguish which parameters are which. This allows you to easily plot data either by the product IDs or the product names.

In this notebook, we then continue on by attempting to plot a graph for each of the given productNames.

Tip: If you’d like to challenge yourself, change the example notebook to cycle through the productIDs instead of productNames and compare the output. The output plots should be the same content, but may be in a different order and have slightly different titles (using the ID instead of the name).

If you examine the plotting logic closely in section 5 you’ll see that we check for available levels and available times before attempting to plot the data. This is to confirm that we actually have something to plot for that product name.

Using cartopy and matplotlib, we’re able to produce images like the following composite reflectivity output at the Baltimore, MD radar site, KLWX:

AWIPS Tips

Thank you for joining us this week, and we hope you learned a bit more about python-awips and some of the capabilities it has to offer. If you modify or create your own example notebooks, please feel free to reach out to us and we’d be happy to review and incorporate them into our examples if they’re useful! Please check back in two weeks for the next blog post, using hotkey shortcuts in CAVE.

To view archived blogs, visit the AWIPS Tips blog tag, and get notified of the latest updates from the AWIPS team by signing up for the AWIPS mailing list. Questions or suggestions for the team on future topics? Let us know at support-awips@unidata.ucar.edu

This blog was posted in reference to v20.3.2-2 of NSF Unidata AWIPS

Comments:

Post a Comment:
  • HTML Syntax: Allowed
News@Unidata
News and information from the Unidata Program Center
News@Unidata
News and information from the Unidata Program Center

Welcome

FAQs

Developers’ blog

Take a poll!

What if we had an ongoing user poll in here?

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