Skip to content

Commit

Permalink
Merge pull request #228 from cecilehannay/main
Browse files Browse the repository at this point in the history
Some cleanup of Chapter on Basics
  • Loading branch information
cecilehannay authored Jul 22, 2024
2 parents 1245527 + 32dd1eb commit 77951e7
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 58 deletions.
32 changes: 16 additions & 16 deletions notebooks/basics/cesm_workflow/case_build.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@
"<br>\n",
" \n",
"```\n",
"Building case in directory /glade/work/$USER/cases/b.day1.0\n",
"Building case in directory /glade/work/$USER/cases/b1850.basics\n",
"sharedlib_only is False\n",
"model_only is False\n",
"Generating component namelists as part of build\n",
"- Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b.day1.0/run\n",
"- Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b1850.basics/run\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ocn.restart\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ice\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.lnd\n",
Expand All @@ -121,7 +121,7 @@
"Creating component namelists\n",
"Calling /glade/u/home/$USER/my_cesm_code/components/cam//cime_config/buildnml\n",
"...calling cam buildcpp to set build time options\n",
"CAM namelist copy: file1 /glade/work/$USER/cases/b.day1.0/Buildconf/camconf/atm_in file2 /glade/derecho/scratch/$USER/b.day1.0/run/atm_in\n",
"CAM namelist copy: file1 /glade/work/$USER/cases/b1850.basics/Buildconf/camconf/atm_in file2 /glade/derecho/scratch/$USER/b1850.basics/run/atm_in\n",
"Calling /glade/u/home/$USER/my_cesm_code/components/clm//cime_config/buildnml\n",
"Calling /glade/u/home/$USER/my_cesm_code/components/cice//cime_config/buildnml\n",
"...buildnml calling cice buildcpp to set build time options\n",
Expand All @@ -146,30 +146,30 @@
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/components/stub_comps/sesp/cime_config/buildnml\n",
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/drivers/mct/cime_config/buildnml\n",
"Finished creating component namelists\n",
"Building gptl with output to file /glade/derecho/scratch/$USER/b.day1.0/bld/gptl.bldlog.240606-134217\n",
"Building gptl with output to file /glade/derecho/scratch/$USER/b1850.basics/bld/gptl.bldlog.240606-134217\n",
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/build_scripts/buildlib.gptl\n",
"Component gptl build complete with 2 warnings\n",
"Building mct with output to file /glade/derecho/scratch/$USER/b.day1.0/bld/mct.bldlog.240606-134217\n",
"Building mct with output to file /glade/derecho/scratch/$USER/b1850.basics/bld/mct.bldlog.240606-134217\n",
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/build_scripts/buildlib.mct\n",
"Component mct build complete with 55 warnings\n",
"Building pio with output to file /glade/derecho/scratch/$USER/b.day1.0/bld/pio.bldlog.240606-134217\n",
"Building pio with output to file /glade/derecho/scratch/$USER/b1850.basics/bld/pio.bldlog.240606-134217\n",
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/build_scripts/buildlib.pio\n",
"Component pio build complete with 28 warnings\n",
"Building csm_share with output to file /glade/derecho/scratch/$USER/b.day1.0/bld/csm_share.bldlog.240606-134217\n",
"Building csm_share with output to file /glade/derecho/scratch/$USER/b1850.basics/bld/csm_share.bldlog.240606-134217\n",
"Calling /glade/u/home/$USER/my_cesm_code/cime/src/build_scripts/buildlib.csm_share\n",
"Component csm_share build complete with 85 warnings\n",
"- Building clm4_5/clm5_0 Library\n",
"Building lnd with output to /glade/derecho/scratch/$USER/b.day1.0/bld/lnd.bldlog.240606-134217\n",
"Building lnd with output to /glade/derecho/scratch/$USER/b1850.basics/bld/lnd.bldlog.240606-134217\n",
"\n",
"Component lnd build complete with 292 warnings\n",
"clm built in 109.479993 seconds\n",
"Building atm with output to /glade/derecho/scratch/$USER/b.day1.0/bld/atm.bldlog.240606-134217\n",
"Building ice with output to /glade/derecho/scratch/$USER/b.day1.0/bld/ice.bldlog.240606-134217\n",
"Building ocn with output to /glade/derecho/scratch/$USER/b.day1.0/bld/ocn.bldlog.240606-134217\n",
"Building rof with output to /glade/derecho/scratch/$USER/b.day1.0/bld/rof.bldlog.240606-134217\n",
"Building glc with output to /glade/derecho/scratch/$USER/b.day1.0/bld/glc.bldlog.240606-134217\n",
"Building wav with output to /glade/derecho/scratch/$USER/b.day1.0/bld/wav.bldlog.240606-134217\n",
"Building esp with output to /glade/derecho/scratch/$USER/b.day1.0/bld/esp.bldlog.240606-134217\n",
"Building atm with output to /glade/derecho/scratch/$USER/b1850.basics/bld/atm.bldlog.240606-134217\n",
"Building ice with output to /glade/derecho/scratch/$USER/b1850.basics/bld/ice.bldlog.240606-134217\n",
"Building ocn with output to /glade/derecho/scratch/$USER/b1850.basics/bld/ocn.bldlog.240606-134217\n",
"Building rof with output to /glade/derecho/scratch/$USER/b1850.basics/bld/rof.bldlog.240606-134217\n",
"Building glc with output to /glade/derecho/scratch/$USER/b1850.basics/bld/glc.bldlog.240606-134217\n",
"Building wav with output to /glade/derecho/scratch/$USER/b1850.basics/bld/wav.bldlog.240606-134217\n",
"Building esp with output to /glade/derecho/scratch/$USER/b1850.basics/bld/esp.bldlog.240606-134217\n",
"Component esp build complete with 1 warnings\n",
"sesp built in 4.413109 seconds\n",
"Component wav build complete with 35 warnings\n",
Expand All @@ -184,7 +184,7 @@
"cam built in 105.142718 seconds\n",
"Component glc build complete with 150 warnings\n",
"cism built in 133.173952 seconds\n",
"Building cesm with output to /glade/derecho/scratch/$USER/b.day1.0/bld/cesm.bldlog.240606-134217\n",
"Building cesm with output to /glade/derecho/scratch/$USER/b1850.basics/bld/cesm.bldlog.240606-134217\n",
"Component cesm exe build complete with 27 warnings\n",
"Time spent not building: 130.716460 sec\n",
"Time spent building: 389.249592 sec\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/basics/cesm_workflow/case_setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"<br>\n",
" \n",
"```\n",
"/glade/work/$USER/cases/b.day1.0/env_mach_specific.xml already exists, delete to replace\n",
"/glade/work/$USER/cases/b1850.basics/env_mach_specific.xml already exists, delete to replace\n",
"job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S\n",
"Creating batch scripts\n",
"Writing case.run script from input template /glade/work/$USERrun\n",
Expand Down
8 changes: 4 additions & 4 deletions notebooks/basics/cesm_workflow/case_submit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"<br>\n",
" \n",
"```\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b.day1.0/run\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b1850.basics/run\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ocn.restart\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ice\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.lnd\n",
Expand All @@ -107,7 +107,7 @@
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.drv\n",
"Creating component namelists\n",
" Calling /glade/u/home/$USER/my_cesm_code/components/cam//cime_config/buildnml\n",
"CAM namelist copy: file1 /glade/work/$USER/cases/b.day1.0/Buildconf/camconf/atm_in file2 /glade/derecho/scratch/$USER/b.day1.0/run/atm_in \n",
"CAM namelist copy: file1 /glade/work/$USER/cases/b1850.basics/Buildconf/camconf/atm_in file2 /glade/derecho/scratch/$USER/b1850.basics/run/atm_in \n",
" Calling /glade/u/home/$USER/my_cesm_code/components/clm//cime_config/buildnml\n",
" Calling /glade/u/home/$USER/my_cesm_code/components/cice//cime_config/buildnml\n",
" Calling /glade/u/home/$USER/my_cesm_code/components/pop//cime_config/buildnml\n",
Expand Down Expand Up @@ -139,7 +139,7 @@
"Loading input file list: 'Buildconf/cism.input_data_list'\n",
"Loading input file list: 'Buildconf/mosart.input_data_list'\n",
"Loading input file list: 'Buildconf/cam.input_data_list'\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b.day1.0/run\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b1850.basics/run\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ocn.restart\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ice\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.lnd\n",
Expand All @@ -149,7 +149,7 @@
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.glc\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ocn.ovf\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.drv\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b.day1.0/run\n",
" - Prestaging REFCASE (/glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01) to /glade/derecho/scratch/$USER/b1850.basics/run\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ocn.restart\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.ice\n",
"Copy rpointer /glade/campaign/cesm/cesmdata/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/rpointer.lnd\n",
Expand Down
10 changes: 9 additions & 1 deletion notebooks/basics/cesm_workflow/create_clone.ipynb
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "d6d5e586-3e55-40e2-89ac-43cf2a986a92",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3",
"metadata": {},
"source": [
"# Create Clone"
"# Create Clone (Advanced)"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion notebooks/basics/cesm_workflow/create_newcase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"id": "557d4028-7176-4e2a-8a90-7febf2de37ef",
"metadata": {},
"source": [
"___\n",
"## Command Syntax"
]
},
Expand Down Expand Up @@ -130,7 +131,7 @@
"Batch_system_type is pbs\n",
"job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S\n",
"job is case.st_archive USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S\n",
" Creating Case directory /glade/work/$USER/cases/b.day1.0\n",
" Creating Case directory /glade/work/$USER/cases/b1850.basics\n",
"\n",
"```\n",
"\n",
Expand All @@ -153,6 +154,7 @@
"id": "d7064891-5a5a-41f2-9b3b-d4acb231a2ee",
"metadata": {},
"source": [
"___\n",
"## Command Arguments"
]
},
Expand Down
12 changes: 6 additions & 6 deletions notebooks/basics/code/git_download_cesm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "88f98dea-ada2-4186-bdf6-97c383755fdc",
"cell_type": "markdown",
"id": "40257a4e-aa6d-4f12-b825-b9986cdf4daf",
"metadata": {},
"outputs": [],
"source": [
"## Step 1: Create CESM Code Directory"
]
Expand Down Expand Up @@ -315,13 +313,15 @@
"/glade/work/$USER/code/my_cesm_code\n",
"```\n",
"\n",
"To navigate to that directory, use the command:\n",
"To navigate to that directory, use the UNIX command `cd`:\n",
"```\n",
"cd /glade/work/$USER/code/my_cesm_code\n",
"```\n",
"\n",
"If you are not familiar with UNIX commands, please review the [UNIX chapter](https://ncar.github.io/CESM-Tutorial/notebooks/resources/unix.html) of this documentation. \n",
"</details>\n",
"</div>"
"</div>\n",
"\n"
]
},
{
Expand Down
28 changes: 14 additions & 14 deletions notebooks/basics/exercises/examine_history_B1850.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"source": [
"Having successfully completed your first month of the new CESM B1850 case you will now examine the history files that have been transfered to the Archive directory. You will be using the NetCDF viewer ncview to look at the monthly average values for the single month. For this exercise you will be looking at the output from the Community Atmospheric Model (CAM) component of CESM, however the ncview tool can be applied to other components such as the Community Land Model (CLM). In this exercise we will:\n",
"\n",
"- Step 1. Explore the b.day1.0 Archive directory.\n",
"- Step 2. Open the b.day1.0 cam h0 in ncview.\n",
"- Step 1. Explore the b1850.basics Archive directory.\n",
"- Step 2. Open the b1850.basics cam h0 in ncview.\n",
"- Step 3. Examine Average Monthly Surface Temperature.\n",
"- Step 4. Examine Average Monthly Precipitation."
]
Expand All @@ -26,7 +26,7 @@
"id": "736b22e8-4b55-4c33-bff9-1ab1a026931c",
"metadata": {},
"source": [
"## Step 1. Explore the b.day1.0 Archive directory"
"## Step 1. Explore the b1850.basics Archive directory"
]
},
{
Expand All @@ -43,10 +43,10 @@
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
"<strong>Change into the b.day1.0 short term archive directory: </strong><br><br>\n",
"<strong>Change into the b1850.basics short term archive directory: </strong><br><br>\n",
"\n",
"```\n",
"cd /glade/derecho/scratch/$USER/archive/b.day1.0\n",
"cd /glade/derecho/scratch/$USER/archive/b1850.basics\n",
"```\n",
"<br>\n",
"\n",
Expand Down Expand Up @@ -84,7 +84,7 @@
"id": "b7a357a4-fec5-44df-8a2d-db27dd57d9fe",
"metadata": {},
"source": [
"You will now use `ncview` to look at the b.day1.0 case CAM monthly average values for the single month you ran.\n",
"You will now use `ncview` to look at the b1850.basics case CAM monthly average values for the single month you ran.\n",
"\n",
"If you are unfamiliar with `ncview` you can learn more at [this link](https://ncar.github.io/CESM-Tutorial/notebooks/resources/netcdf.html#ncview). \n",
"\n",
Expand Down Expand Up @@ -121,11 +121,11 @@
"```\n",
"<br>\n",
" \n",
"There should be a single file, b.day1.0.cam.h0.0001-01.nc.<br>\n",
"There should be a single file, b1850.basics.cam.h0.0001-01.nc.<br>\n",
"\n",
"<strong>Open the file using `ncview`: </strong><br>\n",
"```\n",
"ncview b.day1.0.cam.h0.0001-01.nc &\n",
"ncview b1850.basics.cam.h0.0001-01.nc &\n",
"```\n",
"<br>"
]
Expand Down Expand Up @@ -156,12 +156,12 @@
"id": "0b5d30af-109a-40a8-a49f-01ac21734dfb",
"metadata": {},
"source": [
"Using ncview with the b.day1.0 January 0001 CAM monthly average values file loaded, examine the Surface Temperature variable. Update the color palette used to plot values and change the size of the plot.\n",
"Using ncview with the b1850.basics January 0001 CAM monthly average values file loaded, examine the Surface Temperature variable. Update the color palette used to plot values and change the size of the plot.\n",
"\n",
"<div class=\"alert alert-info\">\n",
"<strong>Select the Surface Temperature Variable: </strong><br><br>\n",
"\n",
"Click on the **(244) 2d vars** button shown above. This will pull up a list of all 2d vars on the b.day1.0 January 0001 CAM history file. This is a long list but it is in alphabetical order. You are looking for the `TS` variable. \n",
"Click on the **(244) 2d vars** button shown above. This will pull up a list of all 2d vars on the b1850.basics January 0001 CAM history file. This is a long list but it is in alphabetical order. You are looking for the `TS` variable. \n",
"<br>\n",
"\n",
"<strong>Change the color selection from detail to bright: </strong><br>\n",
Expand All @@ -177,7 +177,7 @@
"</div>\n",
"\n",
"![NCView TS](../../../images/basics/NCVIEW_Jan0001_TS.png)\n",
"*<p style=\"text-align: center;\"> Figure: NCView b.day1.0 TS Jan 0001 </p>*\n",
"*<p style=\"text-align: center;\"> Figure: NCView b1850.basics TS Jan 0001 </p>*\n",
"\n",
"The Surface Temperature variable is in Kelvin. A value of 273.15K represents 0°C and 32°F. There are many options to better view and explore data with ncview. Some of these will come up over the next few days of the tutorial."
]
Expand All @@ -195,7 +195,7 @@
"id": "25c204c4-d1f2-4af8-93c1-d9296b5cba9c",
"metadata": {},
"source": [
"Using ncview with the b.day1.0 January 0001 CAM monthly average values file loaded, examine the the two variables representing Convective Precipitation and Large Scale Precipitation.\n",
"Using ncview with the b1850.basics January 0001 CAM monthly average values file loaded, examine the the two variables representing Convective Precipitation and Large Scale Precipitation.\n",
"\n",
"<div class=\"alert alert-info\">\n",
"<strong>Exercise: Select the Convective Precipitation Variable: </strong><br><br>\n",
Expand All @@ -206,7 +206,7 @@
"</div>\n",
"\n",
"![NCView PRECC](../../../images/basics/NCVIEW_Jan0001_PRECC.png)\n",
"*<p style=\"text-align: center;\"> Figure: NCView b.day1.0 PRECC Jan 0001 </p>*\n",
"*<p style=\"text-align: center;\"> Figure: NCView b1850.basics PRECC Jan 0001 </p>*\n",
"\n",
"<div class=\"alert alert-info\">\n",
"<strong>Exercise: Select the Convective Precipitation Variable: </strong><br><br>\n",
Expand All @@ -219,7 +219,7 @@
"</div>\n",
"\n",
"![NCView PRECL](../../../images/basics/NCVIEW_Jan0001_PRECL.png)\n",
"*<p style=\"text-align: center;\"> Figure: NCView b.day1.0 PRECL Jan 0001 </p>*\n",
"*<p style=\"text-align: center;\"> Figure: NCView b1850.basics PRECL Jan 0001 </p>*\n",
"\n",
"Precipitation in the model is recorded in m/s. To convert to mm/day we can multiply the values by 1000 mm in a meter and 86,400 seconds in a day. Can you see the differences in Convective and Large Scale Precipitation?"
]
Expand Down
2 changes: 1 addition & 1 deletion notebooks/basics/exercises/extra.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"<div class=\"alert alert-info\">\n",
" \n",
"```\n",
"cd /glade/work/$USER/cases/b.day1.0/\n",
"cd /glade/work/$USER/cases/b1850.basics/\n",
"```\n",
"</div>"
]
Expand Down
Loading

0 comments on commit 77951e7

Please sign in to comment.