Skip to content

Commit

Permalink
Merge pull request #246 from cecilehannay/main
Browse files Browse the repository at this point in the history
various fix
  • Loading branch information
cecilehannay authored Aug 2, 2024
2 parents 338d4c4 + b2500ec commit cbabd14
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 25 deletions.
8 changes: 4 additions & 4 deletions notebooks/challenge/cism/cism_exercise_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
" \n",
"Create a new case <font face=\"Courier\" color='purple'><strong>T_GrIS_SSP585_2015_2100 </strong></font> with the command:\n",
"```\n",
"cd /glade/campaign/cesm/development/cross-wg/tutorial/cesm2.1_tutorial2022/cime/scripts\n",
"cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts\n",
"./create_newcase --case ~/cases/T_GrIS_SSP585_2015_2100 --compset T1850G --res f19_g17_gl4 --run-unsupported\n",
"```\n",
"\n",
Expand Down Expand Up @@ -175,9 +175,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "CMIP6 2019.10",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "cmip6-201910"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -189,7 +189,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
65 changes: 55 additions & 10 deletions notebooks/modifications/xml/exercises/xml_length_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
"**Part I**: \n",
"Create a new fully coupled **startup** case named \"b1850.run_length\" from the 1850 climate conditions with a resolution of f19_g17. Increase the amount of standard output produced by the model for debugging. Run for 1 month. <br><br>\n",
" \n",
"**Part II**:\n",
"*Do part II only **after** Part I has finished running*. \n",
"Change the debug level back to 1. Expand Part I to produce a total of 38 months of model run. Remember that you have already run for 1 month. **You should submit this at the end of the day so that it will (hopefully) run overnight and be available the following day. Also you should submit that run in the ``cpu`` queue, so it doesn't interfere with the other exercises** You can continue with Exercise 2-3 and submit the run later.\n",
"\n",
"**VERY IMPORTANT: submit Part II, in the ``cpu`` queue and not the ``tutorial`` queue **\n",
"\n",
"</div>"
]
},
Expand All @@ -47,12 +41,9 @@
" ./xmlquery -p DBUG\n",
"```\n",
"\n",
" \n",
"2. Use `xmlchange` to modify `env_run.xml` \n",
"\n",
"3. Make sure to update the walltime to match the run length.\n",
" \n",
"4. For Part II, how to tell the model that this run continues from the previously finished run of 1 month?\n",
"\n",
"</details>\n",
"</div>"
Expand Down Expand Up @@ -84,7 +75,7 @@
"\n",
"```\n",
" cd /glade/u/home/$USER/cases/b1850.run_length\n",
" ./xmlchange INFO_DBUG=2,STOP_N=3,STOP_OPTION=nmonths\n",
" ./xmlchange INFO_DBUG=2,STOP_N=1,STOP_OPTION=nmonths\n",
" ./xmlchange --subgroup case.run JOB_WALLCLOCK_TIME=2:00:00\n",
"```\n",
"<br> \n",
Expand All @@ -107,6 +98,60 @@
"</div>"
]
},
{
"cell_type": "markdown",
"id": "74917252-811a-4818-a62b-d63b3040e73d",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
"\n",
"<strong>Exercise: Modify the `env_run.xml` file </strong><br><br>\n",
" \n",
"**Part II**:\n",
"*Do part II only **after** Part I has finished running*. \n",
"Change the debug level back to 1. Expand Part I to produce a total of 38 months of model run. Remember that you have already run for 1 month. \n",
"- You can only do part II **after** Part I has finished running\n",
"- You should submit this at the end of the day so that it will (hopefully) run overnight and be available the following day. You can continue with Exercise 2-3 and submit the run later.\n",
"- **VERY, VERY IMPORTANT: Don't use the ``tutorial`` for this run as it is an overnight run. You should submit that run in the ``cpu`` queue**\n",
"\n",
"**To submit in the ``cpu`` queue, you need to add:**\n",
"```\n",
" ./xmlchange JOB_QUEUE=cpu\n",
"```\n",
"\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "00c9a0fd-0cf5-4129-9f2f-d3583cc7c8ef",
"metadata": {},
"source": [
"<div class=\"alert alert-warning\">\n",
" \n",
"<details> \n",
" <summary>\n",
" <img src=\"https://freesvg.org/img/bulb_on.png\" width=\"20px\">\n",
" <font face=\"Times New Roman\" color='blue' size=\"4\">Hint!</font>\n",
" </summary>\n",
"\n",
"1. Which variable controls the amount of standard output for debugging? We can use partial query to find out:\n",
" \n",
"```\n",
" ./xmlquery -p DBUG\n",
"```\n",
"\n",
" \n",
"2. Use `xmlchange` to modify `env_run.xml` \n",
"\n",
"3. Make sure to update the walltime to match the run length.\n",
" \n",
"4. For Part II, how to tell the model that this run continues from the previously finished run of 1 month?\n",
"\n",
"</details>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "f72d36bf-b3a6-4862-9479-169cbc2b01e7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"```\n",
" cd /glade/u/home/$USER/cases/b1850.branch\n",
" ./xmlchange RUN_TYPE=branch\n",
" ./xmlchange RUN_REFCASE=b1850.run_length,RUN_REFDATE=0001-04-01,GET_REFCASE=FALSE\n",
" ./xmlchange RUN_REFCASE=b1850.run_length,RUN_REFDATE=0001-02-01,GET_REFCASE=FALSE\n",
"```\n",
"\n",
"<br> \n",
Expand All @@ -101,7 +101,7 @@
" \n",
"```\n",
" ./case.setup\n",
" cp /glade/derecho/scratch/$USER/archive/b1850.run_length/rest/0001-04-01-00000/* /glade/derecho/scratch/$USER/b1850.branch/run/\n",
" cp /glade/derecho/scratch/$USER/archive/b1850.run_length/rest/0001-02-01-00000/* /glade/derecho/scratch/$USER/b1850.branch/run/\n",
"```\n",
" \n",
"<br>\n",
Expand Down Expand Up @@ -161,7 +161,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"```\n",
" cd /glade/u/home/$USER/cases/b1850.timestep\n",
" ./xmlchange RUN_TYPE=hybrid\n",
" ./xmlchange RUN_REFCASE=b1850.run_length,RUN_REFDATE=0001-04-01,GET_REFCASE=FALSE,JOB_WALLCLOCK_TIME=2:00:00\n",
" ./xmlchange RUN_REFCASE=b1850.run_length,RUN_REFDATE=0001-02-01,GET_REFCASE=FALSE,JOB_WALLCLOCK_TIME=2:00:00\n",
"```\n",
" \n",
"<br> \n",
Expand All @@ -86,7 +86,7 @@
" \n",
"```\n",
" ./case.setup\n",
" cp /glade/derecho/scratch/$USER/archive/b1850.run_length/rest/0001-04-01-00000/* /glade/derecho/scratch/$USER/b1850.timestep/run/\n",
" cp /glade/derecho/scratch/$USER/archive/b1850.run_length/rest/0001-02-01-00000/* /glade/derecho/scratch/$USER/b1850.timestep/run/\n",
"```\n",
" \n",
"<br> \n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/resources/tutorial_specific.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"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."
"**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/tutorial/tutorial_2024_env/tcshrc` file to your `.tcshrc` file using a text editor."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/sourcemods/exercises/exercise_add_field.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
" `SourceMods/src.atm`:\n",
" \n",
"``` \n",
"cp /glade/campaign/cesm/development/cross-wg/cesm2.1_tutorial2022/components/cam/src/physics/cam/cam_diagnostics.F90 SourceMods/src.cam\n",
"cp /glade/u/home/$USER/code/my_cesm_code/components/cam/src/physics/cam/cam_diagnostics.F90 SourceMods/src.cam\n",
"```\n",
"\n",
"Now, let's use `T500` as a template for your changes and add the relevant lines for `T750`: edit the file `SourceMods/src.cam/cam_diagnostics.F90` to add the following.\n",
Expand Down Expand Up @@ -238,7 +238,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions notebooks/sourcemods/exercises/exercise_rain_threshold.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
" \n",
"Create a new case `b1850_rain_threshold` with the command:\n",
"```\n",
"cd /glade/campaign/cesm/development/cross-wg/cesm2.1_tutorial2022/cime/scripts\n",
"cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts\n",
"./create_newcase --case ~/cases/b1850_rain_threshold --compset B1850 --res f19_g17 \n",
"```\n",
"\n",
Expand All @@ -83,7 +83,7 @@
"Locate the file where `rain_threshold` is defined and copy it into\n",
" `SourceMods/src.lnd`:\n",
"``` \n",
"cp /glade/campaign/cesm/development/cross-wg/cesm2.1_tutorial2022/components/clm/src/biogeochem/CNPhenologyMod.F90 SourceMods/src.clm\n",
"cp /glade/u/home/$USER/code/my_cesm_code/components/clm/src/biogeochem/CNPhenologyMod.F90 SourceMods/src.clm\n",
"```\n",
" \n",
"Edit the file `SourceMods/src.clm/CNPhenologyMod.F90 ` and add the lines:\n",
Expand Down Expand Up @@ -145,7 +145,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit cbabd14

Please sign in to comment.