{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# IMPROVE Data\n\nThis example shows how to get IMPROVE data for the\nsystem located at ARM's Southern Great Plains site.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n\nimport act\n\n# Pull the data using the site_id from IMPROVE\n# https://views.cira.colostate.edu/adms/Pub/SiteSummary.aspx?dsidse=10001&siidse=244\n# Data from the IMPROVE station next to ARM's BNF deployment\n# can be found using site_id='21'\nds = act.discovery.get_improve_data(site_id='244', start_date='1/1/2023', end_date='12/31/2023')\n\n# Remove all data that's set to the FillValue\nds = ds.where(ds['aluminum_fine'] != ds['aluminum_fine'].attrs['_FillValue'])\n\ndisplay = act.plotting.TimeSeriesDisplay(ds, figsize=(10, 6))\ndisplay.plot('aluminum_fine')\n\n# Print out the known problems documented by IMPROVE\nprint(ds.attrs['site_problems'])\n\n# Write out the data to netCDF and csv\nds.to_netcdf('./sgpimprove.20230101.nc')\nds.to_dataframe().to_csv('sgpimprove.20230101.csv')\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 }