From 140452d7db733c08be77d3a89b5a07a8b8392cb9 Mon Sep 17 00:00:00 2001 From: "Paul J. Durack" Date: Fri, 26 Jan 2024 15:15:55 -0800 Subject: [PATCH 1/2] further formatting tweaks; augmented model info; augmented debugging example --- .../Demo/Demo_9_seaIceExtent_ivanova.ipynb | 75 ++++++++++++++----- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb b/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb index bdf9775bf..b2c297c84 100644 --- a/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb +++ b/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb @@ -5,7 +5,7 @@ "id": "acb8d42e", "metadata": {}, "source": [ - "# Sea Ice Demo" + "# PCMDI Metrics Package Sea Ice Demo" ] }, { @@ -14,7 +14,7 @@ "metadata": {}, "source": [ "**Summary** \n", - "The PCMDI Metrics sea ice driver produces metrics that compare modeled and observed sea ice extent. This notebook demonstrates how to run the PCMDI Metrics sea ice code.\n", + "The PCMDI Metrics Package (PMP) sea ice driver produces metrics that compare modeled and observed sea ice extent. This notebook demonstrates how to run the PMP sea ice code.\n", "\n", "**Authors** \n", "Ana Ordonez, Jiwoo Lee, Paul Durack, Peter Gleckler (PCMDI, Lawrence Livermore National Laboratory)\n", @@ -29,9 +29,9 @@ "metadata": {}, "source": [ "## Demo data\n", - "This demo uses three CMIP6 models. The 'siconc' and 'areacello' variables are needed and can be found in the following directories. In addition, six other models are available that can be added to the analyses in this demo:\n", + "This demo uses three CMIP6 models. The Sea-Ice Area Percentage (Ocean Grid; 'siconc') and Grid-Cell Area for Ocean Variables ('areacello') variables are needed and can be found in the following directories. In addition, six other models are available that can be added to the analyses in this demo:\n", "```\n", - "/p/user_pub/pmp/demo/sea-ice/links_siconc \n", + "/p/user_pub/pmp/demo/sea-ice/links_siconc\n", "/p/user_pub/pmp/demo/sea-ice/links_area\n", "```" ] @@ -41,7 +41,7 @@ "id": "00d48042", "metadata": {}, "source": [ - "The observation dataset provided is a satellite derived sea ice concentration dataset from EUMETSAT OSI SAF. More information about this data can be found at the [osi-450-a product page](https://osi-saf.eumetsat.int/products/osi-450-a). The path to this data is:\n", + "The observational dataset provided is the satellite derived sea ice concentration dataset from EUMETSAT OSI-SAF. More data information can be found at the [osi-450-a product page](https://osi-saf.eumetsat.int/products/osi-450-a). The path to this data is:\n", "```\n", "/p/user_pub/pmp/demo/sea-ice/EUMETSAT\n", "```" @@ -53,7 +53,7 @@ "metadata": {}, "source": [ "## Sectors\n", - "This code block produces maps that show the different regions used in the analysis along with the mean observed sea ice concentration. The code to generate these figures can be found in the script `sea_ice_sector_plots.py`.\n", + "This code block produces maps that show the different regions used in the analysis along with the mean observed (OSI-SAF) sea ice concentration. The code to generate these figures can be found in the script `sea_ice_sector_plots.py`.\n", "\n", "Below process will take about 30 seconds." ] @@ -132,7 +132,7 @@ "id": "f316897b", "metadata": {}, "source": [ - "This first case will work with sea ice concentration ouput from a single model, E3SM-1-0. Two overview plots are shown below to visualize the Arctic sea ice in this model.\n", + "This first case will work with sea ice concentration ouput from a single model, E3SM-1-0. Two overview plots are shown below to visualize the Arctic sea ice evolution over time in this model.\n", "\n", "For this demo, we start the OSI-SAF satellite data in 1988 as that avoids missing data in earlier parts of the record.\n", "\n", @@ -196,6 +196,14 @@ "display_png(a,b)" ] }, + { + "cell_type": "markdown", + "id": "404ed8d1", + "metadata": {}, + "source": [ + "## Introducing the PCMDI Metrics Package (PMP) parameter file" + ] + }, { "cell_type": "markdown", "id": "2540cd5d", @@ -283,6 +291,14 @@ "To see all of the parameters available for the sea ice metrics, run the --help command as shown here:" ] }, + { + "cell_type": "markdown", + "id": "dc0d0eeb", + "metadata": {}, + "source": [ + "## Introducing the PMP driver file" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -408,10 +424,11 @@ "id": "9bfa9c97", "metadata": {}, "source": [ + "## Running the PMP sea ice demo\n", "The PMP drivers are run on the command line. In this Jupyter Notebook, we use the bash cell magic function %%bash to run command line functions from the notebook.\n", "\n", "The PMP sea ice metrics driver call follows the basic format:\n", - "ice_driver.py -p parameter_file.py --additional arguments\n", + "sea_ice_driver.py -p parameter_file.py --additional arguments\n", "\n", "The following cell runs the driver with the demo parameter file we saw above.\n", "\n", @@ -1048,7 +1065,7 @@ "id": "cadb1306", "metadata": {}, "source": [ - "Since we have averaged four different realizations, the resulting statistics are different than seen in example 1. The bar chart now contains markers showing the overall spread among the realizations." + "Since we have averaged four different realizations (E3SM-1-0: 'r1i2p2f1', 'r2i2p2f1', 'r3i2p2f1', 'r4i2p2f1'), the resulting statistics are different than seen in example 1. The bar chart now contains markers showing the overall spread among the realizations." ] }, { @@ -1075,7 +1092,7 @@ "id": "499d3935", "metadata": {}, "source": [ - "# Working with multiple models" + "## Working with multiple models" ] }, { @@ -2677,7 +2694,7 @@ "id": "f48b3856", "metadata": {}, "source": [ - "Now the resulting bar chart shows three different models with their spread." + "Now the resulting bar chart shows three different models with their multiple realization spread." ] }, { @@ -2704,7 +2721,7 @@ "id": "bc43281a", "metadata": {}, "source": [ - "# Further exploration" + "## Further exploration" ] }, { @@ -2714,9 +2731,9 @@ "source": [ "Maybe you want to compare more models, or take a closer look at the model data? Here are links to the data for further exploration.\n", "\n", - "As a reminder, data for nine models is available here:\n", + "As a reminder, data for nine CMIP6 models (ACCESS-CM2, ACCESS-ESM1-5, CanESM5, CAS-ESM2-0, E3SM-1-0, E3SM-2-0, GFDL-ESM4, MIROC6, with 30 realizations in total across the model suite) is available here:\n", "```\n", - "/p/user_pub/pmp/demo/sea-ice/links_siconc \n", + "/p/user_pub/pmp/demo/sea-ice/links_siconc\n", "/p/user_pub/pmp/demo/sea-ice/links_area\n", "```\n", "\n", @@ -2730,16 +2747,36 @@ "```\n", "sea_ice_sector_plots.py\n", "sea_ice_line_plots.py\n", - "```\n" + "```" ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "id": "f1161f29", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "## Debugging the LLNL Nimbus binder environment" + ] + }, + { + "cell_type": "markdown", + "id": "fc4b0ab9", + "metadata": {}, + "source": [ + "For CAMAS workshop users, if you hit an issue at login\n", + "\n", + "```\n", + "Launching server...\n", + "Launch attempt 1 failed, retrying...\n", + "Launch attempt 2 failed, retrying...\n", + "Launch attempt 3 failed, retrying...\n", + "User $id already has a running server.\n", + "```\n", + "\n", + "The fix is to login (using your GitHub credentials) using [https://binder-nimbus.llnl.gov/hub/home](https://binder-nimbus.llnl.gov/hub/home) and select \"Stop My Server\".\n", + "\n", + "Once you refresh the start page ([https://binder-nimbus.llnl.gov](https://binder-nimbus.llnl.gov)), login and start again, it should work as expected" + ] } ], "metadata": { From 9dff8b86d5ecb59768727a0fd8c9e512b98d0b4d Mon Sep 17 00:00:00 2001 From: lee1043 Date: Fri, 26 Jan 2024 15:53:16 -0800 Subject: [PATCH 2/2] add logos at the top of the notebook, add link to PMP install instructions --- .../Demo/Demo_9_seaIceExtent_ivanova.ipynb | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb b/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb index b2c297c84..955dbf1b3 100644 --- a/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb +++ b/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb @@ -5,7 +5,30 @@ "id": "acb8d42e", "metadata": {}, "source": [ - "# PCMDI Metrics Package Sea Ice Demo" + "# PCMDI Metrics Package Sea Ice Demo\n", + "\n", + "
\n", + "

\n", + " \"Program \n", + " \"United \n", + " \"Lawrence\n", + "

\n", + "
" ] }, { @@ -20,7 +43,10 @@ "Ana Ordonez, Jiwoo Lee, Paul Durack, Peter Gleckler (PCMDI, Lawrence Livermore National Laboratory)\n", "\n", "**Reference** \n", - "Ivanova, D. P., P. J. Gleckler, K. E. Taylor, P. J. Durack, and K. D. Marvel, 2016: Moving beyond the Total Sea Ice Extent in Gauging Model Biases. J. Climate, 29, 8965–8987, https://doi.org/10.1175/JCLI-D-16-0026.1. " + "Ivanova, D. P., P. J. Gleckler, K. E. Taylor, P. J. Durack, and K. D. Marvel, 2016: Moving beyond the Total Sea Ice Extent in Gauging Model Biases. J. Climate, 29, 8965–8987, https://doi.org/10.1175/JCLI-D-16-0026.1. \n", + "\n", + "**NOTE** \n", + "The installation instruction for the PMP can be found [here](http://pcmdi.github.io/pcmdi_metrics/install.html)." ] }, {