{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plotting QC Flags\n\nSimple example for cleaning up a dataset and\nplotting the data and its QC flags\n\nAuthor: Adam Theisen\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from arm_test_data import DATASETS\nfrom matplotlib import pyplot as plt\n\nimport act\n\n# Read in sample MET data\nfilename_met = DATASETS.fetch('sgpmetE13.b1.20190101.000000.cdf')\nds = act.io.arm.read_arm_netcdf(filename_met)\n\n# In order to utilize all the ACT QC modules and plot the QC,\n# we need to clean up the dataset to follow CF standards\nds.clean.cleanup()\n\n\n# Plot data\n# Creat Plot Display\nvariable = 'temp_mean'\ndisplay = act.plotting.TimeSeriesDisplay(ds, figsize=(15, 10), subplot_shape=(2,))\n\n# Plot temperature data in top plot\ndisplay.plot(variable, subplot_index=(0,))\n\n# Plot QC data\ndisplay.qc_flag_block_plot(variable, subplot_index=(1,))\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 }