{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# NOAA FMCW and parsivel plot\nARM and NOAA have campaigns going on in the Crested Butte, CO region\nand as part of that campaign NOAA has FMCW radars deployed that could\nbenefit the broader ARM and NOAA communities. This is an example of\nhow to plot both a NOAA FMCW PSL and NOAA parsivel two panel plot\nobserving the same event.\n\nAuthor: Zach Sherman, Adam Theisen\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n\nimport act\n\n# Use the ACT downloader to download a file from the\n# Kettle Ponds site on 8/01/2022 between 2200 and 2300 UTC.\nresult_22 = act.discovery.download_noaa_psl_data(\n site='kps', instrument='Radar FMCW Moment', startdate='20220801', hour='22'\n)\nresult_23 = act.discovery.download_noaa_psl_data(\n site='kps', instrument='Radar FMCW Moment', startdate='20220801', hour='23'\n)\n\n# Read in the .raw files from both hours. Spectra data are also downloaded.\nds1 = act.io.noaapsl.read_psl_radar_fmcw_moment([result_22[-1], result_23[-1]])\n\n# Read in the parsivel text files.\nurl = [\n 'https://downloads.psl.noaa.gov/psd2/data/realtime/DisdrometerParsivel/Stats/kps/2022/213/kps2221322_stats.txt',\n 'https://downloads.psl.noaa.gov/psd2/data/realtime/DisdrometerParsivel/Stats/kps/2022/213/kps2221323_stats.txt',\n]\nds2 = act.io.noaapsl.read_psl_parsivel(url)\n\n# Create a TimeSeriesDisplay object using both datasets.\ndisplay = act.plotting.TimeSeriesDisplay(\n {'NOAA Site KPS PSL Radar FMCW': ds1, 'NOAA Site KPS Parsivel': ds2},\n subplot_shape=(2,),\n figsize=(10, 10),\n)\n\n# Plot PSL Radar followed by the parsivel data.\ndisplay.plot(\n 'reflectivity_uncalibrated',\n dsname='NOAA Site KPS PSL Radar FMCW',\n cmap='HomeyerRainbow',\n subplot_index=(0,),\n)\ndisplay.plot(\n 'number_density_drops',\n dsname='NOAA Site KPS Parsivel',\n cmap='HomeyerRainbow',\n subplot_index=(1,),\n)\n# Adjust ylims of parsivel plot.\ndisplay.axes[1].set_ylim([0, 10])\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 }