diff --git a/notebooks/tutorial/AutoEncoder_ImprovingResults.ipynb b/notebooks/tutorial/AutoEncoder_ImprovingResults.ipynb index cfbb4ad5..6e3d5ae9 100644 --- a/notebooks/tutorial/AutoEncoder_ImprovingResults.ipynb +++ b/notebooks/tutorial/AutoEncoder_ImprovingResults.ipynb @@ -17,18 +17,37 @@ { "cell_type": "code", "execution_count": 1, - "id": "ac5e9f68-db0c-48ea-a44a-fc2d7b8d4d1a", + "id": "74c4c763-b552-4ac1-85b9-eb7cb9f459fa", "metadata": {}, "outputs": [], "source": [ - "import xarray as xr\n", - "import matplotlib.pyplot as plt\n", "import datetime" ] }, { "cell_type": "code", "execution_count": 2, + "id": "b96f226f-0350-4230-9fc6-25c2517039fc", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "ac5e9f68-db0c-48ea-a44a-fc2d7b8d4d1a", + "metadata": {}, + "outputs": [], + "source": [ + "import xarray as xr\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 4, "id": "0774ae4f-6403-4acb-9235-cb357d6abe1b", "metadata": {}, "outputs": [], @@ -37,27 +56,49 @@ "import pyearthtools.pipeline as petpipe\n" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "543a8743-48ea-42d7-b65a-d1833330f967", + "metadata": {}, + "outputs": [], + "source": [ + "import warnings\n", + "warnings.filterwarnings('ignore')" + ] + }, { "cell_type": "markdown", "id": "27446f8c-6a25-44f6-a327-4e8c7d703d2f", "metadata": {}, "source": [ - "If you are not at the NCI site, then change the following cell to import the correct site_archive" + "Set the data accessor to the accessor that is appropriate for your site. \n", + "* NCI - `import site_archive_nci`\n", + "* JASMIN `import site_archive_jasmin`\n", + "* Met Office - `import site_archive_met_office`" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "id": "7c09b47b-a349-46f3-b5f0-86e2391d68bf", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ROOT_DIRECTORIES: {'ERA5lowres': '/gws/ssde/j25a/mmh_storage/theme3/weatherbench/5.625deg/', 'MOGLOBAL': '/gws/ssde/j25a/mmh_storage/theme3/mo_pet_site_archive/mo_global/', 'MOUKV': '/gws/ssde/j25a/mmh_storage/theme3/mo_pet_site_archive/mo_ukv/', 'Himawari': '/gws/ssde/j25a/mmh_storage/theme3/rv74_himawari', 'HimawariChannels': '/gws/ssde/j25a/mmh_storage/theme3/ra22_himawari', 'Rainfields3': '/gws/ssde/j25a/mmh_storage/theme3/rq0Radar'}\n" + ] + } + ], "source": [ - "import site_archive_nci" + "import site_archive_jasmin" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "id": "ee1a2b6b-00c2-4946-93d8-0a5425353724", "metadata": {}, "outputs": [], @@ -68,7 +109,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 8, "id": "0c778ed0-af3c-4590-b735-0a2374016e79", "metadata": {}, "outputs": [], @@ -80,7 +121,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 9, "id": "3585d2a8-87ab-4b2d-bbfd-be84978bc919", "metadata": {}, "outputs": [], @@ -99,12 +140,17 @@ "source": [ "## Load and prepare data\n", "\n", - "To load and prepare the data, we will use the PyEarthTools site accessor, and then build a pipeline with the data accessor to do the necessary transforms to prepare the data for training an autoencoder." + "To load and prepare the data, we will use the PyEarthTools site accessor, and then build a pipeline with the data accessor to do the necessary transforms to prepare the data for training an autoencoder.\n", + "\n", + "PyEarthTools API docs\n", + "* [Data API Index](https://pyearthtools.readthedocs.io/en/latest/api/data/data_index.html)\n", + "* [Archive Index Class docs](https://pyearthtools.readthedocs.io/en/latest/api/data/data_api.html#pyearthtools.data.indexes.ArchiveIndex)\n", + "* [Example ERA5 accessor](https://pyearthtools.readthedocs.io/en/latest/api/data/data_api.html#pyearthtools.data.download.weatherbench.WB2ERA5)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "id": "bd7a1c13-31db-4d73-951b-f1d15cd241e8", "metadata": {}, "outputs": [], @@ -115,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 11, "id": "2f19a69a-b000-478b-81db-3ecc6e49d31c", "metadata": {}, "outputs": [], @@ -125,18 +171,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 12, "id": "9a28bc4d-8b72-4be7-8245-d9f67ed8ba23", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/005/sh7673/prog/pet_fork/packages/data/src/pyearthtools/data/indexes/_indexes.py:790: IndexWarning: Data requested at a higher resolution than available. nanosecond > minute\n", - " warnings.warn(\n" - ] - }, { "data": { "text/html": [ @@ -155,9 +193,7 @@ "\n", "\n", "\n", - "