STEP is a Python package that identifies, tracks, and computes physical characteristics of rainstorms given spatiotemporal precipitation data. The algorithms herein are implementations of those proposed by Chang et al. in Changes in Spatiotemporal Precipitation Patterns in Changing Climate Conditions, released by the Center for Robust Decision-making on Climate and Energy Policy. For implementation details, see the wiki.
Note: You may struggle to run the tracking algorithm on a general purpose computer due to its time and space complexity. We suggest using specialized hardware for tracking.
git clone https://github.com/relttira/STEP.git
$ python setup.py install
Name | Version |
---|---|
imageio | 2.8.0 |
Matplotlib | 3.2.1 |
netCDF4 | 1.5.3 |
NumPy | 1.18.5 |
scikit-image | 0.17.2 |
SciPy | 1.4.1 |
Basemap is necessary when using the example plotting function storms_with_map
found in the Tutorial. Additionally, the results of the package can be plotted using your visualization library of choice.
cd step
and create a test.py
file
# load some initial precip data
precip_data = numpy.load('precip_1996.npy', allow_pickle=True)
# set a precip threshold and narrow your region of interest
THRESHOLD = 0.6
trimmed_data = numpy.where(precip_data < THRESHOLD, 0, precip_data)
# create a structural set
struct = numpy.zeros((16, 16))
rr, cc = draw.disk((7.5, 7.5), radius=8.5)
struct[rr, cc] = 1
# identify your storms
labeled_maps = identification.identify(trimmed_data, struct)
# visualize your data
cmap = matplotlib.pyplot .get_cmap('hsv')
visualization.storms(labeled_maps, cmap, 'Identified Storms 1996', 1, show_save='save')
Run the file and see the output:
Please see the Tutorial for a comprehensive introduction.
The Implementation Details wiki provides function signatures and usage tips.
-- You can also call help
(function)
in your python script for more info. Command line interface yet to come.
Both the Methodology wiki and the original publication include background information on the reasoning behind the algorithms.
Feel free to open an issue for bugs and feature requests.
STEP is released under the 'Apache ECL-2 License.
- Alex Rittler - developer
- Won Chang - research and guidance on development
- Michael Stein - research
- Jiali Wang - research
- Rao Kotamarthi - research
- Elisabeth Moyer - research
- Benjamin Kleeman - project maintenance & development
- Emily Padston - project management and guidance