{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Create a plot of multiple moments from a NEXRAD file\n\nAn example which creates a plot containing multiple moments taken from a\nNEXRAD Archive file.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "print(__doc__)\n\n# Author: Jonathan J. Helmus (jhelmus@anl.gov)\n# License: BSD 3 clause\n\nimport matplotlib.pyplot as plt\n\nimport pyart\nfrom pyart.testing import get_test_data\n\nfilename = get_test_data(\"KATX20130717_195021_V06\")\nradar = pyart.io.read_nexrad_archive(filename)\ndisplay = pyart.graph.RadarDisplay(radar)\nfig = plt.figure(figsize=(10, 10))\n\nax = fig.add_subplot(221)\ndisplay.plot(\n \"velocity\",\n 1,\n ax=ax,\n title=\"Doppler Velocity\",\n colorbar_label=\"\",\n vmin=-32.0,\n vmax=32.0,\n axislabels=(\"\", \"North South distance from radar (km)\"),\n)\ndisplay.set_limits((-300, 300), (-300, 300), ax=ax)\n\nax = fig.add_subplot(222)\ndisplay.plot(\n \"differential_reflectivity\",\n 0,\n ax=ax,\n title=\"Differential Reflectivity\",\n colorbar_label=\"\",\n axislabels=(\"\", \"\"),\n)\ndisplay.set_limits((-300, 300), (-300, 300), ax=ax)\n\nax = fig.add_subplot(223)\ndisplay.plot(\n \"differential_phase\", 0, ax=ax, title=\"Differential Phase\", colorbar_label=\"\"\n)\ndisplay.set_limits((-300, 300), (-300, 300), ax=ax)\n\nax = fig.add_subplot(224)\ndisplay.plot(\n \"cross_correlation_ratio\",\n 0,\n ax=ax,\n title=\"Correlation Coefficient\",\n colorbar_label=\"\",\n axislabels=(\"East West distance from radar (km)\", \"\"),\n)\ndisplay.set_limits((-300, 300), (-300, 300), ax=ax)\n\nplt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.3" } }, "nbformat": 4, "nbformat_minor": 0 }