{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Reading IDV data into this notebook as a netCDF variable" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "36b13f741a414ae98674ccc24c3acede", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='

ipython_IDV Control Panel

'), HBox(children=(HTML(value='Resources:'…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%reload_ext ipython_IDV\n", "from ipython_IDV import Idv" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "# A RAMADDA bundle that uses a small test dataset\n", "# at https://geodesystems.com/repository/entry/show/example_grid.xidv?entryid=4728e5eb-fa89-4af8-8162-e2f66a9cd0c9\n", " \n", "%load_bundle https://geodesystems.com/repository/entry/get/example_grid.xidv?entryid=4728e5eb-fa89-4af8-8162-e2f66a9cd0c9\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "float32 WindSpeed(time, level, y, x)\n", " units: meters/second\n", " grid_mapping: lambert_conformal_conic\n", "unlimited dimensions: \n", "current shape = (2, 19, 65, 93)\n", "filling off\n", "\n", "\n", "float32 Z(time, level, y, x)\n", " units: gp m\n", " grid_mapping: lambert_conformal_conic\n", "unlimited dimensions: \n", "current shape = (2, 1, 65, 93)\n", "filling off\n", "\n" ] } ], "source": [ "data1 = Idv.export_data(display_id='z')\n", "Z=data1.variables['Z']\n", "data2 = Idv.export_data(display_id='windspeed')\n", "windspeed=data2.variables['WindSpeed']\n", "print(windspeed)\n", "print (Z)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "meters/second\n" ] } ], "source": [ "print(windspeed.units)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "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.6.5" }, "widgets": { "state": { "78833bb5006c4f6fb1d9debdb376cb5b": { "views": [ { "cell_index": 0 } ] } }, "version": "1.2.0" } }, "nbformat": 4, "nbformat_minor": 2 }