{ "cells": [ { "cell_type": "markdown", "id": "eastern-costume", "metadata": {}, "source": [ "# Test: subset HadGEM3-GC31-LL/ssp245\n", "\n", "* Project: c3s-cmip6\n", "* Variable: tas\n", "* Frequency: day\n", "* *Complete* files" ] }, { "cell_type": "code", "execution_count": null, "id": "conditional-feelings", "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": "graduate-roommate", "metadata": {}, "outputs": [], "source": [ "wf = ops.Subset(\n", " ops.Input(\n", " 'cmip6', ['c3s-cmip6.ScenarioMIP.MOHC.HadGEM3-GC31-LL.ssp245.r1i1p1f3.day.tas.gn.v20190908']\n", " ),\n", ")\n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "usual-study", "metadata": {}, "outputs": [], "source": [ "resp = wf.orchestrate()\n", "assert resp.ok" ] }, { "cell_type": "code", "execution_count": null, "id": "fossil-playing", "metadata": {}, "outputs": [], "source": [ "resp.download_urls()" ] }, { "cell_type": "code", "execution_count": null, "id": "suitable-framework", "metadata": {}, "outputs": [], "source": [ "assert 'tas_day_HadGEM3-GC31-LL_ssp245_r1i1p1f3_gn_20150101-20491230.nc' in resp.download_urls()[0]\n" ] }, { "cell_type": "code", "execution_count": null, "id": "aggregate-wedding", "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": "elegant-direction", "metadata": {}, "outputs": [], "source": [ "assert resp.num_files == 2, resp.num_files" ] }, { "cell_type": "code", "execution_count": null, "id": "italian-performer", "metadata": {}, "outputs": [], "source": [ "assert int(resp.size_in_mb) == 1684, resp.size_in_mb" ] }, { "cell_type": "markdown", "id": "coupled-external", "metadata": {}, "source": [ "Provenance: \n", "* expected duration=20 secs" ] }, { "cell_type": "code", "execution_count": null, "id": "considerable-integrity", "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 }