AWIPS Tips: Creating New Products with Python-AWIPS

AWIPS Tips


Welcome back to AWIPS Tips!

Today we’re going to look at another python-awips example notebook. If you aren’t familiar with python-awips, please take a look through our previous AWIPS Tips about the package. The notebook we’re looking at today is about calculating accumulated precipitation and displaying a region of interest.

Two unique parts about this notebook include:

  • Using an existing product (model precipitation) to create a derived product – accumulated precipitation.
  • Plotting a CONUS view of the data and identifying the region of highest precipitation to then create a specific region of interest plot.

Creating Accumulated Precipitation Product

Similar to many of our other python-awips example notebooks, this one begins by defining and creating a data request for the particular EDEX server of interest. Where this notebook differs is, instead of simply plotting or manipulating the returned data directly, here we actually create a derived product by looping through all the results and aggregating the precipitation data. Since we use this process more than once, it’s defined in a function called calculate_accumulate_precip.

This function not only returns the aggregated data array, but also computes the array location of the highest amount of rainfall. This x,y value can then be used in the latitude and longitude arrays to convert to coordinates which define the center of our region of interest.

This function allows us to generate our CONUS-wide accumulated precipitation plot like below:

Creating the Region of Interest Plot

During the aggregation of data in the calculate_accumulated_precip function, we found the maximum point in the data array. This gives us the index location in the data array. Those values are then used to find the geographic coordinates in the latitude and longitude arrays. From there, we add a buffer to create a bounding box that defines our region of interest. This allows us to quickly draw a new region of interest plot with the existing data, like the image below.

This then enables an additional data request to be made to EDEX for a higher resolution dataset in the same regional area. So, an additional, corresponding plot can be created quickly:

Overview

Thanks for joining us today. Please let us know if you create any “derived products” of your own, like the accumulated precipitation product shown in this example. Hopefully the additional topics and skills presented in this blog allow you to work with python-awips. Let us know if you have any additional questions or example notebooks of your own you would like to share with us! Check back in two weeks for the next blog post, diving more in depth with distributed EDEX systems.


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

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
« April 2024
SunMonTueWedThuFriSat
 
5
6
7
8
9
10
11
12
13
14
15
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today