diff --git a/_toc.yml b/_toc.yml index 8d533566a..4ccad1a9d 100644 --- a/_toc.yml +++ b/_toc.yml @@ -180,6 +180,7 @@ chapters: sections: - file: notebooks/resources/ncar_hpc sections: + - file: notebooks/resources/ncar_hpc_module - file: notebooks/resources/profile - file: notebooks/resources/terminals - file: notebooks/resources/unix diff --git a/notebooks/diagnostics/additional/uxarray.ipynb b/notebooks/diagnostics/additional/uxarray.ipynb index 710f2c9b5..d98462609 100644 --- a/notebooks/diagnostics/additional/uxarray.ipynb +++ b/notebooks/diagnostics/additional/uxarray.ipynb @@ -5,7 +5,7 @@ "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", "metadata": {}, "source": [ - "# Large Ensembles" + "# uxarray" ] }, { @@ -69,7 +69,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.10.13" } }, "nbformat": 4, diff --git a/notebooks/resources/ncar_hpc.ipynb b/notebooks/resources/ncar_hpc.ipynb index 66c02b7bc..40c1b3f00 100644 --- a/notebooks/resources/ncar_hpc.ipynb +++ b/notebooks/resources/ncar_hpc.ipynb @@ -5,7 +5,7 @@ "id": "b631e7d7-f1d7-4253-b1b4-d01984037d37", "metadata": {}, "source": [ - "# NCAR Supercomputer¶\n", + "# NCAR Supercomputer\n", "\n", "Once you have an account and the necessary software, you can log in and run jobs on the NCAR supercomputer. The NCAR supercomputer is also referenced to the NCAR High Performance Computing (HPC). " ] @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "___\n", - "## Logging in on an NCAR system¶" + "## Logging in on an NCAR system" ] }, { @@ -179,165 +179,6 @@ " \n", "" ] - }, - { - "cell_type": "markdown", - "id": "144caca2-989b-40a5-b6c0-c8a0b7a470da", - "metadata": {}, - "source": [ - "___\n", - "## Modules on NCAR HPC" - ] - }, - { - "cell_type": "markdown", - "id": "52805170-9397-48b3-8bdf-a2c76fb45583", - "metadata": {}, - "source": [ - "NCAR maintains a number of different programs on the HPC systems that can be added to your user environment by executing the ``module load`` command. " - ] - }, - { - "cell_type": "markdown", - "id": "a551ace3-3b1a-4130-8084-3034842e0259", - "metadata": {}, - "source": [ - "We will use a few modules throughout this tutorial to visualize data, so you need to be able to check which modules you have loaded and to load necessary modules." - ] - }, - { - "cell_type": "markdown", - "id": "f6edec76-66ba-42f0-b3b2-00a4d90f15fd", - "metadata": {}, - "source": [ - "We provide basic instructions below on how to check and load Modules, but to learn more about Modules on NCAR HPC, please follow the link below." - ] - }, - { - "cell_type": "markdown", - "id": "b2aef333-82a9-4f3d-8afa-2f5c3df4ef4c", - "metadata": {}, - "source": [ - "
\n", - "\n", - "[CISL documentation on modules](https://arc.ucar.edu/knowledge_base/72581272)\n", - "\n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "33d4014c-bc0f-4ab0-aaf3-cf6cf7572f22", - "metadata": {}, - "source": [ - "### Checking what modules are loaded in your environment\n", - "\n", - "To check what modules you have loaded in your environment, use the following at the command line:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3fe867e0-f0df-4d87-a9d6-169294ec222c", - "metadata": {}, - "outputs": [], - "source": [ - "module list" - ] - }, - { - "cell_type": "markdown", - "id": "2a5ec941-4f4a-4a99-a3a0-6e514c448805", - "metadata": {}, - "source": [ - "### Checking what modules are available\n", - "\n", - "You can see which modules are available on the HPC resources by using the following at the command line:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b974222c-a270-4075-b9b9-7be7b4550942", - "metadata": {}, - "outputs": [], - "source": [ - "module avail" - ] - }, - { - "cell_type": "markdown", - "id": "0d2cfc8e-2085-4b72-b917-9e98a1586e13", - "metadata": {}, - "source": [ - "The command returns a list to the terminal window of the modules available to load to your environment." - ] - }, - { - "cell_type": "markdown", - "id": "ec74810f-c422-468d-b30e-ddb9c41d878f", - "metadata": {}, - "source": [ - "![Modules](../../images/prereqs/modules.png)\n", - "\n", - "*

Figure: Some modules available on NCAR HPC resources. D: Default Module. L: Module is loaded.

*" - ] - }, - { - "cell_type": "markdown", - "id": "c523021e-9328-4e0b-8c40-15bcf2ebab75", - "metadata": {}, - "source": [ - "The modules highlighted in blue are text editors discussed further in the [text editors section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/text_editors.html).\n", - "\n", - "The modules highlighted in red are netCDF tools that will be discussed further in the [netCDF section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/netcdf.html).\n", - "\n", - "Note that there are many other analysis software tools available to load into your NCAR HPC environment. These include: idl, julia, matlab, R, python, ncl, etc. While some of these tools are discussed in the [analysis tools section](https://ncar.github.io/CESM-Tutorial/notebooks/diagnostics/additional/analysis_tools.html), we do not highlight them all here and encourage you to further explore your environment and needs." - ] - }, - { - "cell_type": "markdown", - "id": "65848ac8-1cad-47bf-b680-8b129ce4e25d", - "metadata": {}, - "source": [ - "### Loading a new module to your environment\n", - "\n", - "You can load one of the available modules (here we show loading ncview) using the following at the command line: " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad9db6c8-91a9-4c3e-84b4-6e6fb65de213", - "metadata": {}, - "outputs": [], - "source": [ - "module load ncview" - ] - }, - { - "cell_type": "markdown", - "id": "a1e13c85-65d1-4904-a07b-6cba1249ddfd", - "metadata": {}, - "source": [ - "
\n", - "NOTE: We will provide a file that will load necessary modules for those attending the in person tutorial. \n", - "
" - ] - }, - { - "cell_type": "markdown", - "id": "3c9cc169-489e-427a-865a-539468cb060d", - "metadata": {}, - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7a1cb820-6efd-4eda-9581-a7067ff4f27d", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/notebooks/resources/ncar_hpc_login.ipynb b/notebooks/resources/ncar_hpc_login.ipynb new file mode 100644 index 000000000..66c02b7bc --- /dev/null +++ b/notebooks/resources/ncar_hpc_login.ipynb @@ -0,0 +1,358 @@ +{ + "cells": [ + { + "cell_type": "raw", + "id": "b631e7d7-f1d7-4253-b1b4-d01984037d37", + "metadata": {}, + "source": [ + "# NCAR Supercomputer¶\n", + "\n", + "Once you have an account and the necessary software, you can log in and run jobs on the NCAR supercomputer. The NCAR supercomputer is also referenced to the NCAR High Performance Computing (HPC). " + ] + }, + { + "cell_type": "markdown", + "id": "28823b60-6956-417c-a48c-3b88668b0968", + "metadata": {}, + "source": [ + "___\n", + "## Logging in on an NCAR system¶" + ] + }, + { + "cell_type": "markdown", + "id": "3b3e13f6-45e2-4dc8-bd2a-b550ddb11270", + "metadata": {}, + "source": [ + "To log in, start your terminal or Secure Shell client and run an `ssh` command as shown here:\n" + ] + }, + { + "cell_type": "markdown", + "id": "ddb0d0fb-1fd9-4814-bb20-af81d2baae5a", + "metadata": {}, + "source": [ + "```\n", + "ssh -XY username@derecho.hpc.ucar.edu \n", + "```\n", + "OR \n", + "```\n", + "ssh -XY username@casper.hpc.ucar.edu\n", + "```" + ] + }, + { + "cell_type": "markdown", + "id": "311d9679-8944-49c0-936e-8e8ddcc3ba37", + "metadata": {}, + "source": [ + "\n", + "When you log in to the NCAR HPC machines, we recommend you use `X11` forwarding. `X11` forwarding is an SSH protocol that enables users to run graphical applications on a remote server and interact with them using their local display and I/O devices. It is frequently used by CESM developers for securely interacting with NCAR HPC remote machines.\n", + "\n", + "You can do this by adding the `-XY` option when logging into the machines with `SSH`. More information about logging into the NCAR HPC follows below." + ] + }, + { + "cell_type": "markdown", + "id": "510846c7-4018-420e-a899-96e1b9e92902", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL Documentation on Using X11](https://arc.ucar.edu/knowledge_base/72581213#QuickstartonDerecho-LogginginonanNCARsystem)\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "e731c34f-4386-4869-bdb7-a6e479f07a63", + "metadata": {}, + "source": [ + "___\n", + "## Running on derecho" + ] + }, + { + "cell_type": "markdown", + "id": "202de099-dc2d-47d2-99fb-b6f1b87d654c", + "metadata": {}, + "source": [ + "This tutorial material is designed for use with the derecho HPC system. All of your CESM experiment builds and jobs will be run on derecho.\n", + "\n", + "Please see the link below for more information about the derecho system, including a quick start guide with information about logging into derecho from a terminal, setting up your environment, submitting jobs, etc. " + ] + }, + { + "cell_type": "markdown", + "id": "235c1c69-da82-4cff-95bf-02c1bb2db897", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL Documentation on Using derecho HPC](https://arc.ucar.edu/knowledge_base/74317833)\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "c7e2b935-85ea-47f1-b8f0-654d54714484", + "metadata": {}, + "source": [ + "#### Porting" + ] + }, + { + "cell_type": "markdown", + "id": "a47bc7ae-4bd8-4e55-87e8-27019a689099", + "metadata": {}, + "source": [ + "This tutorial assumes that you are using NCAR HPC assets. In order to run the CESM on a **_different_** computing platform, you will first need to port the CESM code to that environment/machine. We provide information about how to port the model code in the [porting section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/porting.html)." + ] + }, + { + "cell_type": "markdown", + "id": "8a831d36-6629-4cd6-a247-2a8293aa2561", + "metadata": {}, + "source": [ + "___\n", + "## Using Casper" + ] + }, + { + "cell_type": "markdown", + "id": "2f8ad62c-89c5-49c3-9751-219303bce4c7", + "metadata": {}, + "source": [ + "The Casper cluster is a system of specialized data analysis and visualization resources. Casper is not used for building or running CESM, but it is used for CESM data analysis. We will use Casper for the diagnostics section of the lab activities. To utilize the **_additional_** analysis tools described in the [analysis tools section](https://ncar.github.io/CESM-Tutorial/notebooks/diagnostics/additional/analysis_tools.html) you will also want to use Casper." + ] + }, + { + "cell_type": "markdown", + "id": "aee2a810-f356-4c55-a19a-c0a32dfd504b", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL Documentation on Using Casper Cluster](https://arc.ucar.edu/knowledge_base/70549550)\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "603c963b-4d65-4cd6-94a3-ea5ae932578e", + "metadata": {}, + "source": [ + "___\n", + "## Using JupyterHub" + ] + }, + { + "cell_type": "markdown", + "id": "a9423bae-be8c-4848-916c-926f86645da6", + "metadata": {}, + "source": [ + "The diagnostics section of this tutorial will use JupyterHub to run Jupyter Notebooks. You will need to login to the NCAR JupyterHub system to run the notebooks successfully.\n", + "\n", + "NOTE: To run a Jupyter cell\n", + "- Type your command into the cell\n", + "- To execute the command:\n", + " - Press **shift+return**\n", + "
\n", + " OR\n", + "
\n", + " - Select the cell then click the 'play' button at the top of the window\n", + "\n", + "To learn more about JupyterHub, please follow the link below." + ] + }, + { + "cell_type": "markdown", + "id": "6ae8710f-8dd2-4ed6-893f-d2de5b863b94", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL Documentation about JupyterHub](https://arc.ucar.edu/knowledge_base/70549913)\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "144caca2-989b-40a5-b6c0-c8a0b7a470da", + "metadata": {}, + "source": [ + "___\n", + "## Modules on NCAR HPC" + ] + }, + { + "cell_type": "markdown", + "id": "52805170-9397-48b3-8bdf-a2c76fb45583", + "metadata": {}, + "source": [ + "NCAR maintains a number of different programs on the HPC systems that can be added to your user environment by executing the ``module load`` command. " + ] + }, + { + "cell_type": "markdown", + "id": "a551ace3-3b1a-4130-8084-3034842e0259", + "metadata": {}, + "source": [ + "We will use a few modules throughout this tutorial to visualize data, so you need to be able to check which modules you have loaded and to load necessary modules." + ] + }, + { + "cell_type": "markdown", + "id": "f6edec76-66ba-42f0-b3b2-00a4d90f15fd", + "metadata": {}, + "source": [ + "We provide basic instructions below on how to check and load Modules, but to learn more about Modules on NCAR HPC, please follow the link below." + ] + }, + { + "cell_type": "markdown", + "id": "b2aef333-82a9-4f3d-8afa-2f5c3df4ef4c", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL documentation on modules](https://arc.ucar.edu/knowledge_base/72581272)\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "33d4014c-bc0f-4ab0-aaf3-cf6cf7572f22", + "metadata": {}, + "source": [ + "### Checking what modules are loaded in your environment\n", + "\n", + "To check what modules you have loaded in your environment, use the following at the command line:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3fe867e0-f0df-4d87-a9d6-169294ec222c", + "metadata": {}, + "outputs": [], + "source": [ + "module list" + ] + }, + { + "cell_type": "markdown", + "id": "2a5ec941-4f4a-4a99-a3a0-6e514c448805", + "metadata": {}, + "source": [ + "### Checking what modules are available\n", + "\n", + "You can see which modules are available on the HPC resources by using the following at the command line:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b974222c-a270-4075-b9b9-7be7b4550942", + "metadata": {}, + "outputs": [], + "source": [ + "module avail" + ] + }, + { + "cell_type": "markdown", + "id": "0d2cfc8e-2085-4b72-b917-9e98a1586e13", + "metadata": {}, + "source": [ + "The command returns a list to the terminal window of the modules available to load to your environment." + ] + }, + { + "cell_type": "markdown", + "id": "ec74810f-c422-468d-b30e-ddb9c41d878f", + "metadata": {}, + "source": [ + "![Modules](../../images/prereqs/modules.png)\n", + "\n", + "*

Figure: Some modules available on NCAR HPC resources. D: Default Module. L: Module is loaded.

*" + ] + }, + { + "cell_type": "markdown", + "id": "c523021e-9328-4e0b-8c40-15bcf2ebab75", + "metadata": {}, + "source": [ + "The modules highlighted in blue are text editors discussed further in the [text editors section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/text_editors.html).\n", + "\n", + "The modules highlighted in red are netCDF tools that will be discussed further in the [netCDF section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/netcdf.html).\n", + "\n", + "Note that there are many other analysis software tools available to load into your NCAR HPC environment. These include: idl, julia, matlab, R, python, ncl, etc. While some of these tools are discussed in the [analysis tools section](https://ncar.github.io/CESM-Tutorial/notebooks/diagnostics/additional/analysis_tools.html), we do not highlight them all here and encourage you to further explore your environment and needs." + ] + }, + { + "cell_type": "markdown", + "id": "65848ac8-1cad-47bf-b680-8b129ce4e25d", + "metadata": {}, + "source": [ + "### Loading a new module to your environment\n", + "\n", + "You can load one of the available modules (here we show loading ncview) using the following at the command line: " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad9db6c8-91a9-4c3e-84b4-6e6fb65de213", + "metadata": {}, + "outputs": [], + "source": [ + "module load ncview" + ] + }, + { + "cell_type": "markdown", + "id": "a1e13c85-65d1-4904-a07b-6cba1249ddfd", + "metadata": {}, + "source": [ + "
\n", + "NOTE: We will provide a file that will load necessary modules for those attending the in person tutorial. \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "3c9cc169-489e-427a-865a-539468cb060d", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a1cb820-6efd-4eda-9581-a7067ff4f27d", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Bash", + "language": "bash", + "name": "bash" + }, + "language_info": { + "codemirror_mode": "shell", + "file_extension": ".sh", + "mimetype": "text/x-sh", + "name": "bash" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/resources/ncar_hpc_module.ipynb b/notebooks/resources/ncar_hpc_module.ipynb new file mode 100644 index 000000000..c32bb48f4 --- /dev/null +++ b/notebooks/resources/ncar_hpc_module.ipynb @@ -0,0 +1,197 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "235c1c69-da82-4cff-95bf-02c1bb2db897", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL Documentation on Using derecho HPC](https://arc.ucar.edu/knowledge_base/74317833)\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "c7e2b935-85ea-47f1-b8f0-654d54714484", + "metadata": {}, + "source": [ + "#### Porting" + ] + }, + { + "cell_type": "markdown", + "id": "144caca2-989b-40a5-b6c0-c8a0b7a470da", + "metadata": {}, + "source": [ + "# Modules on NCAR HPC" + ] + }, + { + "cell_type": "markdown", + "id": "52805170-9397-48b3-8bdf-a2c76fb45583", + "metadata": {}, + "source": [ + "NCAR maintains a number of different programs on the HPC systems that can be added to your user environment by executing the ``module load`` command. " + ] + }, + { + "cell_type": "markdown", + "id": "a551ace3-3b1a-4130-8084-3034842e0259", + "metadata": {}, + "source": [ + "We will use a few modules throughout this tutorial to visualize data, so you need to be able to check which modules you have loaded and to load necessary modules." + ] + }, + { + "cell_type": "markdown", + "id": "f6edec76-66ba-42f0-b3b2-00a4d90f15fd", + "metadata": {}, + "source": [ + "We provide basic instructions below on how to check and load Modules, but to learn more about Modules on NCAR HPC, please follow the link below." + ] + }, + { + "cell_type": "markdown", + "id": "b2aef333-82a9-4f3d-8afa-2f5c3df4ef4c", + "metadata": {}, + "source": [ + "
\n", + "\n", + "[CISL documentation on modules](https://arc.ucar.edu/knowledge_base/72581272)\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "33d4014c-bc0f-4ab0-aaf3-cf6cf7572f22", + "metadata": {}, + "source": [ + "### Checking what modules are loaded in your environment\n", + "\n", + "To check what modules you have loaded in your environment, use the following at the command line:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3fe867e0-f0df-4d87-a9d6-169294ec222c", + "metadata": {}, + "outputs": [], + "source": [ + "module list" + ] + }, + { + "cell_type": "markdown", + "id": "2a5ec941-4f4a-4a99-a3a0-6e514c448805", + "metadata": {}, + "source": [ + "### Checking what modules are available\n", + "\n", + "You can see which modules are available on the HPC resources by using the following at the command line:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b974222c-a270-4075-b9b9-7be7b4550942", + "metadata": {}, + "outputs": [], + "source": [ + "module avail" + ] + }, + { + "cell_type": "markdown", + "id": "0d2cfc8e-2085-4b72-b917-9e98a1586e13", + "metadata": {}, + "source": [ + "The command returns a list to the terminal window of the modules available to load to your environment." + ] + }, + { + "cell_type": "markdown", + "id": "ec74810f-c422-468d-b30e-ddb9c41d878f", + "metadata": {}, + "source": [ + "![Modules](../../images/prereqs/modules.png)\n", + "\n", + "*

Figure: Some modules available on NCAR HPC resources. D: Default Module. L: Module is loaded.

*" + ] + }, + { + "cell_type": "markdown", + "id": "c523021e-9328-4e0b-8c40-15bcf2ebab75", + "metadata": {}, + "source": [ + "The modules highlighted in blue are text editors discussed further in the [text editors section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/text_editors.html).\n", + "\n", + "The modules highlighted in red are netCDF tools that will be discussed further in the [netCDF section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/netcdf.html).\n", + "\n", + "Note that there are many other analysis software tools available to load into your NCAR HPC environment. These include: idl, julia, matlab, R, python, ncl, etc. While some of these tools are discussed in the [analysis tools section](https://ncar.github.io/CESM-Tutorial/notebooks/diagnostics/additional/analysis_tools.html), we do not highlight them all here and encourage you to further explore your environment and needs." + ] + }, + { + "cell_type": "markdown", + "id": "65848ac8-1cad-47bf-b680-8b129ce4e25d", + "metadata": {}, + "source": [ + "### Loading a new module to your environment\n", + "\n", + "You can load one of the available modules (here we show loading ncview) using the following at the command line: " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad9db6c8-91a9-4c3e-84b4-6e6fb65de213", + "metadata": {}, + "outputs": [], + "source": [ + "module load ncview" + ] + }, + { + "cell_type": "markdown", + "id": "a1e13c85-65d1-4904-a07b-6cba1249ddfd", + "metadata": {}, + "source": [ + "
\n", + "NOTE: We will provide a file that will load necessary modules for those attending the in person tutorial. \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "3c9cc169-489e-427a-865a-539468cb060d", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a1cb820-6efd-4eda-9581-a7067ff4f27d", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Bash", + "language": "bash", + "name": "bash" + }, + "language_info": { + "codemirror_mode": "shell", + "file_extension": ".sh", + "mimetype": "text/x-sh", + "name": "bash" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/resources/tutorial_specific.ipynb b/notebooks/resources/tutorial_specific.ipynb new file mode 100644 index 000000000..6dee27f09 --- /dev/null +++ b/notebooks/resources/tutorial_specific.ipynb @@ -0,0 +1,413 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "b2cd974a-dfbb-4937-8ed0-ab87ab60f1ef", + "metadata": {}, + "source": [ + "# Tutorial specific instructions" + ] + }, + { + "cell_type": "markdown", + "id": "4a6f76fe-9658-443c-89a7-9ede364803e5", + "metadata": {}, + "source": [ + "### Tutorial Project Account\n", + "\n", + "
\n", + "You should have access to project account UESM00?? and use this for your simulations.\n", + "
\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "9db9d54e-ef78-44ef-a003-4ddd8a416317", + "metadata": {}, + "source": [ + "### Special Queues\n", + "\n", + "
\n", + "We have a special queue every day for running to ensure you get through the derecho queues quickly and get your jobs run. These are only active for portions of each day during our lab sessions and change for each session. So you should be sure you are using the correct reservation queue. \n", + " \n", + "Schedule for Tutorial Reservation Queues\n", + "```\n", + "Mon 14:00 - 17:00 derecho R???????\n", + "Tue 10:30 - 12:00 derecho R???????\n", + " 14:00 - 17:00 derecho R???????\n", + "Wed 10:30 - 12:00 derecho R???????\n", + " 14:00 - 17:00 derecho R???????\n", + "Thu 13:30 - 17:00 casper R???????\n", + "Fri 13:30 - 17:00 derecho R??????? \n", + "```\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "e127deda-73f0-42fc-9c96-e49bb1bb0f8b", + "metadata": {}, + "source": [ + "### Using these tutorial-specific codes" + ] + }, + { + "cell_type": "markdown", + "id": "ec3ec832-823f-48ce-b142-05c69dcc72b1", + "metadata": {}, + "source": [ + "In theory, you _should_ be able to automatically use this account and the reservation queues if you correctly set up your NCAR HPC environment using your `.profile` or `.tcshrc` files, as described below. If you need to change the values for a run, you can change the account and reservation queue in your case directory using the following command:\n", + "\n", + "```\n", + "./xmlchange --force JOB_QUEUE=R???????\n", + "./xmlchange PROJECT=UESM00??\n", + "```\n", + "\n", + "For instance, on Wednesday\n", + "\n", + "- If (Wed 10:30 - 12:00) then\n", + "\n", + "```\n", + "./xmlchange JOB_QUEUE=R??????? --force\n", + "``` \n", + "\n", + "- If (Wed 14:00 - 17:00) then\n", + "\n", + "```\n", + "./xmlchange JOB_QUEUE=R??????? --force\n", + "```\n", + "\n", + "\n", + "- If (Wed at another time) then\n", + "```\n", + "./xmlchange JOB_QUEUE=regular\n", + "```\n", + "\n", + "If you do use these commands, make sure for the `JOB_QUEUE` you are using the **correct** reservation code for the relevant day _and_ time of that lab session. You should not have to set the `PROJECT` more than once during the tutorial if your profile is set up, as described below, but we include it for your reference in case you are having trouble." + ] + }, + { + "cell_type": "markdown", + "id": "0c07b51d-f999-4737-9739-3ea989f20802", + "metadata": {}, + "source": [ + "## Setting up your NCAR HPC environment" + ] + }, + { + "cell_type": "markdown", + "id": "9d6954eb-3505-4a58-b6fa-bea7047c63cf", + "metadata": {}, + "source": [ + "Every time you log onto the NCAR HPC you want to ensure you have the correct modules loaded." + ] + }, + { + "cell_type": "markdown", + "id": "7440f1b8-06af-435a-b1db-d444b99bf846", + "metadata": {}, + "source": [ + "
\n", + "NOTE: The next section describes how to use a file that loads the modules necessary for those attending the in-person tutorial. Once you set up your environment you should not have to do it again for the remainder of the tutorial. Every time you login to NCAR HPC these files will automatically be sourced. However, if you intend to use NCAR HPC after the tutorial you may need to modify your `.profile` or `.tcshrc` file to load the correct modules, project numbers, or queues. \n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "8e6da3c0-4cbf-42e3-b599-9ef4d1b4a72c", + "metadata": {}, + "source": [ + "___\n", + "\n", + "### SHELL environment " + ] + }, + { + "cell_type": "markdown", + "id": "c04124a8-5e76-4104-8d62-7bd0a329ce58", + "metadata": {}, + "source": [ + "To determine what shell environment you are using on the NCAR HPC, type the following command:" + ] + }, + { + "cell_type": "markdown", + "id": "9f8488f1-72e7-4594-be66-f875c51cc4e1", + "metadata": {}, + "source": [ + "
\n", + "\n", + "```\n", + "echo $SHELL\n", + "```\n", + "\n", + " \n", + "If the command returns, you are a bash user\n", + "```/bin/bash```\n", + "\n", + " \n", + "If the command returns, you are a cshell user\n", + "```/bin/tcsh```\n", + "\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "91a8addf-1e89-43b9-a364-1e1aa151454d", + "metadata": {}, + "source": [ + "**NOTE:** All new NCAR HPC accounts default to bash. " + ] + }, + { + "cell_type": "markdown", + "id": "8c4f6e24-577b-4736-a251-69b51553d704", + "metadata": {}, + "source": [ + "___\n", + "\n", + "### Bash users" + ] + }, + { + "cell_type": "markdown", + "id": "a82c1d5f-eddc-4504-bd66-febd2f3179f8", + "metadata": {}, + "source": [ + "**NOTE:** You may already have a `.profile` file in your home directory. \n", + "- If you have an existing `.profile` file and do not wish to overwrite its contents, please save your original `.profile` file to a new filename before copying the tutorial .profile file into your home directory. \n", + "- Alternatively, you could copy the contents of the tutorial profile file into your existing `.profile` file using a text editor. (see special instructions below)" + ] + }, + { + "cell_type": "markdown", + "id": "870dc6c7-98f5-4e3a-b226-2f2437d5321a", + "metadata": {}, + "source": [ + "#### One-time setup\n", + "To set up your environment for the tutorial, follow the following three steps:" + ] + }, + { + "cell_type": "markdown", + "id": "9a2baee0-804e-4586-b8fc-a3636c528484", + "metadata": {}, + "source": [ + "
\n", + "\n", + "Copy over the `.profile` file into your home directory: \n", + " \n", + "```\n", + "cp /glade/campaign/cesm/development/cross-wg/profile ~/.profile\n", + "```\n", + "
\n", + "\n", + "Source the file:\n", + "\n", + "```\n", + "source ~/.profile\n", + "```\n", + " \n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "bf95578e-40e5-4c40-8884-0b80e29eb858", + "metadata": {}, + "source": [ + "\n", + "#### Before each practical\n", + "Do the following step before **every practical**. This is because we are getting a different special queue every day. \n", + "\n", + "
\n", + "\n", + "Source the file:
\n", + "\n", + "```\n", + "source ~/.profile\n", + "```\n", + " \n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "4daab2a7-58c1-41f0-b51b-c9e8a573574b", + "metadata": {}, + "source": [ + "___\n", + "\n", + "### Tcsh users" + ] + }, + { + "cell_type": "markdown", + "id": "42432d90-eaef-4205-b4fe-39cf3c7b5881", + "metadata": {}, + "source": [ + "**NOTE:** You should already have a `.tcshrc` file in your home directory. If you do not wish to overwrite the existing `.tcshrc` file, please save this file to a new name OR copy the contents of the `/glade/campaign/cesm/development/cross-wg/tcshrc` file to your `.tcshrc` file using a text editor." + ] + }, + { + "cell_type": "markdown", + "id": "0722df3e-2497-492c-8301-7d54e7485c05", + "metadata": {}, + "source": [ + "#### One-time setup\n", + "\n", + "To set up your environment for the tutorial, follow the following three steps:" + ] + }, + { + "cell_type": "markdown", + "id": "a77636dd-1651-431a-a72e-f862947b37a6", + "metadata": {}, + "source": [ + "
\n", + "\n", + "
\n", + "\n", + "Copy over the `.tcshrc` file to your home directory:\n", + "```\n", + "cp /glade/campaign/cesm/development/cross-wg/tcshrc ~/.tcshrc\n", + "```\n", + " \n", + "
\n", + "\n", + "Source the file:\n", + "\n", + "```\n", + "source ~/.tcshrc\n", + "```\n", + " \n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "637d5219-104b-4e53-ab41-b3969b275527", + "metadata": {}, + "source": [ + "\n", + "#### Before each practical\n", + "\n", + "Do the following step before **every practical**. This is because we are getting a different special queue every day. \n", + "\n", + "
\n", + " \n", + "Source the file:
\n", + "\n", + "```\n", + "source ~/.tcshrc\n", + "``` \n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "5edccc8b-0080-4837-aa70-d50360cb2c6c", + "metadata": {}, + "source": [ + "___\n", + "\n", + "### If you have any trouble\n", + "\n", + "**Please ask for help if you are having trouble with this step!**\n", + "\n", + "The modules necessary for this tutorial and loaded through these files are:\n", + "- ncarenv/1.3\n", + "- intel\n", + "- ncl\n", + "- nco\n", + "- ncview\n", + "- netcdf\n" + ] + }, + { + "cell_type": "markdown", + "id": "71cae660-0d1a-4193-8333-909310c49dac", + "metadata": {}, + "source": [ + "____\n", + "\n", + "### Special instructions (if you already had an account on derecho)\n", + "\n", + "If you already have a `.profile` or `.tcsh` and you do not wish to overwrite its contents, you need to add the following into your existing `.profile` or `.tcsh` using a text editor.\n", + "\n", + "#### Bash:\n", + "\n", + "
\n", + "\n", + "Add to your .profile: \n", + "\n", + "```\n", + "export PROJECT=UESM00?? #<- This should never change over the course of the tutorial\n", + "export TUTORIAL_QUEUE=R??????? #<- This will be different for every practical. \n", + " #<- Look at the schedule below:\n", + "```\n", + "\n", + "Source the file:
\n", + "\n", + "```\n", + "source ~/.profile\n", + "```\n", + "
\n", + "\n", + "#### C-shell:\n", + "\n", + "
\n", + "\n", + "Add to your .tcshrc: \n", + "```\n", + "setenv PROJECT UESM00?? #<-This should never change over the course of the tutorial\n", + "setenv TUTORIAL_QUEUE R??????? #<-This will be different for every practical \n", + " #<- Look at the schedule below:\n", + "```\n", + " \n", + "Source the file:
\n", + "\n", + "```\n", + "source ~/.tcshrc\n", + "``` \n", + "\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5b77ea28-df80-4c20-a123-ec1e09a1475a", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.10.13" + }, + "toc-showcode": false + }, + "nbformat": 4, + "nbformat_minor": 5 +}