{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Examples for cmip6 decadal\n", "\n", "**Rooki** calls climate data operations on the **rook** processing service." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import os\n", "os.environ['ROOK_URL'] = 'http://rook.dkrz.de/wps'\n", "\n", "from rooki import operators as ops" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run subset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "wf = ops.Subset(\n", " ops.Input(\n", " 'tas', ['c3s-cmip6.DCPP.CMCC.CMCC-CM2-SR5.dcppA-hindcast.s2005-r10i1p1f1.Amon.tas.gn.v20210719']\n", " # 'tas', ['cmip6.DCPP.CMCC.CMCC-CM2-SR5.dcppA-hindcast.s2005-r10i1p1f1.Amon.tas.gn.v20210719']\n", " ),\n", " time=\"2010-01-01/2010-12-30\",\n", ")\n", "\n", "resp = wf.orchestrate()\n", "resp.ok" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**open with xarray**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dsets = resp.datasets()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ds = dsets[0]\n", "ds" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**provenance**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "prov_plot_url = resp.provenance_image()\n", "prov_plot_url" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from IPython.display import Image\n", "Image(prov_plot_url)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.1" } }, "nbformat": 4, "nbformat_minor": 4 }