{ "cells": [ { "cell_type": "markdown", "id": "791acb4d-46bb-4ea4-a44d-28c1a2c5c785", "metadata": { "tags": [] }, "source": [ "# Demo for the AUS2200 intake catalogue" ] }, { "cell_type": "markdown", "id": "1cc14a25-271e-458e-b6d0-1ea2a1cfe1c5", "metadata": {}, "source": [ "### How to load output for an experiment without knowledge where the output lives on NCI" ] }, { "cell_type": "code", "execution_count": 1, "id": "5e07cd11-e7c2-42b2-ae03-486402444db0", "metadata": { "tags": [] }, "outputs": [], "source": [ "import intake\n", "import cf_xarray" ] }, { "cell_type": "code", "execution_count": 2, "id": "f1d4a27d-19df-4559-b597-b06475fec789", "metadata": { "tags": [] }, "outputs": [], "source": [ "catalog = intake.open_catalog('/g/data/ua8/Working/packages/aus2200-intake/catalogue.yaml')" ] }, { "cell_type": "markdown", "id": "1e597611-1285-4727-97d2-47fb9fb7cb9e", "metadata": {}, "source": [ "List all the datasets available." ] }, { "cell_type": "code", "execution_count": 3, "id": "69a1e6fd-9071-4ec1-8898-1e84a656db70", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "['ashwed80', 'ashwed83', 'canberra03', 'combined']" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(catalog)" ] }, { "cell_type": "markdown", "id": "615a3dcd-92e3-4743-90f4-574b874e41cf", "metadata": {}, "source": [ "At the moment we have one dataset for each separate simulation and a combined dataset which includes all simulations." ] }, { "cell_type": "markdown", "id": "8d71bdf0-c154-4bb4-954d-499bf2625494", "metadata": {}, "source": [ "## Example of dataset for a single simulation: canberra03" ] }, { "cell_type": "code", "execution_count": 4, "id": "815c99b5-4974-4187-9d59-c50ca80fa837", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'A limited area model study of the entire Australian continent at 2.2 km resolution, using the UM atmospheric model. ERA5+ERA5Land reanalysis data was used to provide initial and boundary conditions. The study covers the time period of 2003-01-16 to 2003-01-19, including the 2003 Canberra bushfires.\\nThis dataset is part of the AUS2200 simulations collection at NCI.\\n'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "experiment = catalog['canberra03']\n", "experiment.description" ] }, { "cell_type": "markdown", "id": "cb6372c3-bcc6-43d9-835c-6d47f22d79fe", "metadata": {}, "source": [ "What are the available variables?" ] }, { "cell_type": "code", "execution_count": 5, "id": "d3ed0523-003b-4993-a65f-362bf2f65b67", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "['amdry',\n", " 'amwet',\n", " 'clhigh',\n", " 'cllow',\n", " 'clmed',\n", " 'clmxro',\n", " 'hus',\n", " 'huss',\n", " 'nflash',\n", " 'pralsns',\n", " 'pralsprof',\n", " 'ps',\n", " 'psl',\n", " 'reflmax',\n", " 'storm',\n", " 'tas',\n", " 'tdps',\n", " 'ts',\n", " 'uas',\n", " 'vas',\n", " 'wsgmax10m',\n", " 'cl',\n", " 'cli',\n", " 'clw',\n", " 'eow',\n", " 'estot',\n", " 'evspsbl',\n", " 'grplmxrat',\n", " 'hfls',\n", " 'hfss',\n", " 'mrso',\n", " 'mrsol',\n", " 'pfull',\n", " 'phalf',\n", " 'refl',\n", " 'ta',\n", " 'ua',\n", " 'va',\n", " 'wa',\n", " 'rainmxrat',\n", " 'rlds',\n", " 'rls',\n", " 'rlut',\n", " 'rsds',\n", " 'rsdsdiff',\n", " 'rsdsdir',\n", " 'rsdt',\n", " 'rss',\n", " 'rsut',\n", " 'theta',\n", " 'tke',\n", " 'z0',\n", " 'zmla',\n", " 'lmask',\n", " 'orog']" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "experiment.unique()['variable']" ] }, { "cell_type": "markdown", "id": "f796f2ef-6e89-49a9-a93d-aa64f205118b", "metadata": {}, "source": [ "Let's get one (e.g., the temperature) and do some super-duper analysis!" ] }, { "cell_type": "code", "execution_count": 6, "id": "1640f093-d260-484e-88b9-11b2e60273ad", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset> Size: 2GB\n",
"Dimensions: (time: 96, bnds: 2, lat: 2120, lon: 2600)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 768B 2003-01-16T00:29:59.999999872 ... 2...\n",
" * lat (lat) float64 17kB -48.79 -48.77 -48.75 ... -6.871 -6.852 -6.832\n",
" * lon (lon) float64 21kB 107.5 107.5 107.6 107.6 ... 158.9 159.0 159.0\n",
" height float64 8B ...\n",
"Dimensions without coordinates: bnds\n",
"Data variables:\n",
" time_bnds (time, bnds) datetime64[ns] 2kB dask.array<chunksize=(1, 2), meta=np.ndarray>\n",
" lat_bnds (lat, bnds) float64 34kB dask.array<chunksize=(2120, 2), meta=np.ndarray>\n",
" lon_bnds (lon, bnds) float64 42kB dask.array<chunksize=(2600, 2), meta=np.ndarray>\n",
" tas (time, lat, lon) float32 2GB dask.array<chunksize=(1, 1060, 1300), meta=np.ndarray>\n",
"Attributes: (12/55)\n",
" Conventions: CF-1.7 ACDD1.3\n",
" contact: dsroberts@unimelb.edu.au\n",
" contributor_email: paola.petrelli@utas.edu.au, sam.green@un...\n",
" contributor_name: Paola Petrelli, Samuel Green\n",
" contributor_role: data_curator, data_curator\n",
" contributor_url: https://orcid.org/0000-0002-0164-5105, h...\n",
" ... ...\n",
" intake_esm_attrs:variable: tas\n",
" intake_esm_attrs:experiment_id: canberra03\n",
" intake_esm_attrs:frequency: 1hr\n",
" intake_esm_attrs:date_range: 200301160030-200301192330\n",
" intake_esm_attrs:_data_format_: netcdf\n",
" intake_esm_dataset_key: v1-0.1hr.tas<xarray.DataArray 'tas' (time: 96, lat: 2120, lon: 2600)> Size: 2GB\n",
"dask.array<open_dataset-tas, shape=(96, 2120, 2600), dtype=float32, chunksize=(1, 1060, 1300), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 768B 2003-01-16T00:29:59.999999872 ... 200...\n",
" * lat (lat) float64 17kB -48.79 -48.77 -48.75 ... -6.871 -6.852 -6.832\n",
" * lon (lon) float64 21kB 107.5 107.5 107.6 107.6 ... 158.9 159.0 159.0\n",
" height float64 8B ...\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (for access 1.5 meters) air temperature\n",
" units: K\n",
" cell_methods: area: mean time: mean\n",
" cell_measures: area: areacella\n",
" history: 2023-10-19T06:04:25Z altered by CMOR: Treated scalar dime...