{ "cells": [ { "cell_type": "markdown", "id": "severe-evolution", "metadata": {}, "source": [ "# Test: subset c3s-cmip6 HadGEM3-GC31-LL/ssp585" ] }, { "cell_type": "code", "execution_count": null, "id": "fourth-presentation", "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": "code", "execution_count": null, "id": "quantitative-yeast", "metadata": {}, "outputs": [], "source": [ "wf = ops.Subset(\n", " ops.Input(\n", " 'cmip6', ['c3s-cmip6.ScenarioMIP.MOHC.HadGEM3-GC31-LL.ssp585.r1i1p1f3.Amon.tas.gn.v20200114']\n", " ),\n", ")\n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "descending-somerset", "metadata": {}, "outputs": [], "source": [ "resp = wf.orchestrate()\n", "assert resp.ok" ] }, { "cell_type": "code", "execution_count": null, "id": "functioning-amount", "metadata": {}, "outputs": [], "source": [ "resp.download_urls()" ] }, { "cell_type": "code", "execution_count": null, "id": "instructional-puzzle", "metadata": {}, "outputs": [], "source": [ "assert 'tas_Amon_HadGEM3-GC31-LL_ssp585_r1i1p1f3_gn_201501-204912.nc' in resp.download_urls()[0]\n" ] }, { "cell_type": "code", "execution_count": null, "id": "terminal-socket", "metadata": {}, "outputs": [], "source": [ "assert 'https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip6' in resp.download_urls()[0]" ] }, { "cell_type": "code", "execution_count": null, "id": "defensive-personal", "metadata": {}, "outputs": [], "source": [ "assert resp.num_files == 2, resp.num_files" ] }, { "cell_type": "code", "execution_count": null, "id": "dynamic-swing", "metadata": {}, "outputs": [], "source": [ "assert int(resp.size_in_mb) == 55, resp.size_in_mb" ] }, { "cell_type": "markdown", "id": "alive-manitoba", "metadata": {}, "source": [ "Provenance: \n", "* expected duration=20 secs" ] }, { "cell_type": "code", "execution_count": null, "id": "american-endorsement", "metadata": {}, "outputs": [], "source": [ "from IPython.display import Image\n", "Image(resp.provenance_image())" ] } ], "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.9.2" } }, "nbformat": 4, "nbformat_minor": 5 }