-
Notifications
You must be signed in to change notification settings - Fork 35
Fates exercise #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fates exercise #359
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
adea091
adding FATES challenge
adrifoster c8c2b8a
finalizing fates exercise
adrifoster 4b7c7ec
update figure; fates diagostics notebook
adrifoster 98e7fe1
rename plots
adrifoster 7d5a5bf
updates and make two files
adrifoster 7e9af41
updates to fates diagnostics
adrifoster da40182
fix typos
adrifoster 847bc4b
fix typos
adrifoster 21c1f51
final touches
adrifoster 3ae003c
forgot to save
adrifoster e1c2659
move clm 4 to 3
adrifoster 78337db
moved diagnostics to challenge
adrifoster 322fd19
update names
adrifoster 02ff8a2
Merge branch 'main' into fates_exercise
adrifoster 2c29b7d
move plots
adrifoster 76cecad
update notebooks
adrifoster 84b6cdd
merge in main
adrifoster 3a8917d
aligning notebooks
adrifoster 8f92994
updating case names
adrifoster eb7a351
align formats
adrifoster e29aee4
updating the intro too
adrifoster af63459
more updates -- final???
adrifoster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| "\n", | ||
| "It can be useful for people interested in land science to run simulations with only an active land components and atmospheric forcing. In this exercise, you will learn how to run one of these land-only simulations.\n", | ||
| "\n", | ||
| "This exercise was created by Peter Lawrence, Erik Kluzek and Alice DuVivier." | ||
| "These exercises were created by Adrianna Foster and Erik Kluzek." | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -27,9 +27,10 @@ | |
| "id": "346cbd7b-3b8e-41f0-b120-b369ab20f6cc", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "- Student will learn what a I compset is, the types of forcing available to run one, and how to run one.\n", | ||
| "- Student will learn how to run a case with satellite phenology and one with prognostic crops and compare the two experiments.\n", | ||
| "- Learn what inputs CLM needs and what they look like.\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." | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -46,18 +47,18 @@ | |
| "metadata": {}, | ||
| "source": [ | ||
| "- This exercise uses the same code base as the rest of the tutorial. \n", | ||
| "- You will be using the I2000Clm50Sp and IHistClm50BgcCrop compsets at the f09_g17_gl4 resolution.\n", | ||
| "- You will run a control simulation and two experimental simulations. \n", | ||
| "- You will modify netcdf input files. \n", | ||
| "- You will use simple, command line netcdf tools to evaluate how the experiments differ from the control simulation." | ||
| "- 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", | ||
| "- You will modify a json input file.\n", | ||
| "- You will use the `xarray` and `matplotlib` libraries to evaluate how the simulations differ." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "fd2ff959-6ec0-4534-8713-f5dfdb13b955", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Useful CLM references" | ||
| "## Useful CLM and FATES references" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -67,7 +68,7 @@ | |
| "source": [ | ||
| "<div class=\"alert alert-info\" style=\"text-align: center;\">\n", | ||
| "\n", | ||
| "[CESM CLM/CTSM User's Guide](https://escomp.github.io/ctsm-docs/versions/master/html/users_guide/index.html)\n", | ||
| "[CESM CLM/CTSM User's Guide](https://escomp.github.io/CTSM/users_guide/index.html)\n", | ||
| "\n", | ||
| "</div>" | ||
| ] | ||
|
|
@@ -86,6 +87,18 @@ | |
| "</div>" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "e9024cab-f818-4d8a-99bb-720a69bc19ce", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "<div class=\"alert alert-info\" style=\"text-align: center;\">\n", | ||
| "\n", | ||
| "[FATES Users Guide](https://fates-users-guide.readthedocs.io/en/latest/)\n", | ||
| "\n", | ||
| "</div>" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "cb8a0e10-a920-41dd-8bc4-5c03395d231e", | ||
|
|
@@ -99,11 +112,12 @@ | |
| "id": "69988cae-fd26-4fda-8fee-6ab52e79f42d", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "The I compset has active clm with a data atmosphere. The sea ice, ocean, atmosphere, and wave models are not active. There are two types of options for I compsets:\n", | ||
| "- SP: Satellite Phenology\n", | ||
| "- BGC: Biogeochemistry \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", | ||
| "\n", | ||
| "We will use the Satellite Phenology option for our control case." | ||
| "We will use the Satellite Phenology option for our first simulation." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking "control case" is good to use, because then it's the one that the others are compared to. What is the thinking about this change? |
||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -113,7 +127,7 @@ | |
| "source": [ | ||
| "\n", | ||
| "\n", | ||
| "*<p style=\"text-align: center;\"> Figure: I2000 compset definition. </p>*" | ||
| "*<p style=\"text-align: left;\"> Figure: I2000 compset definition. </p>*" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -135,32 +149,28 @@ | |
| "source": [ | ||
| "## Post processing and viewing your output\n", | ||
| "\n", | ||
| "You will use [ncview](https://ncar.github.io/CESM-Tutorial/notebooks/tools/netcdf_tools.html#ncview) and [NCO operator](https://ncar.github.io/CESM-Tutorial/notebooks/tools/netcdf_tools.html#netcdf-operators-nco) tools to evaluate how the experiments differ from the control simulation.\n", | ||
| "\n", | ||
| "These tools will need to be loaded into your environment using the NCAR HPC [modules](https://ncar.github.io/CESM-Tutorial/notebooks/tools/unix/modules.html)." | ||
| "You will use python and the `xarray` and `matplotlib` libraries to evaluate how the experiments differ." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "828e538d-3558-4747-9b61-3b29da04e294", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "1) You can create an annual average of the first year's data for each simulationg using the `ncra` (netCDF averager) command from the netCDF operators package \\([NCO](https://nco.sourceforge.net/)\\). \n", | ||
| "1) You can read in multiple history files using the [xarray](https://docs.xarray.dev/en/stable/) command:\n", | ||
| "```\n", | ||
| "ncra $OUTPUT_DIR/*.clm.*nc $CASENAME.cln.h.0001.nc\n", | ||
| "ds = open_mfdataset(files)\n", | ||
| "```\n", | ||
| "\n", | ||
| "2) Create a file that contains differences between each of the experiments and the control simulation\n", | ||
| "2) Look at differences between the same variable on two different xarray datasets:\n", | ||
| "```\n", | ||
| "ncdiff i.day5.b.clm2.XXX.nc /glade/derecho/scratch/$user/archive/i.day5.a/lnd/hist/i.day5.a.clm2.XXX.nc i_diff.nc\n", | ||
| "gpp_diff = ds_1.GPP - ds_2.GPP\n", | ||
| "```\n", | ||
| "\n", | ||
| "3) Examine variables within each annual mean and the difference files using `ncview`\n", | ||
| "```\n", | ||
| "ncview i_diff.nc\n", | ||
| "3) Examine variables using the `.plot()` function\n", | ||
| "```\n", | ||
| "\n", | ||
| "4) You can also look at other monthly-mean outputs or component log files." | ||
| "ds.GPP.plot()\n", | ||
| "```" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -174,9 +184,9 @@ | |
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "CMIP6 2019.10", | ||
| "display_name": "Python 3 (ipykernel)", | ||
| "language": "python", | ||
| "name": "cmip6-201910" | ||
| "name": "python3" | ||
| }, | ||
| "language_info": { | ||
| "codemirror_mode": { | ||
|
|
@@ -188,7 +198,7 @@ | |
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3", | ||
| "version": "3.7.10" | ||
| "version": "3.10.13" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a note that the forcing changes between these three.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.