{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example for using concat operator on cmip6 decadal without average\n", "\n", "**Rooki** calls climate data operations on the **rook** processing service." ] }, { "cell_type": "code", "execution_count": 1, "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": [ "## Check attributes of original decadal dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wf = ops.Subset(\n", " ops.Input(\n", " 'tas', [\n", " 'c3s-cmip6-decadal.DCPP.MOHC.HadGEM3-GC31-MM.dcppA-hindcast.s1995-r5i1p1f2.Amon.tas.gn.v20200417'\n", " ]\n", " ),\n", " time=\"1996-01-01/1996-01-31\"\n", ")\n", "\n", "resp = wf.orchestrate()\n", "resp.ok" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Downloading to /var/folders/qb/mg0csz190wd4rxybhhnwjln80000gn/T/metalink_ilqtp6k6/tas_Amon_HadGEM3-GC31-MM_dcppA-hindcast_r5i1p1f2_gn_19960116-19960116.nc.\n" ] } ], "source": [ "dsets = resp.datasets()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset>\n",
"Dimensions: (time: 1, bnds: 2, lat: 324, lon: 432)\n",
"Coordinates:\n",
" * time (time) object 1996-01-16 00:00:00\n",
" * lat (lat) float64 -89.72 -89.17 -88.61 -88.06 ... 88.61 89.17 89.72\n",
" * lon (lon) float64 0.4167 1.25 2.083 2.917 ... 357.1 357.9 358.7 359.6\n",
" height float64 ...\n",
"Dimensions without coordinates: bnds\n",
"Data variables:\n",
" time_bnds (time, bnds) object ...\n",
" lat_bnds (lat, bnds) float64 ...\n",
" lon_bnds (lon, bnds) float64 ...\n",
" tas (time, lat, lon) float32 ...\n",
"Attributes: (12/43)\n",
" Conventions: CF-1.7 CMIP-6.2\n",
" activity_id: DCPP\n",
" branch_method: no parent\n",
" branch_time_in_child: 0.0\n",
" branch_time_in_parent: 0.0\n",
" creation_date: 2020-05-26T09:33:34Z\n",
" ... ...\n",
" tracking_id: hdl:21.14100/2b29c580-0356-4ced-bf2f-2a6554d4027c\n",
" variable_id: tas\n",
" variable_name: tas\n",
" variant_label: r5i1p1f2\n",
" license: CMIP6 model data produced by Met Office Hadley Ce...\n",
" cmor_version: 3.4.0<xarray.Dataset>\n",
"Dimensions: (time: 1, realization_index: 10, bnds: 2, lat: 324,\n",
" lon: 432)\n",
"Coordinates:\n",
" * time (time) object 1996-01-16 00:00:00\n",
" * lat (lat) float64 -89.72 -89.17 -88.61 ... 88.61 89.17 89.72\n",
" * lon (lon) float64 0.4167 1.25 2.083 ... 357.9 358.7 359.6\n",
" height float64 ...\n",
" reftime object ...\n",
" leadtime (time) timedelta64[ns] ...\n",
" * realization_index (realization_index) int32 0 1 2 3 4 5 6 7 8 9\n",
"Dimensions without coordinates: bnds\n",
"Data variables:\n",
" time_bnds (realization_index, time, bnds) object ...\n",
" lat_bnds (realization_index, lat, bnds) float64 ...\n",
" lon_bnds (realization_index, lon, bnds) float64 ...\n",
" tas (realization_index, time, lat, lon) float32 ...\n",
" realization (realization_index) int32 ...\n",
"Attributes: (12/47)\n",
" Conventions: CF-1.7 CMIP-6.2\n",
" activity_id: DCPP\n",
" branch_method: no parent\n",
" branch_time_in_child: 0.0\n",
" branch_time_in_parent: 0.0\n",
" creation_date: 2020-05-26T09:37:30Z\n",
" ... ...\n",
" license: CMIP6 model data produced by Met Office Hadl...\n",
" cmor_version: 3.4.0\n",
" forcing_description: f2, CMIP6 v6.2.0 forcings; no ozone remapping\n",
" physics_description: physics from the standard model configuratio...\n",
" initialization_description: hindcast initialized based on observations a...\n",
" startdate: s199511<xarray.Dataset>\n",
"Dimensions: (time: 1, bnds: 2, lat: 324, lon: 432)\n",
"Coordinates:\n",
" * time (time) object 1996-01-16 00:00:00\n",
" * lat (lat) float64 -89.72 -89.17 -88.61 ... 88.61 89.17 89.72\n",
" * lon (lon) float64 0.4167 1.25 2.083 ... 357.9 358.7 359.6\n",
" height float64 1.5\n",
" reftime object 1995-11-01 00:00:00\n",
" leadtime (time) timedelta64[ns] 75 days\n",
" realization_index int32 5\n",
"Dimensions without coordinates: bnds\n",
"Data variables:\n",
" time_bnds (time, bnds) object ...\n",
" lat_bnds (lat, bnds) float64 ...\n",
" lon_bnds (lon, bnds) float64 ...\n",
" tas (time, lat, lon) float32 ...\n",
" realization int32 ...\n",
"Attributes: (12/47)\n",
" Conventions: CF-1.7 CMIP-6.2\n",
" activity_id: DCPP\n",
" branch_method: no parent\n",
" branch_time_in_child: 0.0\n",
" branch_time_in_parent: 0.0\n",
" creation_date: 2020-05-26T09:37:30Z\n",
" ... ...\n",
" license: CMIP6 model data produced by Met Office Hadl...\n",
" cmor_version: 3.4.0\n",
" forcing_description: f2, CMIP6 v6.2.0 forcings; no ozone remapping\n",
" physics_description: physics from the standard model configuratio...\n",
" initialization_description: hindcast initialized based on observations a...\n",
" startdate: s199511<xarray.Dataset>\n",
"Dimensions: (time: 1, bnds: 2, lat: 324, lon: 432)\n",
"Coordinates:\n",
" * time (time) object 1996-01-16 00:00:00\n",
" * lat (lat) float64 -89.72 -89.17 -88.61 ... 88.61 89.17 89.72\n",
" * lon (lon) float64 0.4167 1.25 2.083 ... 357.9 358.7 359.6\n",
" height float64 1.5\n",
" reftime object 1995-11-01 00:00:00\n",
" leadtime (time) timedelta64[ns] 75 days\n",
" realization_index int32 5\n",
"Dimensions without coordinates: bnds\n",
"Data variables:\n",
" time_bnds (time, bnds) object ...\n",
" lat_bnds (lat, bnds) float64 ...\n",
" lon_bnds (lon, bnds) float64 ...\n",
" tas (time, lat, lon) float32 ...\n",
" realization int32 ...\n",
"Attributes: (12/47)\n",
" Conventions: CF-1.7 CMIP-6.2\n",
" activity_id: DCPP\n",
" branch_method: no parent\n",
" branch_time_in_child: 0.0\n",
" branch_time_in_parent: 0.0\n",
" creation_date: 2020-05-26T09:37:30Z\n",
" ... ...\n",
" license: CMIP6 model data produced by Met Office Hadl...\n",
" cmor_version: 3.4.0\n",
" forcing_description: f2, CMIP6 v6.2.0 forcings; no ozone remapping\n",
" physics_description: physics from the standard model configuratio...\n",
" initialization_description: hindcast initialized based on observations a...\n",
" startdate: s199511