{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plot ICARTT Formatted Files\n\nThis example shows how to read and display International Consortium for Atmospheric\nResearch on Transport and Transformation (ICARTT) file format standards V2.0\n\nAuthor: Joe O'Brien\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nfrom arm_test_data import DATASETS\n\nimport act\nfrom act.io.icartt import read_icartt\n\n# Call the read_icartt function, which supports input\n# for ICARTT (v2.0) formatted files.\n# Example file is ARM Aerial Facility Navigation Data\nfilename_icartt = DATASETS.fetch('AAFNAV_COR_20181104_R0.ict')\nds = read_icartt(filename_icartt)\n\n# Create an ACT TimeSeriesDisplay.\ndisplay = act.plotting.TimeSeriesDisplay(\n ds, ds_name=ds.attrs['_datastream'], subplot_shape=(2,), figsize=(15, 5)\n)\n# Display the AAF Ambient Temperature\ndisplay.plot('ambient_temp', subplot_index=(0,), label='Ambient')\n# Display the AAF Dewpoint Temperature\ndisplay.plot('dewpoint_temperature', subplot_index=(0,), label='Dewpoint')\n# Display the AAF Total Temperature\n# (i.e Temperature not corrected for heating due to atmospheric compression)\n# Note: Total Temperature >= Ambient (Static) Temperature\ndisplay.plot('total_temp', subplot_index=(0,), label='Total')\n\n# Display the AAF Static Air Pressure on the second subplot\ndisplay.plot('static_pressure', subplot_index=(1,))\n# Include legend to identify AAF Temperatures\nplt.legend(loc='lower left')\n# Adjust vertical space between subplots\nplt.subplots_adjust(hspace=0.4)\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 }