Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions notebooks/challenge/clm_ctsm/clm_ctsm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"id": "346cbd7b-3b8e-41f0-b120-b369ab20f6cc",
"metadata": {},
"source": [
"- Students will learn what an \"I\" compset is, the types of forcing available to run one, and how to run one.\n",
"- Students will learn what an `I` compset is, the types of forcing available to run one, and how to run one.\n",
"- Students will learn how to run a default CLM (\"big leaf\") case with satellite phenology and one with prognostic BGC and crops and compare the two experiments.\n",
"- Students will learn how to run FATES and compare to big leaf CLM output.\n",
"- Students will learn how to modify an input parameter file and investigate its effect on output."
Expand All @@ -47,7 +47,7 @@
"metadata": {},
"source": [
"- This exercise uses the same code base as the rest of the tutorial. \n",
"- You will be using the I2000Clm60Sp, IHistClm60BgcCrop, and I2000Clm60FatesSpCrujraRsGs compsets at the f19_f19_mt233 resolution.\n",
"- You will be using the `I2000Clm60Sp`, `IHistClm60BgcCrop`, and `I2000Clm60FatesSpCrujraRsGs` compsets at the `f19_f19_mt233` resolution.\n",
"- You will run a CLM SP simulation, a CLM BGC simulation, and two FATES SP simulations.\n",
"- The first two use the GSWP3 atmospheric forcing and the last two use CRUJRA-2024 forcing.\n",
"- You will modify a json input file.\n",
Expand Down Expand Up @@ -105,15 +105,15 @@
"id": "cb8a0e10-a920-41dd-8bc4-5c03395d231e",
"metadata": {},
"source": [
"## What is an I case?"
"## What is an `I` case?"
]
},
{
"cell_type": "markdown",
"id": "69988cae-fd26-4fda-8fee-6ab52e79f42d",
"metadata": {},
"source": [
"\"I\" compsets have active CLM with a data atmosphere (DATM). The sea ice, ocean, atmosphere, and wave models are not active. There are three types of options for I compsets:\n",
"`I` compsets have active CLM with a data atmosphere (DATM). The sea ice, ocean, atmosphere, and wave models are not active. There are three types of options for `I` compsets:\n",
"- SP: Satellite Phenology (with CLM big leaf)\n",
"- BGC: Biogeochemistry (with CLM big leaf)\n",
"- FATES: The FATES cohort vegetation model instead of big leaf, either SP or BGC\n",
Expand All @@ -126,7 +126,7 @@
"id": "aedfeed6",
"metadata": {},
"source": [
"As explained earlier, you can get information on compsets by using \"query_config in the cime/scripts directory under your CESM checkout.\n",
"As explained earlier, you can get information on compsets by using `query_config` in the `cime/scripts` directory under your CESM checkout.\n",
"\n",
"```bash\n",
"cd /glade/u/home/$USER/code/my_cesm_code\n",
Expand All @@ -141,15 +141,17 @@
"source": [
"Which will return the following:\n",
"\n",
"```\n",
" I2000Clm60Sp : 2000_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV\n",
"```\n",
"\n",
"Which breaks down into:\n",
"\n",
"| Field | Description |\n",
"| ----- | ----------- |\n",
"| 2000 | year 2000 conditions |\n",
"| DATM%GSWP3v1 | Data Atmosphere Model using GSWP3v1 forcing |\n",
"| CLM60%SP | CTSM with clm6_0 physics defaults for big-leaf model with Satellite Phenology |\n",
"| CLM60%SP | CTSM with `clm6_0` physics defaults for big-leaf model with Satellite Phenology |\n",
"| SICE | Stub Sea-ice |\n",
"| SOCN | Stub Ocean |\n",
"| MOSART | MOSART River model |\n",
Expand Down Expand Up @@ -187,14 +189,6 @@
"ds.GPP.plot()\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b0a882d4-0c0e-4d2e-b59f-df2a648fa93d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
36 changes: 14 additions & 22 deletions notebooks/challenge/clm_ctsm/clm_exercise_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,31 +95,31 @@
"**Create a new case**\n",
"\n",
"Create a new case <font face=\"Courier\" color='purple'><strong>i.clm.sp.year1 </strong></font> with the command:\n",
"```\n",
"```bash\n",
"cd /glade/u/home/$USER/code/my_clm_code/cime/scripts\n",
"./create_newcase --case ~/cases/i.clm.sp.year1 --compset I2000Clm60Sp --res f19_f19_mt233 --run-unsupported\n",
"```\n",
"<br>\n",
"\n",
"**Case setup**\n",
"\n",
"``` \n",
"```bash\n",
"cd ~/cases/i.clm.sp.year1\n",
"./case.setup\n",
"```\n",
"\n",
"<br>\n",
"\n",
"**Set run length**\n",
" \n",
"\n",
"Change the `run length`:\n",
"``` \n",
"```bash\n",
"./xmlchange STOP_N=1,STOP_OPTION=nyears\n",
"```\n",
"<br>\n",
" \n",
"\n",
"Check the namelist by running:\n",
"``` \n",
"```bash\n",
"./preview_namelists\n",
"```\n",
"<br>\n",
Expand All @@ -129,39 +129,39 @@
"If needed, change <font face=\"Courier\" color='purple'><strong>job queue</strong></font> and <font face=\"Courier\" color='purple'><strong>account number</strong></font>. \n",
"\n",
"For instance, to run in the queue `tutorial` and the project number `UESM0016`:\n",
"``` \n",
"```bash\n",
"./xmlchange JOB_QUEUE=tutorial,PROJECT=UESM0016 --force\n",
"```\n",
"<br>\n",
"\n",
"**Change the wallclock time**\n",
"\n",
"```\n",
"```bash\n",
"./xmlchange --subgroup case.run JOB_WALLCLOCK_TIME=01:00:00\n",
"```\n",
"<br>\n",
"\n",
"\n",
"**Build case**\n",
"```\n",
"```bash\n",
"qcmd -- ./case.build\n",
"```\n",
"<br>\n",
"\n",
"**Submit case**\n",
"```\n",
"```bash\n",
"./case.submit\n",
"```\n",
"<br>\n",
"\n",
"**Check the run:**\n",
"When the run is completed, look into the archive directory for: \n",
"<font face=\"Courier\" color='purple'><strong>i.clm.sp.year1</strong></font>. \n",
" \n",
"(1) Check that your archive directory on derecho (The path will be different on other machines): \n",
"```\n",
"cd /glade/derecho/scratch/$USER/archive/i.clm.sp.year1/lnd/hist\n",
"\n",
"(1) Check your archive directory on Derecho (the path will be different on other machines): \n",
"\n",
"```bash\n",
"cd /glade/derecho/scratch/$USER/archive/i.clm.sp.year1/lnd/hist\n",
"ls \n",
"```\n",
"<br>"
Expand All @@ -174,14 +174,6 @@
"source": [
"We will investigate the output in a subsequent exercise."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "de84fb8e-aa52-4bf6-b7c7-583af74b1328",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
47 changes: 20 additions & 27 deletions notebooks/challenge/clm_ctsm/clm_exercise_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"id": "9fb850dd",
"metadata": {},
"source": [
"We can use a different I compset: IHistClm60BgcCrop. This experiment is a 20th century transient run using GSWP3 forcing and the biogeochemistry model including crops.\n"
"We can use a different `I` compset: `IHistClm60BgcCrop`. This experiment is a 20th century transient run using GSWP3 forcing and the biogeochemistry model including crops."
]
},
{
"cell_type": "markdown",
"id": "7bea699c",
"metadata": {},
"source": [
"Using query_config again we learn more about this compset:\n",
"Using `query_config` again we learn more about this compset:\n",
"\n",
"```bash\n",
"cd /glade/u/home/$USER/code/my_clm_code\n",
Expand All @@ -35,7 +35,9 @@
"metadata": {},
"source": [
"Which will return the following:\n",
"```\n",
" IHistClm60BgcCrop : HIST_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV\n",
"```\n",
"\n",
"Which breaks down into:\n",
"\n",
Expand All @@ -52,7 +54,7 @@
"\n",
"In biogeochemistry (BGC) mode, CLM grows vegetation rather than prescribing it, computing photosynthesis, allocating carbon to leaves, stems, and roots, and cycling carbon and nitrogen through vegetation, litter, and soil. Leaf area becomes a prognostic result of that carbon balance rather than a satellite input, which makes BGC far better for studying how vegetation responds to change, but costlier, since the carbon pools must be spun up to equilibrium first.\n",
"\n",
"By default, IHIST compsets have a default `finidat` (initialization file) that they use to initialize the model. We will leave this at default."
"By default, `IHIST` compsets have a default `finidat` (initialization file) that they use to initialize the model. We will leave this at default."
]
},
{
Expand All @@ -63,7 +65,7 @@
"<div class=\"alert alert-info\">\n",
"<strong>Exercise: Run an experimental case with prognostic BGC</strong><br><br>\n",
" \n",
"Create a case called **i.clm.bgc.month3** using the compset `IHistClm60BgcCrop` at `f19_f19_mt233` resolution. \n",
"Create a case called **`i.clm.bgc.month3`** using the compset `IHistClm60BgcCrop` at `f19_f19_mt233` resolution. \n",
" \n",
"Set the run length to **3 months**. \n",
"\n",
Expand All @@ -87,7 +89,7 @@
"**How do I compile?**\n",
"\n",
"You can compile with the command:\n",
"```\n",
"```bash\n",
"qcmd -- ./case.build\n",
"```\n",
"\n",
Expand All @@ -103,7 +105,7 @@
"\n",
"When your run is completed, go to the archive directory and navigate to the subdirectory `lnd/hist`\n",
"\n",
"```\n",
"```bash\n",
"cd /glade/derecho/scratch/$USER/archive/i.clm.bgc.month3\n",
"cd lnd/hist\n",
"```\n",
Expand Down Expand Up @@ -142,15 +144,15 @@
"**Create a new case**\n",
"\n",
"Create a new case <font face=\"Courier\" color='purple'><strong>i.clm.bgc.month3 </strong></font>:\n",
"```\n",
"```bash\n",
"cd /glade/u/home/$USER/code/my_clm_code/cime/scripts\n",
"./create_newcase --case ~/cases/i.clm.bgc.month3 --compset IHistClm60BgcCrop --res f19_f19_mt233 --run-unsupported\n",
"```\n",
"<br>\n",
"\n",
"**Case setup**\n",
"\n",
"``` \n",
"```bash\n",
"cd ~/cases/i.clm.bgc.month3\n",
"./case.setup\n",
"```\n",
Expand All @@ -159,19 +161,19 @@
"**Set run length**\n",
" \n",
"Change the `run length`:\n",
"``` \n",
"```bash\n",
"./xmlchange STOP_N=3,STOP_OPTION=nmonths\n",
"```\n",
"<br>\n",
"\n",
"Note differences between this case and the SP case:\n",
"``` \n",
"```bash\n",
"diff env_run.xml ../i.clm.sp.year1/env_run.xml\n",
"```\n",
"<br>\n",
" \n",
"Check the namelist by running:\n",
"``` \n",
"```bash\n",
"./preview_namelists\n",
"```\n",
"<br>\n",
Expand All @@ -181,35 +183,35 @@
"If needed, change <font face=\"Courier\" color='purple'><strong>job queue</strong></font> and <font face=\"Courier\" color='purple'><strong>account number</strong></font>. \n",
"\n",
"For instance, to run in the queue `tutorial` and the project number `UESM0016`:\n",
"``` \n",
"```bash\n",
"./xmlchange JOB_QUEUE=tutorial,PROJECT=UESM0016 --force\n",
"```\n",
"<br>\n",
"\n",
"**Change the wallclock time**\n",
"\n",
"```\n",
"```bash\n",
"./xmlchange --subgroup case.run JOB_WALLCLOCK_TIME=01:00:00\n",
"```\n",
"<br>\n",
"\n",
"\n",
"**Build case**\n",
"\n",
"```\n",
"```bash\n",
"qcmd -- ./case.build\n",
"```\n",
"<br>\n",
" \n",
"Compare the namelists from the two experiments:\n",
"```\n",
"```bash\n",
"diff CaseDocs/lnd_in ../i.clm.sp.year1/CaseDocs/lnd_in\n",
"```\n",
"<br>\n",
" \n",
"**Submit case**\n",
"\n",
"```\n",
"```bash\n",
"./case.submit\n",
"```\n",
"<br>\n",
Expand All @@ -219,10 +221,9 @@
"When the run is completed, look into the archive directory for: \n",
"<font face=\"Courier\" color='purple'><strong>i.clm.bgc.month3</strong></font>. \n",
"\n",
"Check that your archive directory on derecho (The path will be different on other machines): \n",
"```\n",
"Check your archive directory on Derecho (the path will be different on other machines): \n",
"```bash\n",
"cd /glade/derecho/scratch/$USER/archive/i.clm.bgc.month3/lnd/hist\n",
"\n",
"ls \n",
"```\n",
"</details>\n",
Expand All @@ -236,14 +237,6 @@
"source": [
"We will investigate the output in a subsequent exercise."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4e3a0a21-7f9c-4621-b4fe-7b696eb3a7f9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading
Loading