├── .github └── workflows │ └── gh-page_builder.yml ├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── _toc.yml ├── images ├── basics │ ├── CESM2_Code_Components_List.png │ ├── CESM2_Create_Clone_Continued.png │ ├── CESM2_Create_Newcase_Command.png │ ├── CESM2_Create_Newcase_Compset.png │ ├── CESM2_Create_Newcase_Resolution.png │ ├── CESM2_Events.png │ ├── CESM2_Workspaces_Code.png │ ├── CESM2_Workspaces_Detail.png │ ├── CESM2_case_build.png │ ├── CESM2_case_setup.png │ ├── CESM2_case_submit.png │ ├── CESM2_create_newcase.png │ ├── CESM2_short_term_archive.png │ ├── NCVIEW_App_Window.png │ ├── NCVIEW_Jan0001_PRECC.png │ ├── NCVIEW_Jan0001_PRECL.png │ └── NCVIEW_Jan0001_TS.png ├── challenge │ ├── CAMchem_compsets.png │ ├── Fcompset.png │ ├── GEOV-latlon.png │ ├── GEOV-zonal.png │ ├── Precip_isotope_Cartoon.jpg │ ├── Tcompset.png │ ├── WACCM-CAMchem.png │ ├── WACCM_compsets1.png │ ├── WACCM_compsets2.png │ ├── bgc_table_1.png │ ├── bgc_table_2.png │ ├── cam_SST_diff.png │ ├── cam_topo_diff.png │ ├── cape.png │ ├── chemistry-mechanism-example.png │ ├── chemistry-ozone-reaction.png │ ├── chemistry-ozone-reaction_orig.png │ ├── chemistry-preprocessor-info.png │ ├── chemistry-rundir-example.png │ ├── cice_rsnw.png │ ├── cice_rsnw2.png │ ├── gcase.png │ ├── gecocase.png │ ├── geov-2files.png │ ├── geov-difference.png │ ├── geov-openingfile.png │ ├── i2000.png │ ├── ihist.png │ └── overflows.png ├── diagnostics │ ├── cam │ │ ├── advanced_plot_1.png │ │ ├── basics_plot_1.png │ │ ├── basics_plot_2.png │ │ ├── basics_plot_3.png │ │ ├── basics_plot_4.png │ │ ├── basics_plot_5.png │ │ ├── basics_plot_6.png │ │ ├── basics_plot_7.png │ │ └── basics_plot_8.png │ ├── cice │ │ ├── advanced_plot_1.png │ │ ├── advanced_plot_2.png │ │ ├── advanced_plot_3.png │ │ ├── advanced_plot_4.png │ │ ├── advanced_plot_5.png │ │ ├── advanced_plot_6.png │ │ ├── basics_plot_1.png │ │ ├── basics_plot_2.png │ │ ├── basics_plot_3.png │ │ └── basics_plot_4.png │ ├── clm_ctsm │ │ ├── basics_plot_1.png │ │ ├── basics_plot_10.png │ │ ├── basics_plot_2.png │ │ ├── basics_plot_3.png │ │ ├── basics_plot_4.png │ │ ├── basics_plot_5.png │ │ ├── basics_plot_6.png │ │ ├── basics_plot_7.png │ │ ├── basics_plot_8.png │ │ └── basics_plot_9.png │ ├── login │ │ ├── Diagnostics_1.png │ │ ├── Diagnostics_2.png │ │ ├── Diagnostics_3.png │ │ ├── Diagnostics_4.png │ │ ├── Diagnostics_5.png │ │ ├── Diagnostics_6.png │ │ ├── Diagnostics_7.png │ │ ├── Diagnostics_8.png │ │ └── Diagnostics_duo_pcode.png │ ├── mom │ │ ├── basics_plot_1.png │ │ ├── basics_plot_2.png │ │ ├── basics_plot_3.png │ │ ├── basics_plot_4.png │ │ ├── basics_plot_5.png │ │ ├── basics_plot_6.png │ │ └── transport_sections_mom6.png │ └── pop │ │ ├── advanced_plot_1.png │ │ ├── advanced_plot_2.png │ │ ├── basics_plot_1.png │ │ ├── basics_plot_10.png │ │ ├── basics_plot_2.png │ │ ├── basics_plot_3.png │ │ ├── basics_plot_4.png │ │ ├── basics_plot_5.png │ │ ├── basics_plot_6.png │ │ ├── basics_plot_7.png │ │ ├── basics_plot_8.png │ │ └── basics_plot_9.png ├── intro │ ├── CESM2.png │ ├── CESM2_CIME_Infrastructure.png │ ├── CESM2_Discuss.png │ ├── CESM2_MCT_Coupling.png │ ├── CESM_NUOPC_Coupling.png │ ├── CESM_exp_1.png │ ├── CESM_exp_2.png │ ├── CESM_exp_3.png │ ├── CESM_github.png │ ├── clim_data_gateway.png │ ├── clim_data_guide.png │ └── light_dark_mode.png ├── modifications │ └── CESM2_xml_files.png ├── namelist │ ├── CESM_directories_and_namelists.png │ ├── Lwcf_dcs.png │ ├── dcs.png │ ├── namelist_var_search.png │ ├── ncview_diff_dcs.png │ └── nhtfrq.png ├── ncar_logo.png ├── prereqs │ └── modules.png ├── resources │ ├── CESM2_Porting.png │ ├── CESM2_github_CESM.png │ ├── CESM2_github_ESCOMP.png │ ├── CESM2_github_main.png │ ├── ncdump_example.png │ ├── ncview.png │ ├── term_jupyter_1.png │ ├── term_jupyter_2.png │ ├── term_mac.png │ └── term_pc.png ├── sourcemods │ ├── CESM_directories_and_SourceMods.png │ ├── CESM_directories_and_namelists.png │ └── ncview_T750-T500.png └── troubleshooting │ └── CESM_directories_and_log_files.png └── notebooks ├── basics ├── basics_overview.ipynb ├── cesm_workflow.ipynb ├── cesm_workflow │ ├── case_build.ipynb │ ├── case_setup.ipynb │ ├── case_submit.ipynb │ ├── checking_jobs_and_status.ipynb │ ├── create_clone.ipynb │ ├── create_newcase.ipynb │ └── model_output.ipynb ├── cesm_workspaces.ipynb ├── code │ ├── cesm_code_explore.ipynb │ └── git_download_cesm.ipynb ├── code_overview.ipynb ├── exercises │ ├── examine_history_B1850.ipynb │ ├── extra.ipynb │ ├── first_B1850.ipynb │ ├── review_questions.ipynb │ └── second_B1850.ipynb └── exercises_overview.ipynb ├── challenge ├── bgc │ ├── bgc.ipynb │ └── bgc_exercise_1.ipynb ├── cam-chem_waccm │ ├── cam-chem_waccm.ipynb │ ├── exercise_1.ipynb │ ├── exercise_2.ipynb │ ├── exercise_3.ipynb │ └── visualization.ipynb ├── cam │ ├── cam.ipynb │ ├── exercise_1.ipynb │ ├── exercise_2.ipynb │ ├── exercise_3.ipynb │ ├── exercise_4.ipynb │ ├── exercise_5.ipynb │ └── exercise_6.ipynb ├── challenge.ipynb ├── cice │ ├── cice.ipynb │ ├── cice_exercise_1.ipynb │ ├── cice_exercise_2.ipynb │ └── cice_exercise_3.ipynb ├── cism │ ├── cism.ipynb │ ├── cism_exercise_1.ipynb │ ├── cism_exercise_2.ipynb │ └── cism_exercise_3.ipynb ├── clm_ctsm │ ├── clm_ctsm.ipynb │ ├── clm_exercise_1.ipynb │ ├── clm_exercise_2.ipynb │ └── clm_exercise_3.ipynb ├── mom │ └── mom_exercise_5.ipynb ├── paleo │ ├── exercise_1.ipynb │ ├── exercise_2.ipynb │ ├── exercise_3.ipynb │ └── paleo.ipynb └── pop │ ├── pop.ipynb │ ├── pop_exercise_1.ipynb │ ├── pop_exercise_2.ipynb │ ├── pop_exercise_3.ipynb │ └── pop_exercise_4.ipynb ├── diagnostics ├── additional │ ├── additional.ipynb │ ├── adf.ipynb │ ├── analysis_tools.ipynb │ ├── cvdp.ipynb │ ├── large_ensembles.ipynb │ ├── postprocessing.ipynb │ └── uxarray.ipynb ├── cam │ ├── advanced_cam.ipynb │ ├── basics_cam.ipynb │ └── cam.ipynb ├── cice │ ├── advanced_cice.ipynb │ ├── basics_cice.ipynb │ └── cice.ipynb ├── clm_ctsm │ ├── basics_clm.ipynb │ └── clm_ctsm.ipynb ├── cupid.ipynb ├── diagnostics.ipynb ├── mom │ └── basics_mom.ipynb └── pop │ ├── advanced_pop.ipynb │ ├── basics_pop.ipynb │ └── pop.ipynb ├── intro ├── cesm_expts │ ├── clim_data_gateway.ipynb │ └── clim_data_guide.ipynb ├── cesm_webpage.ipynb ├── community_experiments.ipynb ├── components.ipynb ├── coupling.ipynb ├── getting_help.ipynb ├── getting_involved.ipynb ├── intro_overview.ipynb └── project.ipynb ├── modifications ├── xml.ipynb └── xml │ ├── copying_cases.ipynb │ ├── exercises.ipynb │ ├── exercises │ ├── xml_length_exercise.ipynb │ ├── xml_runtype_exercise.ipynb │ └── xml_timestep_exercise.ipynb │ ├── model_control_files.ipynb │ ├── modify_run_type.ipynb │ ├── modify_run_type │ ├── hybrid_branch_restart.ipynb │ └── run_variables.ipynb │ ├── other_xml_variables.ipynb │ ├── overview.ipynb │ ├── physics_timestep.ipynb │ ├── run_length.ipynb │ └── run_length │ ├── changing_run_length.ipynb │ ├── number_of_submissions.ipynb │ ├── restarting.ipynb │ ├── starting_and_stopping.ipynb │ └── timing_files.ipynb ├── namelist ├── documentation.ipynb ├── exercises │ ├── exercise_cam_output.ipynb │ └── exercise_tuning_parameter.ipynb ├── exercises_overview.ipynb ├── namelist.ipynb ├── output.ipynb ├── output │ ├── output_cam.ipynb │ ├── output_cice.ipynb │ ├── output_clm.ipynb │ └── output_pop.ipynb └── overview.ipynb ├── prereqs ├── exercises.ipynb └── prereqs_overview.ipynb ├── resources ├── fortran.ipynb ├── github.ipynb ├── ncar_hpc.ipynb ├── ncar_hpc_login.ipynb ├── ncar_hpc_module.ipynb ├── netcdf.ipynb ├── porting.ipynb ├── profile.ipynb ├── resources_overview.ipynb ├── terminals.ipynb ├── text_editors.ipynb ├── tutorial_one_time_setup.ipynb ├── tutorial_queue_account.ipynb ├── tutorial_specific.ipynb ├── unix-cheatsheet.ipynb └── unix.ipynb ├── sourcemods ├── add_fields_cam.ipynb ├── exercises │ ├── exercise_add_field.ipynb │ └── exercise_rain_threshold.ipynb ├── exercises_overview.ipynb ├── overview.ipynb └── sourcemods.ipynb └── troubleshooting ├── debugging_flag.ipynb ├── exercises └── troubleshooting_cam.ipynb ├── exercises_overview.ipynb ├── log_files.ipynb └── troubleshooting.ipynb /.github/workflows/gh-page_builder.yml: -------------------------------------------------------------------------------- 1 | name: JupyterBook 2 | #name: Build and Publish JupyterBook to GitHub Pages 3 | # 4 | on: 5 | [push] 6 | 7 | jobs: 8 | build: 9 | if: github.repository == 'NCAR/CESM-Tutorial' 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Set up Python 14 | uses: actions/setup-python@v4 15 | with: 16 | python-version: 3.9 17 | - name: Install Python dependencies 18 | run: | 19 | sudo apt-get install python3-pip 20 | pip install ghp-import 21 | pip install jupyter-book 22 | PATH="${PATH}:${HOME}/.local/bin" 23 | - name: Build book HTML 24 | run: | 25 | jupyter-book build . 26 | - name: Push _build/html to gh-pages 27 | run: | 28 | sudo chown -R $(whoami):$(whoami) . 29 | git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" 30 | git config --global user.name "$GITHUB_ACTOR" 31 | git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" 32 | ls -lrt 33 | ghp-import -n -p -f _build/html 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #git config --global core.excludesfile '~/.gitignore' 2 | #echo '.ipynb_checkpoints' >> ~/.gitignore 3 | 4 | #Ignore Jupyter notebook checkpoints 5 | .ipynb_checkpoints 6 | 7 | #Ignore build directories 8 | _build 9 | 10 | #Ignore text editor file backups 11 | *~ 12 | 13 | #Ignore dask worker files 14 | dask-worker.* 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 National Center for Atmospheric Research 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Welcome to the [CESM Tutorial](https://ncar.github.io/CESM-Tutorial/README.html) 3 | 4 |
5 | 6 | In 1983 NCAR created the _Community Climate Model_ (CCM) as a freely available global atmosphere model for use by the climate research community. The scope of CCM development continued to expand and in 1994 NCAR scientists released the _Climate System Model_ (CSM), a global model that included component models for the atmosphere, land surface, ocean, and sea-ice, communicating through a central coupler component. To recognize the broad community of users and sponsors contributing to this effort, the CSM was renamed the _Community Climate System Model_ (CCSM). The CCSM model evolved to include ice sheet and biogeochemical modeling and was renamed the _Community Earth System Model_ (CESM) in 2013. 7 | 8 | This repository includes materials designed to be an introduction to running the CESM. The materials were developed to support the CESM tutorial and serve as reference documentation for all CESM users. 9 | 10 | ## Goals of This Tutorial 11 | 12 | **Through this online tutorial you will learn how to run the CESM model, modify the model experiments, and use the model output. These tutorial materials are designed for the CESM version 2 (CESM2)** 13 | 14 | ## Yearly In-Person Tutorials 15 | 16 | The CESM tutorial was started in 2010 and is typically offered as an in-person summer workshop. If you are interested in attending the tutorial, please see the [CESM webpage](https://www.cesm.ucar.edu/events/tutorials) for the most up to date information about when the tutorial will next be offered in Boulder, Colorado and the timeline for applying. 17 | 18 | ## CESM Project Funding 19 | 20 | This material is based upon work supported by the National Center for Atmospheric Research (NCAR), which is a major facility sponsored by the National Science Foundation (NSF) under Cooperative Agreement No. 1852977. Staff time on this project was also supported by the Climate and Global Dynamics (CGD) laboratory. 21 | 22 | ## Acknowledgements 23 | 24 | A number of people have been critical to this effort, including: 25 | - Cecile Hannay, David Bailey, Peter Lawrence, Hui Li, Sophia Macarewich, Jesse Nusbaumer, Adam Phillips, and Kate Thayer-Calder who serve on the CESM tutorial committee and put together the tutorial materials. 26 | - Alice DuVivier, Brian Dobbins, Gunter Leguy, and Gustavo Marques, who helped test materials and have contributed substantially. 27 | - Elizabeth Faircloth, who supports the CESM program administratively and without whom everything would probably fall apart. 28 | - David Lawrence, who supported this effort as CESM chief scientist. 29 | - Testers, others... 30 | 31 |
32 | 33 |
34 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Book settings 2 | # Learn more at https://jupyterbook.org/customize/config.html 3 | 4 | title: CESM Tutorial 5 | author: NCAR/CGD Staff 6 | logo: images/ncar_logo.png 7 | 8 | sphinx: 9 | config: 10 | html_show_copyright: false 11 | 12 | # Force re-execution of notebooks on each build. 13 | # See https://jupyterbook.org/content/execute.html 14 | #execute: 15 | # execute_notebooks: force 16 | 17 | execute: 18 | execute_notebooks: 'off' 19 | 20 | 21 | # Define the name of the latex output file for PDF builds 22 | latex: 23 | latex_documents: 24 | targetname: tutorial_book.tex 25 | 26 | # Add a bibtex file so that we can create citations 27 | #bibtex_bibfiles: 28 | # - references.bib 29 | 30 | # Information about where the book exists on the web 31 | repository: 32 | url: https://github.com/NCAR/CESM-Tutorial # Online location of your book 33 | path_to_book: docs # Optional path to your book, relative to the repository root 34 | branch: main # Which branch of the repository should be used when creating links (optional) 35 | 36 | # Add GitHub buttons to your book 37 | # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository 38 | html: 39 | use_repository_button: true 40 | use_edit_page_button : false 41 | use_issues_button : true 42 | home_page_in_navbar : true 43 | use_multitoc_numbering : true 44 | extra_navbar : "" 45 | 46 | 47 | launch_buttons: 48 | binder : false 49 | binderhub : false 50 | #binderhub_url: https://mybinder.org 51 | jupyterhub : false 52 | thebe : false 53 | colab : false 54 | 55 | 56 | # Launch button settings 57 | #launch_buttons: 58 | # notebook_interface : jupyterlab # The interface interactive links will activate ["classic", "jupyterlab"] 59 | # binderhub_url : https://mybinder.org # The URL of the BinderHub (e.g., https://mybinder.org) 60 | # jupyterhub_url : "" # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu) 61 | # thebe : false # Add a thebe button to pages (requires the repository to run on Binder) 62 | # colab_url : "" # The URL of Google Colab (https://colab.research.google.com) 63 | -------------------------------------------------------------------------------- /images/basics/CESM2_Code_Components_List.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Code_Components_List.png -------------------------------------------------------------------------------- /images/basics/CESM2_Create_Clone_Continued.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Create_Clone_Continued.png -------------------------------------------------------------------------------- /images/basics/CESM2_Create_Newcase_Command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Create_Newcase_Command.png -------------------------------------------------------------------------------- /images/basics/CESM2_Create_Newcase_Compset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Create_Newcase_Compset.png -------------------------------------------------------------------------------- /images/basics/CESM2_Create_Newcase_Resolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Create_Newcase_Resolution.png -------------------------------------------------------------------------------- /images/basics/CESM2_Events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Events.png -------------------------------------------------------------------------------- /images/basics/CESM2_Workspaces_Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Workspaces_Code.png -------------------------------------------------------------------------------- /images/basics/CESM2_Workspaces_Detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_Workspaces_Detail.png -------------------------------------------------------------------------------- /images/basics/CESM2_case_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_case_build.png -------------------------------------------------------------------------------- /images/basics/CESM2_case_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_case_setup.png -------------------------------------------------------------------------------- /images/basics/CESM2_case_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_case_submit.png -------------------------------------------------------------------------------- /images/basics/CESM2_create_newcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_create_newcase.png -------------------------------------------------------------------------------- /images/basics/CESM2_short_term_archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/CESM2_short_term_archive.png -------------------------------------------------------------------------------- /images/basics/NCVIEW_App_Window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/NCVIEW_App_Window.png -------------------------------------------------------------------------------- /images/basics/NCVIEW_Jan0001_PRECC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/NCVIEW_Jan0001_PRECC.png -------------------------------------------------------------------------------- /images/basics/NCVIEW_Jan0001_PRECL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/NCVIEW_Jan0001_PRECL.png -------------------------------------------------------------------------------- /images/basics/NCVIEW_Jan0001_TS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/basics/NCVIEW_Jan0001_TS.png -------------------------------------------------------------------------------- /images/challenge/CAMchem_compsets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/CAMchem_compsets.png -------------------------------------------------------------------------------- /images/challenge/Fcompset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/Fcompset.png -------------------------------------------------------------------------------- /images/challenge/GEOV-latlon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/GEOV-latlon.png -------------------------------------------------------------------------------- /images/challenge/GEOV-zonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/GEOV-zonal.png -------------------------------------------------------------------------------- /images/challenge/Precip_isotope_Cartoon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/Precip_isotope_Cartoon.jpg -------------------------------------------------------------------------------- /images/challenge/Tcompset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/Tcompset.png -------------------------------------------------------------------------------- /images/challenge/WACCM-CAMchem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/WACCM-CAMchem.png -------------------------------------------------------------------------------- /images/challenge/WACCM_compsets1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/WACCM_compsets1.png -------------------------------------------------------------------------------- /images/challenge/WACCM_compsets2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/WACCM_compsets2.png -------------------------------------------------------------------------------- /images/challenge/bgc_table_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/bgc_table_1.png -------------------------------------------------------------------------------- /images/challenge/bgc_table_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/bgc_table_2.png -------------------------------------------------------------------------------- /images/challenge/cam_SST_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/cam_SST_diff.png -------------------------------------------------------------------------------- /images/challenge/cam_topo_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/cam_topo_diff.png -------------------------------------------------------------------------------- /images/challenge/cape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/cape.png -------------------------------------------------------------------------------- /images/challenge/chemistry-mechanism-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/chemistry-mechanism-example.png -------------------------------------------------------------------------------- /images/challenge/chemistry-ozone-reaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/chemistry-ozone-reaction.png -------------------------------------------------------------------------------- /images/challenge/chemistry-ozone-reaction_orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/chemistry-ozone-reaction_orig.png -------------------------------------------------------------------------------- /images/challenge/chemistry-preprocessor-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/chemistry-preprocessor-info.png -------------------------------------------------------------------------------- /images/challenge/chemistry-rundir-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/chemistry-rundir-example.png -------------------------------------------------------------------------------- /images/challenge/cice_rsnw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/cice_rsnw.png -------------------------------------------------------------------------------- /images/challenge/cice_rsnw2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/cice_rsnw2.png -------------------------------------------------------------------------------- /images/challenge/gcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/gcase.png -------------------------------------------------------------------------------- /images/challenge/gecocase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/gecocase.png -------------------------------------------------------------------------------- /images/challenge/geov-2files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/geov-2files.png -------------------------------------------------------------------------------- /images/challenge/geov-difference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/geov-difference.png -------------------------------------------------------------------------------- /images/challenge/geov-openingfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/geov-openingfile.png -------------------------------------------------------------------------------- /images/challenge/i2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/i2000.png -------------------------------------------------------------------------------- /images/challenge/ihist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/ihist.png -------------------------------------------------------------------------------- /images/challenge/overflows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/challenge/overflows.png -------------------------------------------------------------------------------- /images/diagnostics/cam/advanced_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/advanced_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_5.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_6.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_7.png -------------------------------------------------------------------------------- /images/diagnostics/cam/basics_plot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cam/basics_plot_8.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_5.png -------------------------------------------------------------------------------- /images/diagnostics/cice/advanced_plot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/advanced_plot_6.png -------------------------------------------------------------------------------- /images/diagnostics/cice/basics_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/basics_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/cice/basics_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/basics_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/cice/basics_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/basics_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/cice/basics_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/cice/basics_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_10.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_5.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_6.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_7.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_8.png -------------------------------------------------------------------------------- /images/diagnostics/clm_ctsm/basics_plot_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/clm_ctsm/basics_plot_9.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_1.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_2.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_3.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_4.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_5.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_6.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_7.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_8.png -------------------------------------------------------------------------------- /images/diagnostics/login/Diagnostics_duo_pcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/login/Diagnostics_duo_pcode.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_5.png -------------------------------------------------------------------------------- /images/diagnostics/mom/basics_plot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/basics_plot_6.png -------------------------------------------------------------------------------- /images/diagnostics/mom/transport_sections_mom6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/mom/transport_sections_mom6.png -------------------------------------------------------------------------------- /images/diagnostics/pop/advanced_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/advanced_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/pop/advanced_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/advanced_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_1.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_10.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_2.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_3.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_4.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_5.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_6.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_7.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_8.png -------------------------------------------------------------------------------- /images/diagnostics/pop/basics_plot_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/diagnostics/pop/basics_plot_9.png -------------------------------------------------------------------------------- /images/intro/CESM2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM2.png -------------------------------------------------------------------------------- /images/intro/CESM2_CIME_Infrastructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM2_CIME_Infrastructure.png -------------------------------------------------------------------------------- /images/intro/CESM2_Discuss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM2_Discuss.png -------------------------------------------------------------------------------- /images/intro/CESM2_MCT_Coupling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM2_MCT_Coupling.png -------------------------------------------------------------------------------- /images/intro/CESM_NUOPC_Coupling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM_NUOPC_Coupling.png -------------------------------------------------------------------------------- /images/intro/CESM_exp_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM_exp_1.png -------------------------------------------------------------------------------- /images/intro/CESM_exp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM_exp_2.png -------------------------------------------------------------------------------- /images/intro/CESM_exp_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM_exp_3.png -------------------------------------------------------------------------------- /images/intro/CESM_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/CESM_github.png -------------------------------------------------------------------------------- /images/intro/clim_data_gateway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/clim_data_gateway.png -------------------------------------------------------------------------------- /images/intro/clim_data_guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/clim_data_guide.png -------------------------------------------------------------------------------- /images/intro/light_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/intro/light_dark_mode.png -------------------------------------------------------------------------------- /images/modifications/CESM2_xml_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/modifications/CESM2_xml_files.png -------------------------------------------------------------------------------- /images/namelist/CESM_directories_and_namelists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/CESM_directories_and_namelists.png -------------------------------------------------------------------------------- /images/namelist/Lwcf_dcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/Lwcf_dcs.png -------------------------------------------------------------------------------- /images/namelist/dcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/dcs.png -------------------------------------------------------------------------------- /images/namelist/namelist_var_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/namelist_var_search.png -------------------------------------------------------------------------------- /images/namelist/ncview_diff_dcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/ncview_diff_dcs.png -------------------------------------------------------------------------------- /images/namelist/nhtfrq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/namelist/nhtfrq.png -------------------------------------------------------------------------------- /images/ncar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/ncar_logo.png -------------------------------------------------------------------------------- /images/prereqs/modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/prereqs/modules.png -------------------------------------------------------------------------------- /images/resources/CESM2_Porting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/CESM2_Porting.png -------------------------------------------------------------------------------- /images/resources/CESM2_github_CESM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/CESM2_github_CESM.png -------------------------------------------------------------------------------- /images/resources/CESM2_github_ESCOMP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/CESM2_github_ESCOMP.png -------------------------------------------------------------------------------- /images/resources/CESM2_github_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/CESM2_github_main.png -------------------------------------------------------------------------------- /images/resources/ncdump_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/ncdump_example.png -------------------------------------------------------------------------------- /images/resources/ncview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/ncview.png -------------------------------------------------------------------------------- /images/resources/term_jupyter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/term_jupyter_1.png -------------------------------------------------------------------------------- /images/resources/term_jupyter_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/term_jupyter_2.png -------------------------------------------------------------------------------- /images/resources/term_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/term_mac.png -------------------------------------------------------------------------------- /images/resources/term_pc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/resources/term_pc.png -------------------------------------------------------------------------------- /images/sourcemods/CESM_directories_and_SourceMods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/sourcemods/CESM_directories_and_SourceMods.png -------------------------------------------------------------------------------- /images/sourcemods/CESM_directories_and_namelists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/sourcemods/CESM_directories_and_namelists.png -------------------------------------------------------------------------------- /images/sourcemods/ncview_T750-T500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/sourcemods/ncview_T750-T500.png -------------------------------------------------------------------------------- /images/troubleshooting/CESM_directories_and_log_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCAR/CESM-Tutorial/247a0ddc45f36f1614c8c928c6cc6f393341648d/images/troubleshooting/CESM_directories_and_log_files.png -------------------------------------------------------------------------------- /notebooks/basics/basics_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b2cd974a-dfbb-4937-8ed0-ab87ab60f1ef", 6 | "metadata": {}, 7 | "source": [ 8 | "# Basics" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "9db9d54e-ef78-44ef-a003-4ddd8a416317", 14 | "metadata": {}, 15 | "source": [ 16 | "The CESM Model is developed around a structured workflow. The first step of this workflow is to set up your workspace, which is usually a one-time task. After setting up your workspace, a basic CESM simulation can be run with only four commands. This section will cover these steps and enable you to complete your first CESM run." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "e2abf5cb-c507-408e-8f2a-2fd12934873d", 22 | "metadata": {}, 23 | "source": [ 24 | "## Workflow Elements" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "acfe09a5-e3ee-457a-a328-bde665cfe761", 30 | "metadata": { 31 | "jp-MarkdownHeadingCollapsed": true, 32 | "tags": [] 33 | }, 34 | "source": [ 35 | "
\n", 36 | "\n", 37 | "- Set up workspace (one time setup)\n", 38 | " - **``Download``** the CESM code\n", 39 | " - **``Create or Locate ``** an **``Input Data``** Root Directory\n", 40 | " - Possibly **``Porting``** if not on a setup machine\n", 41 | "- Creating, Running and Reviewing a Case\n", 42 | " - **``Create``** a new case\n", 43 | " - **``Invoke``** `case.setup`\n", 44 | " - **``Build``** the executable with `case.build`\n", 45 | " - **``Run``** the model with `case.submit`\n", 46 | " - **``Review``** output data\n", 47 | "\n", 48 | "
" 49 | ] 50 | }, 51 | { 52 | "cell_type": "markdown", 53 | "id": "0c07b51d-f999-4737-9739-3ea989f20802", 54 | "metadata": {}, 55 | "source": [ 56 | "## Setting up your environment" 57 | ] 58 | }, 59 | { 60 | "cell_type": "markdown", 61 | "id": "9d6954eb-3505-4a58-b6fa-bea7047c63cf", 62 | "metadata": {}, 63 | "source": [ 64 | "Every time you log onto the NCAR HPC you want to ensure you have the correct modules loaded. Please refer to the NCAR supercomputer section under Resources to make sure you are setting up your environment properly. \n", 65 | "\n", 66 | "**YOU SHOULD ENSURE YOU CHECK THIS EVERY TIME YOU ARE BUILDING A NEW CASE**\n", 67 | "\n" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": null, 73 | "id": "523165e7-728b-4305-b9f7-4e6ee530a27d", 74 | "metadata": {}, 75 | "outputs": [], 76 | "source": [] 77 | }, 78 | { 79 | "cell_type": "code", 80 | "execution_count": null, 81 | "id": "715674b2-a858-49ae-b044-7f7fc61a750c", 82 | "metadata": {}, 83 | "outputs": [], 84 | "source": [] 85 | } 86 | ], 87 | "metadata": { 88 | "kernelspec": { 89 | "display_name": "Python 3 (ipykernel)", 90 | "language": "python", 91 | "name": "python3" 92 | }, 93 | "language_info": { 94 | "codemirror_mode": { 95 | "name": "ipython", 96 | "version": 3 97 | }, 98 | "file_extension": ".py", 99 | "mimetype": "text/x-python", 100 | "name": "python", 101 | "nbconvert_exporter": "python", 102 | "pygments_lexer": "ipython3", 103 | "version": "3.10.13" 104 | }, 105 | "toc-showcode": false 106 | }, 107 | "nbformat": 4, 108 | "nbformat_minor": 5 109 | } 110 | -------------------------------------------------------------------------------- /notebooks/basics/cesm_workflow.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# CESM Workflow" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "CESM has been designed to be easy to use. Once you have downloaded the CESM code, a CESM `case` can be run with a set of 4 commands. \n", 15 | "\n", 16 | "*Note: In CESM jargon, a case refers to a specific instance of a model simulation.*" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "metadata": {}, 22 | "source": [ 23 | "
\n", 24 | "\n", 25 | "1) Create a new case using `create_newcase`\n", 26 | "2) Set up the case by invoking `case.setup`\n", 27 | "3) Build the executable using `case.build`\n", 28 | "4) Run your case using `case.submit`\n", 29 | " \n", 30 | "
\n" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "metadata": {}, 36 | "source": [ 37 | "The following sections will go into more detail about these 4 commands and also provide information about how to check your job status or create a clone of a previous case." 38 | ] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "metadata": {}, 43 | "source": [ 44 | "### More information" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": {}, 50 | "source": [ 51 | "More detailed information on the CESM2 Workflow is documented in the following links and can be read in detail at a later time." 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": { 57 | "tags": [] 58 | }, 59 | "source": [ 60 | "
\n", 61 | "\n", 62 | "[CESM2 release](https://escomp.github.io/CESM/release-cesm2/)\n", 63 | " \n", 64 | "[CIME](https://esmci.github.io/cime/versions/master/html/index.html)\n", 65 | "\n", 66 | "
" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": null, 72 | "metadata": {}, 73 | "outputs": [], 74 | "source": [] 75 | } 76 | ], 77 | "metadata": { 78 | "kernelspec": { 79 | "display_name": "Bash", 80 | "language": "bash", 81 | "name": "bash" 82 | }, 83 | "language_info": { 84 | "codemirror_mode": "shell", 85 | "file_extension": ".sh", 86 | "mimetype": "text/x-sh", 87 | "name": "bash" 88 | } 89 | }, 90 | "nbformat": 4, 91 | "nbformat_minor": 4 92 | } 93 | -------------------------------------------------------------------------------- /notebooks/basics/cesm_workflow/create_clone.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "id": "d6d5e586-3e55-40e2-89ac-43cf2a986a92", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 14 | "metadata": {}, 15 | "source": [ 16 | "# Create Clone (Advanced)" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "0848a34c-67f8-4727-b8e5-8e9246927d2b", 22 | "metadata": {}, 23 | "source": [ 24 | "The tool that clones a new case based on an existing case is `create_clone`. This tool is located in the `$SRCROOT` directory under the `cime/scripts` directory." 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "aa0ffc44-9f53-4b02-bdaf-4035ff768cdd", 30 | "metadata": {}, 31 | "source": [ 32 | "Things that **are** copied into the new case are:\n", 33 | "- Most `env_*.xml` settings (not all!)\n", 34 | "- user_nl_xxx files\n", 35 | "- Macros\n", 36 | "- SourceMods\n", 37 | "- Batch system files\n", 38 | "- README.case\n", 39 | "\n", 40 | "Things that **are not** copied into the new case are:\n", 41 | "- Logs\n", 42 | "- Timing files" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "id": "76ae1e16-f343-4149-a82b-a75f5bb94fa9", 48 | "metadata": {}, 49 | "source": [ 50 | "## Command Syntax" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "id": "404c5149-3a66-4677-9dc5-19f4f2d0a08b", 56 | "metadata": {}, 57 | "source": [ 58 | "
\n", 59 | "\n", 60 | "Go to the `cime/scripts` directory in the CESM code\n", 61 | "```\n", 62 | "cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts/\n", 63 | "```\n", 64 | " \n", 65 | "
\n", 66 | " \n", 67 | "Example of basic `./create_clone` syntax to create CASE2:
\n", 68 | " \n", 69 | "```\n", 70 | "./create_clone --clone /glade/u/home/$USER/cases/CASE1 --case /glade/u/home/$USER/cases/CASE2\n", 71 | "```\n", 72 | " \n", 73 | "
\n" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "id": "d5d86794-b242-4f85-9b9c-4e1fcf235d46", 79 | "metadata": {}, 80 | "source": [ 81 | "**Notes:**\n", 82 | "- Do not use `cp` or `cp -R` to copy case directories to new experiments. \n", 83 | "- Document changes in CaseStatus and README.case to keep track of the changes you make.\n", 84 | "- If you are making many cases with only a small changes, you can script the steps into a python or shell script of your choice to make the process more automated and less prone to human error." 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": null, 90 | "id": "839f45aa-3c6b-4170-b913-a6eb9da8feb4", 91 | "metadata": {}, 92 | "outputs": [], 93 | "source": [] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3 (ipykernel)", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.10.13" 113 | } 114 | }, 115 | "nbformat": 4, 116 | "nbformat_minor": 5 117 | } 118 | -------------------------------------------------------------------------------- /notebooks/basics/cesm_workflow/model_output.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "683d9e77-d700-4f75-b3f0-eb813657351b", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# Model Output\n", 11 | "\n" 12 | ] 13 | }, 14 | { 15 | "cell_type": "markdown", 16 | "id": "d8e6525b-31d9-450d-a3b9-e3b435fc231a", 17 | "metadata": {}, 18 | "source": [ 19 | "If the model run is successful, the CESM netcdf output history files are automatically moved to a short term archive (`$DOUT_S_ROOT`) by `case.st_archive`." 20 | ] 21 | }, 22 | { 23 | "cell_type": "markdown", 24 | "id": "d62c7e4b-86e0-40ec-8dfa-5744c3884bc0", 25 | "metadata": {}, 26 | "source": [ 27 | "![Case Submit Image](../../../images/basics/CESM2_short_term_archive.png)\n", 28 | "\n", 29 | "\n", 30 | "For the current tutorial on derecho, the paths are:\n", 31 | "- `$SRCROOT` = `/glade/u/home/$USER/code/my_cesm_code`\n", 32 | "- `$CASEROOT` = `/glade/u/home/$USER/cases/$CASE`\n", 33 | "- `$EXEROOT` =`/glade/derecho/scratch/$USER/$CASE/bld` \n", 34 | "- `$RUNDIR` =`/glade/derecho/scratch/$USER/$CASE/run` \n", 35 | "- `$DOUT_S_ROOT` =`/glade/derecho/scratch/$USER/archive/$CASE` " 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "id": "9be4ca8e-8483-48b1-80e7-821b8627eead", 41 | "metadata": {}, 42 | "source": [ 43 | "**Notes:**\n", 44 | "- If a model run was unsuccessful the output remains in the Run Directory (`$RUNDIR`) and the short term archive is not created.\n", 45 | "- Both `$RUNDIR` and `$DOUT_S_ROOT` are in the NCAR HPC scratch space. This space is scrubbed and files deleted after a number of days. Thus, it is a good idea to move your model output files from the short term archive to a more permanent location as soon as you are able." 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": null, 51 | "id": "b026c623-617e-42d1-a3d1-4f6fce55bd5f", 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [] 55 | } 56 | ], 57 | "metadata": { 58 | "kernelspec": { 59 | "display_name": "Python 3 (ipykernel)", 60 | "language": "python", 61 | "name": "python3" 62 | }, 63 | "language_info": { 64 | "codemirror_mode": { 65 | "name": "ipython", 66 | "version": 3 67 | }, 68 | "file_extension": ".py", 69 | "mimetype": "text/x-python", 70 | "name": "python", 71 | "nbconvert_exporter": "python", 72 | "pygments_lexer": "ipython3", 73 | "version": "3.10.13" 74 | } 75 | }, 76 | "nbformat": 4, 77 | "nbformat_minor": 5 78 | } 79 | -------------------------------------------------------------------------------- /notebooks/basics/code_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8c2d8431-0e66-4597-96bb-858874da9235", 6 | "metadata": {}, 7 | "source": [ 8 | "# CESM code" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "56f53601-ba7c-41b0-8d9e-d56f67689734", 14 | "metadata": {}, 15 | "source": [ 16 | "Before you can start running the CESM model you must first download CESM from Github and set up your Workspace. This exercise is estimated to take around 30-60 minutes, depending on your previous experience with NCAR HPC and Github." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "9dcb3c4e-df54-4e99-892c-8ce99ea35410", 22 | "metadata": {}, 23 | "source": [ 24 | "## Learning Objectives" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "f7a8cc2d-e2eb-4f06-a173-9ca19a1dc383", 30 | "metadata": {}, 31 | "source": [ 32 | "
\n", 33 | " \n", 34 | "- Download CESM to your workspace with Git commands.\n", 35 | "- Explore your CESM workspace for CESM Code.\n", 36 | " \n", 37 | "
" 38 | ] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "id": "89b36bf1-182b-4460-af55-6f05b7a4a086", 43 | "metadata": {}, 44 | "source": [ 45 | "If you are unfamiliar with logging into NCAR HPC resources, please go back to this [section](https://ncar.github.io/CESM-Tutorial/notebooks/prereqs/prereqs_overview.html#ncar-high-performance-computing-hpc) to learn more about logging into derecho.\n", 46 | "\n", 47 | "Github and Git software are used as development and management tools for supporting and distributing CESM. This tutorial is not intended to be a Github or Git software tutorial, so we will provide the basic git commands needed to download CESM. If you want to learn more about using these tools go to this [section](https://ncar.github.io/CESM-Tutorial/notebooks/resources/github.html#github).\n" 48 | ] 49 | }, 50 | { 51 | "cell_type": "code", 52 | "execution_count": null, 53 | "id": "729b1035-407c-4a7a-8da2-97402230fc75", 54 | "metadata": {}, 55 | "outputs": [], 56 | "source": [] 57 | } 58 | ], 59 | "metadata": { 60 | "kernelspec": { 61 | "display_name": "Python 3 (ipykernel)", 62 | "language": "python", 63 | "name": "python3" 64 | }, 65 | "language_info": { 66 | "codemirror_mode": { 67 | "name": "ipython", 68 | "version": 3 69 | }, 70 | "file_extension": ".py", 71 | "mimetype": "text/x-python", 72 | "name": "python", 73 | "nbconvert_exporter": "python", 74 | "pygments_lexer": "ipython3", 75 | "version": "3.10.13" 76 | } 77 | }, 78 | "nbformat": 4, 79 | "nbformat_minor": 5 80 | } 81 | -------------------------------------------------------------------------------- /notebooks/basics/exercises_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8c2d8431-0e66-4597-96bb-858874da9235", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise Overview \n", 9 | "\n", 10 | "\n", 11 | "## Learning Goals:\n", 12 | "\n", 13 | "- The student will successfully set up and run their first (short) CESM simulation.\n", 14 | "- This lab exercise is designed to build off the one-time setup section and uses the CESM workflow information presented. \n", 15 | "\n", 16 | "## Exercise overview:\n", 17 | "\n", 18 | "By then end of this exercise you will have:\n", 19 | "- created, setup, updated, built, run, and examined the output of a standard B1850 control case\n", 20 | "\n", 21 | "**You should not proceed in working on this exercise until you have successfully [set up your workspaces](https://ncar.github.io/CESM-Tutorial/notebooks/basics/cesm_workspaces.html) and [downloaded the CESM code](https://ncar.github.io/CESM-Tutorial/notebooks/basics/code/git_download_cesm.html). You must have have a `cases` directory and have successfully downloaded CESM using git to begin this exercise.**\n" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "e062147c-f8f3-4a21-877e-b1c5755c6cad", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [] 31 | } 32 | ], 33 | "metadata": { 34 | "kernelspec": { 35 | "display_name": "Python 3 (ipykernel)", 36 | "language": "python", 37 | "name": "python3" 38 | }, 39 | "language_info": { 40 | "codemirror_mode": { 41 | "name": "ipython", 42 | "version": 3 43 | }, 44 | "file_extension": ".py", 45 | "mimetype": "text/x-python", 46 | "name": "python", 47 | "nbconvert_exporter": "python", 48 | "pygments_lexer": "ipython3", 49 | "version": "3.10.13" 50 | } 51 | }, 52 | "nbformat": 4, 53 | "nbformat_minor": 5 54 | } 55 | -------------------------------------------------------------------------------- /notebooks/challenge/bgc/bgc_exercise_1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# 1: Set up a BGC case" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "f4238578-b8ac-4e94-aa01-2aac2c42a9dc", 14 | "metadata": {}, 15 | "source": [ 16 | "We will create two different cases and compare the case directories. We want to check if the differences make sense. You will **NOT** run the model in this challenge exercise." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "6457c1d2-0530-435d-ae27-d0f1eeabe583", 22 | "metadata": {}, 23 | "source": [ 24 | "
\n", 25 | "Exercise: Set up a BGC control case

\n", 26 | " \n", 27 | "Create a case called **b_1850** using the compset ``B1850`` at ``f19_g17`` resolution. \n", 28 | "\n", 29 | "Create a case called **b_1850_bprp** using the compset ``B1850_BPRP`` at ``f19_g17`` resolution.\n", 30 | "- What happens when you run create_newcase? Follow the instructions to get this working, but don't do it for real unless you know what you're doing.\n", 31 | "\n", 32 | "Run case.setup and preview_namelists for each case.\n", 33 | "- What changes occur when the carbon cycle is made prognostic?\n", 34 | "\n", 35 | "
\n" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "id": "5efef9de-221c-411d-b209-23e53668a101", 41 | "metadata": {}, 42 | "source": [ 43 | "## POP BGC Specific Output" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "id": "5d25903c-cd61-42fe-9631-04517ac35103", 49 | "metadata": {}, 50 | "source": [ 51 | "**ocn/hist/$CASE.pop.h.ecosys.nday1.????-??-??.nc**\n", 52 | "- selected ocean ecosys variables at daily resolution\n", 53 | "- surface flux related, productivity, and functional group vertical integrals.\n", 54 | "\n", 55 | "**ocn/hist/$CASE.pop.h.ecosys.nyear1.????.nc**\n", 56 | "- selected three dimensional ocean ecosys tracer budget terms." 57 | ] 58 | } 59 | ], 60 | "metadata": { 61 | "kernelspec": { 62 | "display_name": "Python 3 (ipykernel)", 63 | "language": "python", 64 | "name": "python3" 65 | }, 66 | "language_info": { 67 | "codemirror_mode": { 68 | "name": "ipython", 69 | "version": 3 70 | }, 71 | "file_extension": ".py", 72 | "mimetype": "text/x-python", 73 | "name": "python", 74 | "nbconvert_exporter": "python", 75 | "pygments_lexer": "ipython3", 76 | "version": "3.9.12" 77 | } 78 | }, 79 | "nbformat": 4, 80 | "nbformat_minor": 5 81 | } 82 | -------------------------------------------------------------------------------- /notebooks/challenge/cam-chem_waccm/visualization.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# 4: Visualization option with GEOV" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "\n", 15 | "
\n", 16 | "Visualization with GEOV

\n", 17 | " \n", 18 | "CESM history files are in standard netCDF format, and may be analyzed with standard\n", 19 | "analysis tools, including Matlab, Python, IDL, NCL, and NCO and ncview.\n", 20 | " \n", 21 | "GEOV is an IDL-based viewer with a graphical user interface (GUI) for geophysical history files created by NCAR's CAM, WACCM and MOZART models. GEOV can be downloaded from the WACCM webpage
\n", 22 | "http://www.cesm.ucar.edu/working_groups/Whole-Atmosphere/code-release.html
\n", 23 | "It is useful for quick viewing and comparisons.\n", 24 | " \n", 25 | "**#To use GEOV on derecho/casper:**\n", 26 | " \n", 27 | "Add the idl module:
\n", 28 | "``module load idl``
\n", 29 | " \n", 30 | "Then go to the location of GEOV and start it\n", 31 | "```\n", 32 | "cd /glade/u/home/fvitt/geov4.8e\n", 33 | "idl geov\n", 34 | "```\n", 35 | " \n", 36 | "Then you can use the GEOV interface to find files and explore the model output. Some examples of using the GEOV interface are below:\n", 37 | "\n", 38 | "![GEOV opening](../../../images/challenge/geov-openingfile.png)\n", 39 | "

Figure 1: Example using GEOV to browse to a file to open.

\n", 40 | " \n", 41 | "![GEOV 2 files](../../../images/challenge/geov-2files.png)\n", 42 | "

Figure 2: Example using GEOV to plot surface layer ozone for two files.

\n", 43 | " \n", 44 | "![GEOV difference](../../../images/challenge/geov-difference.png)\n", 45 | "

Figure 3: Example using GEOV to look at zonal average difference in model ozone (left).

\n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | "If you quit GEOV, you will need to type ``exit`` to also exit IDL.\n", 50 | "\n", 51 | " \n", 52 | "
\n" 53 | ] 54 | }, 55 | { 56 | "cell_type": "code", 57 | "execution_count": null, 58 | "metadata": {}, 59 | "outputs": [], 60 | "source": [] 61 | } 62 | ], 63 | "metadata": { 64 | "kernelspec": { 65 | "display_name": "Python 3", 66 | "language": "python", 67 | "name": "python3" 68 | }, 69 | "language_info": { 70 | "codemirror_mode": { 71 | "name": "ipython", 72 | "version": 3 73 | }, 74 | "file_extension": ".py", 75 | "mimetype": "text/x-python", 76 | "name": "python", 77 | "nbconvert_exporter": "python", 78 | "pygments_lexer": "ipython3", 79 | "version": "3.7.6" 80 | } 81 | }, 82 | "nbformat": 4, 83 | "nbformat_minor": 5 84 | } 85 | -------------------------------------------------------------------------------- /notebooks/challenge/challenge.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Challenge Exercises" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "33e420f8-dca3-47ed-9999-17da427c6443", 14 | "metadata": {}, 15 | "source": [ 16 | "This section of the CESM tutorial is designed to test your understanding of the CESM model that you have learned about in previous sections. \n", 17 | "\n", 18 | "We provide challenge exercises for the individual model components for you to test yourself. \n", 19 | "\n", 20 | "Feel free to try all the challenge exercises or just the one(s) that are relevant for the CESM components of interest to you." 21 | ] 22 | } 23 | ], 24 | "metadata": { 25 | "kernelspec": { 26 | "display_name": "Python 3 (ipykernel)", 27 | "language": "python", 28 | "name": "python3" 29 | }, 30 | "language_info": { 31 | "codemirror_mode": { 32 | "name": "ipython", 33 | "version": 3 34 | }, 35 | "file_extension": ".py", 36 | "mimetype": "text/x-python", 37 | "name": "python", 38 | "nbconvert_exporter": "python", 39 | "pygments_lexer": "ipython3", 40 | "version": "3.9.12" 41 | } 42 | }, 43 | "nbformat": 4, 44 | "nbformat_minor": 5 45 | } 46 | -------------------------------------------------------------------------------- /notebooks/challenge/clm_ctsm/clm_exercise_1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# 1: Control case" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "6457c1d2-0530-435d-ae27-d0f1eeabe583", 14 | "metadata": {}, 15 | "source": [ 16 | "
\n", 17 | "Exercise: Run a control case

\n", 18 | " \n", 19 | "Create a case called **i.day5.a** using the compset `I2000Clm50Sp` at `f09_g17_gl4` resolution. \n", 20 | " \n", 21 | "Set the run length to **5 days**. \n", 22 | "\n", 23 | "Build and run the model. Since this is a control case, we want to build it \"out of the box\" without any modifications. \n", 24 | "\n", 25 | "
\n" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "id": "f639e182-f48a-431c-a594-9c34323417eb", 31 | "metadata": {}, 32 | "source": [ 33 | "\n", 34 | "
\n", 35 | "
\n", 36 | "Click here for the solution
\n", 37 | " \n", 38 | "Create a new case i.day5.a with the command:\n", 39 | "```\n", 40 | "cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts\n", 41 | "./create_newcase --case ~/cases/i.day5.a --compset I2000Clm50Sp --res f09_g17_gl4 --run-unsupported\n", 42 | "```\n", 43 | "
\n", 44 | "\n", 45 | "Case setup:\n", 46 | "``` \n", 47 | "cd ~/cases/i.day5.a \n", 48 | "./case.setup\n", 49 | "```\n", 50 | "
\n", 51 | "\n", 52 | "Change the clm namelist using user_nl_clm by adding the following lines:\n", 53 | "``` \n", 54 | "hist_nhtfrq = -24\n", 55 | "hist_mfilt = 6\n", 56 | "```\n", 57 | "
\n", 58 | " \n", 59 | "Check the namelist by running:\n", 60 | "``` \n", 61 | "./preview_namelists\n", 62 | "```\n", 63 | "
\n", 64 | "\n", 65 | "If needed, change job queue, account number, or wallclock time. \n", 66 | "For instance:\n", 67 | "``` \n", 68 | "./xmlchange JOB_QUEUE=tutorial,PROJECT=UESM0013 --force,JOB_WALLCLOCK_TIME=0:15:00\n", 69 | "```\n", 70 | "
\n", 71 | "\n", 72 | "Build and submit:\n", 73 | "```\n", 74 | "qcmd -- ./case.build\n", 75 | "./case.submit\n", 76 | "```\n", 77 | "
\n", 78 | "\n", 79 | "When the run is completed, look into the archive directory for: \n", 80 | "i.day5.a. \n", 81 | " \n", 82 | "(1) Check that your archive directory on derecho (The path will be different on other machines): \n", 83 | "```\n", 84 | "cd /glade/derecho/scratch/$USER/archive/i.day5.a/lnd/hist\n", 85 | "\n", 86 | "ls \n", 87 | "```\n", 88 | "
\n", 89 | "\n", 90 | "(2) Look at the output using ncview\n" 91 | ] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "execution_count": null, 96 | "id": "17cf7e19-1211-45f2-97cd-fe2badc69dac", 97 | "metadata": {}, 98 | "outputs": [], 99 | "source": [] 100 | } 101 | ], 102 | "metadata": { 103 | "kernelspec": { 104 | "display_name": "CMIP6 2019.10", 105 | "language": "python", 106 | "name": "cmip6-201910" 107 | }, 108 | "language_info": { 109 | "codemirror_mode": { 110 | "name": "ipython", 111 | "version": 3 112 | }, 113 | "file_extension": ".py", 114 | "mimetype": "text/x-python", 115 | "name": "python", 116 | "nbconvert_exporter": "python", 117 | "pygments_lexer": "ipython3", 118 | "version": "3.7.10" 119 | } 120 | }, 121 | "nbformat": 4, 122 | "nbformat_minor": 5 123 | } 124 | -------------------------------------------------------------------------------- /notebooks/challenge/paleo/paleo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Paleo \n", 9 | "Paleoclimatology is the study of ancient climate variability and change, before the availability of instrumental records. \n", 10 | "\n", 11 | "Paleoclimatology relies on a combination of physical, biological, and chemical proxies of past environmental and climate change, such as glacial ice, tree rings, sediments, corals, and cave mineral deposits. \n", 12 | "\n", 13 | "CESM is widely used for paleoclimate studies. \n", 14 | "\n", 15 | "CESM simulations of past climates are a tool to better understand and interpret proxy reconstructions and to evaluate CESM skill in simulating out-of-sample climate states. \n", 16 | "\n", 17 | "Many proxy reconstructions are made using measurements of isotopic ratios in natural archives. \n", 18 | "\n", 19 | "A version of CESM with the capability to simulate hydrogen and oxygen isotope ratios in the water cycle (isotope-enabled CESM) is commonly used in paleoclimate studies to provide more direct signals of comparison with proxies. \n" 20 | ] 21 | }, 22 | { 23 | "cell_type": "markdown", 24 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 25 | "metadata": { 26 | "tags": [] 27 | }, 28 | "source": [ 29 | "## Learning Goals" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "id": "346cbd7b-3b8e-41f0-b120-b369ab20f6cc", 35 | "metadata": {}, 36 | "source": [ 37 | "- Student will learn how to modify Earth's orbital configuration in CESM for a simple paleoclimate experiment. \n", 38 | "- Student will learn how to validate that the orbital modification is implemented properly. \n", 39 | "- Student will learn how to quickly compare differences in paleo and preindustrial CESM runs using NCO and Ncview. \n", 40 | "- Student will learn how to run a preindustrial isotope-enabled CESM experiment and plot precipitation δ18O. \n" 41 | ] 42 | }, 43 | { 44 | "cell_type": "markdown", 45 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 46 | "metadata": { 47 | "tags": [] 48 | }, 49 | "source": [ 50 | "## Exercise 1-2 Details" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "id": "346cbd7b-3b8e-41f0-b120-b369ab20f6cc", 56 | "metadata": {}, 57 | "source": [ 58 | "- This exercise uses the same code base as the rest of the tutorial. \n", 59 | "- You will be using the B1850 compset at the f19_g17 resolution. \n", 60 | "- You will run a preindustrial control simulation and a simple mid-Holocene simulation. \n" 61 | ] 62 | }, 63 | { 64 | "cell_type": "markdown", 65 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 66 | "metadata": { 67 | "tags": [] 68 | }, 69 | "source": [ 70 | "## Exercise 3 Details" 71 | ] 72 | }, 73 | { 74 | "cell_type": "markdown", 75 | "id": "346cbd7b-3b8e-41f0-b120-b369ab20f6cc", 76 | "metadata": {}, 77 | "source": [ 78 | "- This exercise uses a different code base from the rest of the tutorial (isotope-enabled CESM1.3). \n", 79 | "- You will be using the B1850C5 compset at the f19_g16 resolution. \n", 80 | "- You will run a preindustrial simulation with water isotope tracers. \n", 81 | "\n", 82 | "![Water isotope partitioning](../../../images/challenge/Precip_isotope_Cartoon.jpg)\n" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": null, 88 | "id": "e961b1bd-a1c8-4e54-bafc-46dcf78454f1", 89 | "metadata": {}, 90 | "outputs": [], 91 | "source": [] 92 | } 93 | ], 94 | "metadata": { 95 | "kernelspec": { 96 | "display_name": "Python 3 (ipykernel)", 97 | "language": "python", 98 | "name": "python3" 99 | }, 100 | "language_info": { 101 | "codemirror_mode": { 102 | "name": "ipython", 103 | "version": 3 104 | }, 105 | "file_extension": ".py", 106 | "mimetype": "text/x-python", 107 | "name": "python", 108 | "nbconvert_exporter": "python", 109 | "pygments_lexer": "ipython3", 110 | "version": "3.10.13" 111 | } 112 | }, 113 | "nbformat": 4, 114 | "nbformat_minor": 5 115 | } 116 | -------------------------------------------------------------------------------- /notebooks/diagnostics/additional/additional.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Additional Topics" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 14 | "metadata": { 15 | "tags": [] 16 | }, 17 | "source": [ 18 | "This section provides other information about how to use CESM output including:\n", 19 | "- The difference between timeseries and history files\n", 20 | "- The Climate Variabilty and Diagnostics Package (CVDP)\n", 21 | "- Links to different analysis tools and resources used by CESM developers and users" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "e961b1bd-a1c8-4e54-bafc-46dcf78454f1", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [] 31 | } 32 | ], 33 | "metadata": { 34 | "kernelspec": { 35 | "display_name": "Python 3 (ipykernel)", 36 | "language": "python", 37 | "name": "python3" 38 | }, 39 | "language_info": { 40 | "codemirror_mode": { 41 | "name": "ipython", 42 | "version": 3 43 | }, 44 | "file_extension": ".py", 45 | "mimetype": "text/x-python", 46 | "name": "python", 47 | "nbconvert_exporter": "python", 48 | "pygments_lexer": "ipython3", 49 | "version": "3.10.13" 50 | } 51 | }, 52 | "nbformat": 4, 53 | "nbformat_minor": 5 54 | } 55 | -------------------------------------------------------------------------------- /notebooks/diagnostics/additional/adf.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# ADF" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "0601ca1c-4cef-4cbb-824b-16c382c66865", 14 | "metadata": {}, 15 | "source": [ 16 | "The AMWG Diagnostics Framework (ADF) is a python-based diagnostics package designed to generate a large number of\n", 17 | "figures and tables, currently focuses on atmospheric and chemistry fields, for a given CAM or CESM simulation and \n", 18 | "compare it observations or a baseline run. The ADF can also run the CVDP, and has been coupled to CUPiD as well." 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "id": "00a8f92d-5b88-4b4f-9411-2878a7411d27", 24 | "metadata": {}, 25 | "source": [ 26 | "![ADF Image](https://justin-richling.github.io/ADF-Tutorial/_images/PRECT_ANN_LatLon_Mean.png)" 27 | ] 28 | }, 29 | { 30 | "cell_type": "markdown", 31 | "id": "749a78ea-65cb-4a27-b56a-aeb385f50b7d", 32 | "metadata": {}, 33 | "source": [ 34 | "## Tutorial:\n", 35 | "\n", 36 | "The ADF has its own complete tutorial, including an example of doing a model vs. model or model vs. observations comparion.\n", 37 | "You can find the tutorial [online here](https://justin-richling.github.io/ADF-Tutorial/README.html)." 38 | ] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "id": "9069fe9f-d7c7-4916-b568-2cc28c05ae95", 43 | "metadata": {}, 44 | "source": [ 45 | "### Note:" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "id": "a4ab2b34-ae67-424a-a0c9-c3bb8ca3f231", 51 | "metadata": {}, 52 | "source": [ 53 | "The location of the example simulations are now in **\"/glade/campaign/cgd/amp/amwg/ADF_test_cases\"**, with four new case name options. These new simulations also have different year lengths, so you will need to make the relevant updates in the config file. Good luck!" 54 | ] 55 | } 56 | ], 57 | "metadata": { 58 | "kernelspec": { 59 | "display_name": "Python 3 (ipykernel)", 60 | "language": "python", 61 | "name": "python3" 62 | }, 63 | "language_info": { 64 | "codemirror_mode": { 65 | "name": "ipython", 66 | "version": 3 67 | }, 68 | "file_extension": ".py", 69 | "mimetype": "text/x-python", 70 | "name": "python", 71 | "nbconvert_exporter": "python", 72 | "pygments_lexer": "ipython3", 73 | "version": "3.10.13" 74 | } 75 | }, 76 | "nbformat": 4, 77 | "nbformat_minor": 5 78 | } 79 | -------------------------------------------------------------------------------- /notebooks/diagnostics/additional/cvdp.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# CVDP" 9 | ] 10 | }, 11 | 12 | { 13 | "cell_type": "markdown", 14 | "id": "080839b4-514f-4072-88a6-bd514424cf6e", 15 | "metadata": {}, 16 | "source": [ 17 | "![CVDP Image](https://webext.cgd.ucar.edu/Multi-Case/CVDP_repository/cesm-controls_quadquad/nino34.spatialcomp.indmem.djf1.png)\n", 18 | "*

Figure: ENSO spatial composite metric from CVDP output showing different generations of CSM/CCSM/CESM.

*" 19 | ] 20 | }, 21 | 22 | 23 | { 24 | "cell_type": "markdown", 25 | "id": "8f46aef7-947e-498e-90b1-a4ed6b077f6d", 26 | "metadata": {}, 27 | "source": [ 28 | "The Climate Variability Diagnostics Package (CVDP) developed by NSF-NCAR's Climate Analysis Section is an automated analysis tool and data repository \n", 29 | "for assessing modes of climate variability and trends in models and observations. Time series, spatial patterns and power spectra are displayed \n", 30 | "graphically via webpages and saved as NetCDF files for later use. The package can be applied to individual model simulations (style 1) or to \n", 31 | "initial condition Large Ensembles (style 2). Both styles provide quantitative metrics comparing models and observations; style 2 also includes \n", 32 | "ensemble mean (i.e., forced response) and ensemble spread (i.e., internal variability) diagnostics. Several detrending options are provided, \n", 33 | "including linear, quadratic, 30-year high-pass filter and removal of the ensemble mean (in the case of Large Ensembles). All diagnostics and \n", 34 | "metrics are fully documented with references to the peer-reviewed literature.\n", 35 | "\n", 36 | "Examples of CVDP output:\n", 37 | "\n", 38 | "[CMIP6 Historical+SSP585 Comparison](https://webext.cgd.ucar.edu/Multi-Case/CVDP_repository/cmip6.hist_ssp585_quadquad_1900-2100/)\n", 39 | "\n", 40 | "[CESM2-Large Ensemble Comparison](https://webext.cgd.ucar.edu/Multi-Case/CVDP_repository/cesm2-lens_quadquad_1850-2100/)\n", 41 | "\n", 42 | "See the [CVDP Documention page](https://www.cesm.ucar.edu/projects/cvdp/documentation) for instructions on how to run the CVDP.\n", 43 | "\n", 44 | "\n" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": null, 50 | "id": "def586e4-6553-48b9-b05c-2308dad9181c", 51 | "metadata": {}, 52 | "outputs": [], 53 | "source": [] 54 | } 55 | ], 56 | "metadata": { 57 | "kernelspec": { 58 | "display_name": "Python 3 (ipykernel)", 59 | "language": "python", 60 | "name": "python3" 61 | }, 62 | "language_info": { 63 | "codemirror_mode": { 64 | "name": "ipython", 65 | "version": 3 66 | }, 67 | "file_extension": ".py", 68 | "mimetype": "text/x-python", 69 | "name": "python", 70 | "nbconvert_exporter": "python", 71 | "pygments_lexer": "ipython3", 72 | "version": "3.10.13" 73 | } 74 | }, 75 | "nbformat": 4, 76 | "nbformat_minor": 5 77 | } 78 | -------------------------------------------------------------------------------- /notebooks/diagnostics/additional/large_ensembles.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Large Ensembles" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 14 | "metadata": { 15 | "tags": [] 16 | }, 17 | "source": [ 18 | "## Learning Goals\n", 19 | "\n", 20 | "- Enter learning goals here." 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "id": "e73ce5d6-d2b1-4f32-b64f-337a1b02e2d0", 26 | "metadata": {}, 27 | "source": [ 28 | "_______________\n", 29 | "\n", 30 | "## Subsection 1\n", 31 | "\n", 32 | "Info here" 33 | ] 34 | }, 35 | { 36 | "cell_type": "markdown", 37 | "id": "815e0869-0518-4cf9-9417-cd9b08965ca1", 38 | "metadata": {}, 39 | "source": [ 40 | "_______________\n", 41 | "\n", 42 | "## Subsection 2\n", 43 | "\n", 44 | "Info here\n" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": null, 50 | "id": "e961b1bd-a1c8-4e54-bafc-46dcf78454f1", 51 | "metadata": {}, 52 | "outputs": [], 53 | "source": [] 54 | } 55 | ], 56 | "metadata": { 57 | "kernelspec": { 58 | "display_name": "Python 3 (ipykernel)", 59 | "language": "python", 60 | "name": "python3" 61 | }, 62 | "language_info": { 63 | "codemirror_mode": { 64 | "name": "ipython", 65 | "version": 3 66 | }, 67 | "file_extension": ".py", 68 | "mimetype": "text/x-python", 69 | "name": "python", 70 | "nbconvert_exporter": "python", 71 | "pygments_lexer": "ipython3", 72 | "version": "3.10.13" 73 | } 74 | }, 75 | "nbformat": 4, 76 | "nbformat_minor": 5 77 | } 78 | -------------------------------------------------------------------------------- /notebooks/diagnostics/additional/postprocessing.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Postprocessing data" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "5bd5c142-f778-4570-8edc-cc760139f30e", 14 | "metadata": {}, 15 | "source": [ 16 | "A wide range of tools exist for postprocessing and analyzing data with techniques and methods exist. One of the first things you have to decide is how to store your files.\n", 17 | "\n", 18 | "In the diagnostics notebooks we have have provided examples of how to use both history files and timeseries files, described below." 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 24 | "metadata": { 25 | "tags": [] 26 | }, 27 | "source": [ 28 | "## History vs. Timeseries files\n", 29 | "\n", 30 | "When you run the CESM model the default output is history files, or files for a single timestep that include all variables for a given component and time frequency. However, most CESM community experiment data will be provided as timeseries files, or files that are a single variable over many timesteps. It is important you understand how to use both types of files, and for you to know that for some tasks (e.g. debugging) you should be using history files instead of timeseries files. However, it is much more efficient to store timeseries files because the overall size is smaller once the files have been processed into timeseries format.\n", 31 | "\n", 32 | "The current recommendation is to use the new [CUPiD diagnostics system](https://github.com/NCAR/CUPiD) to convert CESM history files into time series. You can try it yourself on CESM tutorial simulation data by running through the [CUPiD Notebook](../cupid.ipynb) under the diagnostics section.\n" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": null, 38 | "id": "e961b1bd-a1c8-4e54-bafc-46dcf78454f1", 39 | "metadata": {}, 40 | "outputs": [], 41 | "source": [] 42 | } 43 | ], 44 | "metadata": { 45 | "kernelspec": { 46 | "display_name": "Python 3 (ipykernel)", 47 | "language": "python", 48 | "name": "python3" 49 | }, 50 | "language_info": { 51 | "codemirror_mode": { 52 | "name": "ipython", 53 | "version": 3 54 | }, 55 | "file_extension": ".py", 56 | "mimetype": "text/x-python", 57 | "name": "python", 58 | "nbconvert_exporter": "python", 59 | "pygments_lexer": "ipython3", 60 | "version": "3.10.13" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 5 65 | } 66 | -------------------------------------------------------------------------------- /notebooks/diagnostics/cam/cam.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Atmosphere" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "30ca3a26-9666-433a-b9d6-852999d9455e", 14 | "metadata": {}, 15 | "source": [ 16 | "## Basic Plotting\n", 17 | "\n", 18 | "### Learning Goals\n", 19 | "\n", 20 | "- Making a lat-lon plot\n", 21 | "- Making a zonal plot\n", 22 | "- Making a lat-height plot\n", 23 | "\n", 24 | "### Exercise 1: lat-lon plot\n", 25 | "Plot global lat/lon of surface temperature\n", 26 | "\n", 27 | "### Exercise 2: Making a zonal plot\n", 28 | "Plot zonal mean of short wave cloud forcing\n", 29 | "\n", 30 | "### Exercise 3: Making a lat-height plot\n", 31 | "Plot temperature zonal mean with vertical levels\n", 32 | "\n", 33 | "\n" 34 | ] 35 | }, 36 | { 37 | "cell_type": "markdown", 38 | "id": "c494a32c-cd81-4a0a-b290-eb0835919532", 39 | "metadata": { 40 | "tags": [] 41 | }, 42 | "source": [ 43 | "_______________\n", 44 | "## Advanced Plotting\n", 45 | "\n", 46 | "### Learning Goals\n", 47 | "\n", 48 | "- analysis of native output \n", 49 | "\n", 50 | "\n", 51 | "### Exercise 1: CAM-SE output analysis\n", 52 | "\n", 53 | "Examples of simple analysis and plotting that can be done with CAM-SE output on the native cubed-sphere grid." 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "id": "7d4d2795-ce87-424c-8b26-719932e22678", 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [] 63 | } 64 | ], 65 | "metadata": { 66 | "kernelspec": { 67 | "display_name": "Python 3 (ipykernel)", 68 | "language": "python", 69 | "name": "python3" 70 | }, 71 | "language_info": { 72 | "codemirror_mode": { 73 | "name": "ipython", 74 | "version": 3 75 | }, 76 | "file_extension": ".py", 77 | "mimetype": "text/x-python", 78 | "name": "python", 79 | "nbconvert_exporter": "python", 80 | "pygments_lexer": "ipython3", 81 | "version": "3.10.13" 82 | } 83 | }, 84 | "nbformat": 4, 85 | "nbformat_minor": 5 86 | } 87 | -------------------------------------------------------------------------------- /notebooks/diagnostics/cice/cice.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Sea Ice" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "30ca3a26-9666-433a-b9d6-852999d9455e", 14 | "metadata": {}, 15 | "source": [ 16 | "## Basic Plotting" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 22 | "metadata": { 23 | "tags": [] 24 | }, 25 | "source": [ 26 | "### Learning Goals\n", 27 | "\n", 28 | "- Making polar projection plots\n", 29 | "- Understanding sea ice variables such as concentration and thickness\n", 30 | "- Masking and area averaging\n", 31 | "- Computing total sea ice area or volume" 32 | ] 33 | }, 34 | { 35 | "cell_type": "markdown", 36 | "id": "e73ce5d6-d2b1-4f32-b64f-337a1b02e2d0", 37 | "metadata": {}, 38 | "source": [ 39 | "_______________\n", 40 | "\n", 41 | "### Exercise 1: Making polar projection plots of sea ice concentration.\n", 42 | "\n", 43 | "Here we will use some custom python tools to produce a polar projection plot of sea ice concentration. Some things to try include changing the colormap, plotting sea ice thickness instead of concentration, and changing hemispheres." 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "id": "815e0869-0518-4cf9-9417-cd9b08965ca1", 49 | "metadata": {}, 50 | "source": [ 51 | "_______________\n", 52 | "\n", 53 | "### Exercise 2: Compute total sea ice area and plot versus time.\n", 54 | "\n", 55 | "Here will we learn how to compute the total sea ice area for the northern hemisphere. Then plot this versus time. Some exercises will be plotting the monthly mean sea ice area, plotting just September or March mean sea ice area, or computing sea ice volume and then plotting it.\n" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "id": "27dafcc2-beec-4d75-920f-a60f46fff27b", 61 | "metadata": {}, 62 | "source": [ 63 | "_______________\n", 64 | "## Advanced Plotting" 65 | ] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "id": "c494a32c-cd81-4a0a-b290-eb0835919532", 70 | "metadata": { 71 | "tags": [] 72 | }, 73 | "source": [ 74 | "### Learning Goals\n", 75 | "\n", 76 | "- Using sea ice thickness distribution (ITD) category information\n", 77 | "- Using sea ice tracers\n", 78 | "- Remapping sea ice fields." 79 | ] 80 | }, 81 | { 82 | "cell_type": "markdown", 83 | "id": "850641b7-2a63-4a20-8a26-d18a400c6160", 84 | "metadata": {}, 85 | "source": [ 86 | "_______________\n", 87 | "\n", 88 | "### Exercise 1: Plot per-category ice area\n", 89 | "\n", 90 | "Here you will plot a field that uses the subgridscale ice thickness distribution (ITD) categories." 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "id": "9fc458d8-6ea2-461f-b4d3-6808accfca41", 96 | "metadata": {}, 97 | "source": [ 98 | "_______________\n", 99 | "\n", 100 | "### Exercise 2: Plot per-category snow thickness\n", 101 | "\n", 102 | "Here is another example of an ITD related field, the snow thickness. Actual snow thickness is derived from the snow volume (per unit area)." 103 | ] 104 | }, 105 | { 106 | "cell_type": "markdown", 107 | "id": "4a75149d-ef7b-4b89-91b5-4daec351d95c", 108 | "metadata": {}, 109 | "source": [ 110 | "_______________\n", 111 | "\n", 112 | "### Exercise 3: Plot ice area related tracer\n", 113 | "\n", 114 | "In this exercise you will learn about a variable related to the ice covered area of a grid cell instead of the grid cell mean.\n" 115 | ] 116 | }, 117 | { 118 | "cell_type": "markdown", 119 | "id": "82beac53-81f6-494f-ba15-b1718e14421b", 120 | "metadata": {}, 121 | "source": [ 122 | "_______________\n", 123 | "\n", 124 | "### Exercise 4: Remapping or regridding sea ice fields\n", 125 | "\n", 126 | "The ocean and sea ice grids are different in that the North Pole is moved into land. In this exercise\n", 127 | "you will learn how to \"remap\" or \"regrid\" a sea ice field onto a standard one degree by one degree grid." 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": null, 133 | "id": "c5184b86-b584-451c-b37a-15d6f27be115", 134 | "metadata": {}, 135 | "outputs": [], 136 | "source": [] 137 | } 138 | ], 139 | "metadata": { 140 | "kernelspec": { 141 | "display_name": "Python 3 (ipykernel)", 142 | "language": "python", 143 | "name": "python3" 144 | }, 145 | "language_info": { 146 | "codemirror_mode": { 147 | "name": "ipython", 148 | "version": 3 149 | }, 150 | "file_extension": ".py", 151 | "mimetype": "text/x-python", 152 | "name": "python", 153 | "nbconvert_exporter": "python", 154 | "pygments_lexer": "ipython3", 155 | "version": "3.10.13" 156 | } 157 | }, 158 | "nbformat": 4, 159 | "nbformat_minor": 5 160 | } 161 | -------------------------------------------------------------------------------- /notebooks/diagnostics/clm_ctsm/clm_ctsm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Land" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "6a0eda7f-8348-4a1e-8ada-86d9a70c3af6", 14 | "metadata": {}, 15 | "source": [ 16 | "This notebook is an introduction to analyzing CLM land model results from a global simulation. It uses results from the case you ran in the 1a Tutorial. We've prestaged model results from this simulation and another simulation using a different model configuration in a shared directory. This way, you can get started on analyzing simulations results before your simulations finish running and compare differences caused by model structure. " 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "b6f4905b-cd2a-454e-89cf-ccc585c90247", 22 | "metadata": { 23 | "tags": [] 24 | }, 25 | "source": [ 26 | "## Learning Goals\n", 27 | "\n", 28 | "- Read in global CLM data\n", 29 | "- Make basic spatial plots\n", 30 | "- Make basic timeseries plots" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "id": "e961b1bd-a1c8-4e54-bafc-46dcf78454f1", 37 | "metadata": {}, 38 | "outputs": [], 39 | "source": [] 40 | } 41 | ], 42 | "metadata": { 43 | "kernelspec": { 44 | "display_name": "Python 3 (ipykernel)", 45 | "language": "python", 46 | "name": "python3" 47 | }, 48 | "language_info": { 49 | "codemirror_mode": { 50 | "name": "ipython", 51 | "version": 3 52 | }, 53 | "file_extension": ".py", 54 | "mimetype": "text/x-python", 55 | "name": "python", 56 | "nbconvert_exporter": "python", 57 | "pygments_lexer": "ipython3", 58 | "version": "3.9.12" 59 | } 60 | }, 61 | "nbformat": 4, 62 | "nbformat_minor": 5 63 | } 64 | -------------------------------------------------------------------------------- /notebooks/diagnostics/pop/pop.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Ocean" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "18a0c6f1-355a-4f2a-99ac-1fead4de8626", 14 | "metadata": {}, 15 | "source": [ 16 | "## Basic Plotting" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "ce7f7f35-19aa-406c-9330-e973dbb576d0", 22 | "metadata": { 23 | "tags": [] 24 | }, 25 | "source": [ 26 | "### Learning Goals\n", 27 | "\n", 28 | "- How to load and plot POP ocean model output\n", 29 | "- How to deal with the curvilinear grid\n", 30 | "- How to select a point for making profiles\n", 31 | "- How to define useful functions" 32 | ] 33 | }, 34 | { 35 | "cell_type": "markdown", 36 | "id": "ae93c512-ccde-43cf-9d73-822cddde7ef2", 37 | "metadata": {}, 38 | "source": [ 39 | "_______________\n", 40 | "\n", 41 | "### Exercise 1: Making map plots\n", 42 | "\n", 43 | "Here we will produce a map plot of surface heat flux and sea surface temperature. Some things to try include plotting standard deviations instead of means, plotting another surface variable, or plotting temperature at a particular depth." 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "id": "a0b48b29-16d6-4474-9d81-152f9849acd3", 49 | "metadata": {}, 50 | "source": [ 51 | "_______________\n", 52 | "\n", 53 | "### Exercise 2: Making global and regional maps\n", 54 | "\n", 55 | "Here will we learn how to use the TLAT and TLONG coordinates in POP to plot nicer global or regional maps. Some things to try include plotting different regions or different variables.\n" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "id": "589f85ae-bbe7-4e57-8b4b-1eec5d1e326c", 61 | "metadata": {}, 62 | "source": [ 63 | "_______________\n", 64 | "\n", 65 | "### Exercise 3: Making timeseries\n", 66 | "\n", 67 | "Here will we learn how to make a timeseries of temperature at a single point throughout the column.\n" 68 | ] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "id": "5676b088-c81c-4a4c-8fc7-bce6f09dd32d", 73 | "metadata": {}, 74 | "source": [ 75 | "_______________\n", 76 | "\n", 77 | "### Exercise 4: Making a profile\n", 78 | "\n", 79 | "Here we learn how to plot a temperature profile at a single point on the ocean grid." 80 | ] 81 | }, 82 | { 83 | "cell_type": "markdown", 84 | "id": "782bebb4-f00e-4362-8738-736ab39a311d", 85 | "metadata": {}, 86 | "source": [ 87 | "## Advanced Plotting" 88 | ] 89 | }, 90 | { 91 | "cell_type": "markdown", 92 | "id": "c9434bfe-c2c3-4e6a-ba83-de538a6f29ed", 93 | "metadata": {}, 94 | "source": [ 95 | "_______________\n", 96 | "\n", 97 | "### Exercise 1: Plot winter time maximum mixed-layer depth\n", 98 | "\n", 99 | "Here we learn how to select winter months and plot the maximum mixed-layer depth for both hemispheres on a single map. " 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "id": "714dba27-4bcf-40db-9779-9fe0c3dde5f3", 105 | "metadata": {}, 106 | "source": [ 107 | "_______________\n", 108 | "\n", 109 | "### Exercise 2: Compute and plot ocean heat storage per area for the upper 2000m\n", 110 | "\n", 111 | "Here we learn how to calculate the heat storage per area from the temperature trend and plot the results on a global map." 112 | ] 113 | } 114 | ], 115 | "metadata": { 116 | "kernelspec": { 117 | "display_name": "Python 3 (ipykernel)", 118 | "language": "python", 119 | "name": "python3" 120 | }, 121 | "language_info": { 122 | "codemirror_mode": { 123 | "name": "ipython", 124 | "version": 3 125 | }, 126 | "file_extension": ".py", 127 | "mimetype": "text/x-python", 128 | "name": "python", 129 | "nbconvert_exporter": "python", 130 | "pygments_lexer": "ipython3", 131 | "version": "3.9.12" 132 | } 133 | }, 134 | "nbformat": 4, 135 | "nbformat_minor": 5 136 | } 137 | -------------------------------------------------------------------------------- /notebooks/intro/cesm_expts/clim_data_gateway.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Climate Data Gateway" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "9d8e3ee1-e605-4894-afd2-b0a83420711a", 14 | "metadata": {}, 15 | "source": [ 16 | "Publicly released CESM data is available via the Climate Data Gateway. Timeseries data in both CESM standard format and CMIP format are available. Registration is quick and easy, and NCAR accounts are not required for access." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "4afe3049-6271-4659-b23d-b4627dc31e93", 22 | "metadata": {}, 23 | "source": [ 24 | "
\n", 25 | "\n", 26 | "[Climate Data Gateway webpage](https://www.earthsystemgrid.org/)\n", 27 | "\n", 28 | "
" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "e33a15df-834d-4108-a342-905d66bce697", 34 | "metadata": {}, 35 | "source": [ 36 | "![CDG](../../../images/intro/clim_data_gateway.png)\n", 37 | "\n", 38 | "*

Figure: Climate Data Gateway Homepage.

*" 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": null, 44 | "id": "eeccd871-4162-4b13-a29d-cc9529557043", 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [] 48 | } 49 | ], 50 | "metadata": { 51 | "kernelspec": { 52 | "display_name": "Bash", 53 | "language": "bash", 54 | "name": "bash" 55 | }, 56 | "language_info": { 57 | "codemirror_mode": "shell", 58 | "file_extension": ".sh", 59 | "mimetype": "text/x-sh", 60 | "name": "bash" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 5 65 | } 66 | -------------------------------------------------------------------------------- /notebooks/intro/cesm_expts/clim_data_guide.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Climate Data Guide" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "43c2831e-6726-4718-8460-2a042109003b", 14 | "metadata": {}, 15 | "source": [ 16 | "The Climate Data Guide describes observations used for Earth System Model evaluation. To date 150+ data sets have been profiled. Expert-user guidance by 45+ scientists is provided to users, including pros and cons of each dataset. There are also comparisons of common variables (e.g. precipitation, sea surface temperature, sea ice concentration, etc.)." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "422d7b55-49d9-4059-90ff-eec47665f874", 22 | "metadata": {}, 23 | "source": [ 24 | "
\n", 25 | "\n", 26 | "[Climate Data Guide webpage](http://climatedataguide.ucar.edu/)\n", 27 | "\n", 28 | "
" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "16c243bf-a625-417d-929b-67a8171b2fab", 34 | "metadata": {}, 35 | "source": [ 36 | "![CDG](../../../images/intro/clim_data_guide.png)\n", 37 | "\n", 38 | "*

Figure: Climate Data Guide Homepage.

*" 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": null, 44 | "id": "f7d1fc1d-4dc0-4718-92c9-30f38db2bb77", 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [] 48 | } 49 | ], 50 | "metadata": { 51 | "kernelspec": { 52 | "display_name": "Bash", 53 | "language": "bash", 54 | "name": "bash" 55 | }, 56 | "language_info": { 57 | "codemirror_mode": "shell", 58 | "file_extension": ".sh", 59 | "mimetype": "text/x-sh", 60 | "name": "bash" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 5 65 | } 66 | -------------------------------------------------------------------------------- /notebooks/intro/cesm_webpage.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0086605a-f330-41bd-a79b-13339e0e5d58", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# CESM Webpage" 11 | ] 12 | }, 13 | { 14 | "cell_type": "markdown", 15 | "id": "9546d840-c247-4952-a8f2-52a377e5e180", 16 | "metadata": {}, 17 | "source": [ 18 | "The **CESM Web Page** is the first point of reference for all things CESM. Here we can explore the larger CESM project, delve deeper into individual working groups, models, research activities, model releases, supporting model data, tools, events and much much more.\n" 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "id": "71155f04-3f3a-4aa2-9caa-96815767ef1c", 24 | "metadata": {}, 25 | "source": [ 26 | "
\n", 27 | "\n", 28 | "[CESM project webpage](http://www.cesm.ucar.edu)\n", 29 | "\n", 30 | "
" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "id": "59650279-f141-4093-b06d-b788d46ae33c", 36 | "metadata": {}, 37 | "source": [ 38 | "**Some points to pay attention to:** \n", 39 | "- CESM **``Project``** Information\n", 40 | "- **``Working Groups``** Information\n", 41 | "- **``Community Projects``** Information\n", 42 | " - CESM2 Large Ensemble\n", 43 | " - CESM2 Stratospheric Aerosol Injection (ARISE-SAI)\n", 44 | "- What **``Version``** of the model should you use?\n", 45 | "- **``Individual Model``** Pages https://www.cesm.ucar.edu/models/ \n", 46 | "- **``Supported Model``** Releases – 2.1.X vs 2.2.X\n", 47 | "- **``Experiments``**, expand a case for details, diagnostics plots for many experiments\n" 48 | ] 49 | }, 50 | { 51 | "cell_type": "code", 52 | "execution_count": null, 53 | "id": "f8bd790d-2ad5-445d-aaff-4bc8d5b23a29", 54 | "metadata": {}, 55 | "outputs": [], 56 | "source": [] 57 | } 58 | ], 59 | "metadata": { 60 | "kernelspec": { 61 | "display_name": "Python 3 (ipykernel)", 62 | "language": "python", 63 | "name": "python3" 64 | }, 65 | "language_info": { 66 | "codemirror_mode": { 67 | "name": "ipython", 68 | "version": 3 69 | }, 70 | "file_extension": ".py", 71 | "mimetype": "text/x-python", 72 | "name": "python", 73 | "nbconvert_exporter": "python", 74 | "pygments_lexer": "ipython3", 75 | "version": "3.10.13" 76 | }, 77 | "toc-showcode": false 78 | }, 79 | "nbformat": 4, 80 | "nbformat_minor": 5 81 | } 82 | -------------------------------------------------------------------------------- /notebooks/intro/community_experiments.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Community Experiments" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "59bb8a3f-74a5-4c7f-aaa7-15d22fe59b4a", 14 | "metadata": {}, 15 | "source": [ 16 | "Information about community experiments performed with CESM version 2 and previous verisons of the model (CSM1, CCSM2, CCSM3, CESM1) are documented on an experiments webpage. " 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "c6540e1c-d489-401b-b227-2da4f69c50ec", 22 | "metadata": {}, 23 | "source": [ 24 | "
\n", 25 | "\n", 26 | "[CESM experiments webpage](https://www.cesm.ucar.edu/experiments)\n", 27 | "\n", 28 | "
" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "387a41d7-3e1f-4272-9ba6-7940dc3c9f7f", 34 | "metadata": {}, 35 | "source": [ 36 | "Explore this webpage and then click on the CESM2 Experiments, Data, and Diagnostic Output link for experiments from the most recent model version." 37 | ] 38 | }, 39 | { 40 | "cell_type": "markdown", 41 | "id": "501487a2-94b7-4947-a273-208b0106c0fd", 42 | "metadata": {}, 43 | "source": [ 44 | "![CESM Experiments](../../images/intro/CESM_exp_1.png)\n", 45 | "\n", 46 | "*

Figure: CESM experiments webpage.

*" 47 | ] 48 | }, 49 | { 50 | "cell_type": "markdown", 51 | "id": "26b40b47-8dfc-4477-99f2-f54f859ea47c", 52 | "metadata": {}, 53 | "source": [ 54 | "This page provides a searchable list of all the CESM2 experiments available to the public. \n", 55 | "To interpret the casenames, it is helpful to remember CESM naming conventions that provide information about the experiment at a glance. Knowing the CESM case naming conventions will help you navigate CESM community experiments. Information about the CESM naming is available at:" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "id": "09e4bfeb-04af-427e-9636-f62f001b567e", 61 | "metadata": {}, 62 | "source": [ 63 | "
\n", 64 | "\n", 65 | "[CESM case naming conventions](https://www.cesm.ucar.edu/models/cesm2/naming-conventions)\n", 66 | "\n", 67 | "
" 68 | ] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "id": "ab79cd61-d4c9-4e40-92f2-9253756b2eda", 73 | "metadata": {}, 74 | "source": [ 75 | "Click on the experiment that corresponds to the CESM2 CMIP6 preindustrial control experiment:\n", 76 | "b.e21.B1850.f09_g17.MIP6-piControl.001" 77 | ] 78 | }, 79 | { 80 | "cell_type": "markdown", 81 | "id": "50f1a8e8-90d0-44e7-8fcf-5dd2f0b09d3f", 82 | "metadata": {}, 83 | "source": [ 84 | "![CESM Experiments](../../images/intro/CESM_exp_2.png)\n", 85 | "\n", 86 | "*

Figure: CESM2 CMIP6 PI control experiment.

*" 87 | ] 88 | }, 89 | { 90 | "cell_type": "markdown", 91 | "id": "42e2aada-04d8-40ba-8ae2-3d501782dadb", 92 | "metadata": {}, 93 | "source": [ 94 | "Information about this experiment drops down below the experiment name. There are three main sections of information:\n", 95 | "\n", 96 | "- The title of the experiment with active components listed.\n", 97 | "- Links to the data and/or the NCAR HPC directory with data. (#1, green arrow)\n", 98 | "- Links to the diagnostic component package output and the Climate Variability Diagnostics Package. (#2, blue arrow)\n", 99 | "- Details about the run, including the resolution, compset, etc. (#3, red arrow)" 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "id": "0d1ff550-d4c7-45be-a6d0-b1ea789d0d67", 105 | "metadata": {}, 106 | "source": [ 107 | "![CESM Experiments](../../images/intro/CESM_exp_3.png)\n", 108 | "\n", 109 | "*

Figure: CESM2 CMIP6 PI control experiment.

*" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": null, 115 | "id": "084b0a01-829d-4996-bea5-f0e56e2c6d04", 116 | "metadata": {}, 117 | "outputs": [], 118 | "source": [] 119 | } 120 | ], 121 | "metadata": { 122 | "kernelspec": { 123 | "display_name": "Bash", 124 | "language": "bash", 125 | "name": "bash" 126 | }, 127 | "language_info": { 128 | "codemirror_mode": "shell", 129 | "file_extension": ".sh", 130 | "mimetype": "text/x-sh", 131 | "name": "bash" 132 | } 133 | }, 134 | "nbformat": 4, 135 | "nbformat_minor": 5 136 | } 137 | -------------------------------------------------------------------------------- /notebooks/intro/components.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0086605a-f330-41bd-a79b-13339e0e5d58", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# What is CESM ? \n", 11 | "\n", 12 | "CESM is a coupled Earth system model for simulating Earth’s climate system and connected component systems. The model is composed of **separate models** that simultaneously simulate the Earth’s atmosphere, ocean, land, river run-off, land-ice, and sea-ice. The model components that are coupled through the Common Infrastructure for Modeling the Earth known as **[CIME](https://esmci.github.io/cime/versions/master/html/index.html)**. \n" 13 | ] 14 | }, 15 | { 16 | "cell_type": "markdown", 17 | "id": "bac52cc8-695c-49b9-9018-69503ad75f2f", 18 | "metadata": {}, 19 | "source": [ 20 | "![Discuss Image](../../images/intro/CESM2.png)\n", 21 | "*

Figure: CESM2 Structure

*" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "id": "cd1f097c-1b20-4905-9af1-1b7c3901cb79", 27 | "metadata": {}, 28 | "source": [ 29 | "## Model Components\n", 30 | "\n", 31 | "Each model component has a page on the CESM website containing descriptions and documentation for active or prognostic models. \n", 32 | "\n", 33 | "You can explore each of the component models and CIME from the links below." 34 | ] 35 | }, 36 | { 37 | "cell_type": "markdown", 38 | "id": "16519007-3902-4d9e-bdb4-380208c14e33", 39 | "metadata": {}, 40 | "source": [ 41 | "
\n", 42 | "Component Links:\n", 43 | " \n", 44 | "- ``Atmosphere`` \n", 45 | "- ``Land`` \n", 46 | "- ``Land Ice`` \n", 47 | "- ``Ocean`` \n", 48 | "- ``River Runoff`` \n", 49 | "- ``Sea Ice`` \n", 50 | "- ``Wave`` \n", 51 | "- ``CIME`` \n", 52 | " \n", 53 | "
" 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "id": "3e00f9ea-6161-4090-ba36-7f4022e9e467", 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [] 63 | } 64 | ], 65 | "metadata": { 66 | "kernelspec": { 67 | "display_name": "Python 3 (ipykernel)", 68 | "language": "python", 69 | "name": "python3" 70 | }, 71 | "language_info": { 72 | "codemirror_mode": { 73 | "name": "ipython", 74 | "version": 3 75 | }, 76 | "file_extension": ".py", 77 | "mimetype": "text/x-python", 78 | "name": "python", 79 | "nbconvert_exporter": "python", 80 | "pygments_lexer": "ipython3", 81 | "version": "3.10.13" 82 | }, 83 | "toc-showcode": false 84 | }, 85 | "nbformat": 4, 86 | "nbformat_minor": 5 87 | } 88 | -------------------------------------------------------------------------------- /notebooks/intro/coupling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "163311c4-af4e-4ac5-bfa1-20fc25016f28", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# CIME (Advanced)\n" 11 | ] 12 | }, 13 | { 14 | "cell_type": "markdown", 15 | "id": "b247f4d7-ca36-4b62-bc4d-007c42ed9892", 16 | "metadata": {}, 17 | "source": [ 18 | "The Combined Model Components form the coupled CESM through a shared common set of tools and infrastructure and coupling framework. Here we describe the Common Infrastructure for Modeling the Earth otherwise known as [CIME](https://esmci.github.io/cime/versions/master/html/index.html), as well as the current CESM2 and future coupling frameworks.\n" 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "id": "e5ddb5ae-4b5f-4f55-8242-5b8e86c831c8", 24 | "metadata": {}, 25 | "source": [ 26 | "## Common Infrastructure for Modeling the Earth (CIME)" 27 | ] 28 | }, 29 | { 30 | "cell_type": "markdown", 31 | "id": "9dca3b1b-e249-4e6c-b34c-46efc6cdc144", 32 | "metadata": {}, 33 | "source": [ 34 | "The Common Infrastructure for Modeling the Earth is a python-based framework that is shared between CESM2 and other modeling center efforts to ensure efficient \n", 35 | "coordination of model development. The schema below shows some of the science benefits and organizations that are using the CIME infrastructure. \n", 36 | "

\n" 37 | ] 38 | }, 39 | { 40 | "cell_type": "markdown", 41 | "id": "d973f124-8754-4bf6-a089-2509ea267671", 42 | "metadata": {}, 43 | "source": [ 44 | "![CESM directories and namelists](../../images/intro/CESM2_CIME_Infrastructure.png)\n", 45 | "*

Figure: Overview of the CESM2 Common Infrastructure for Modeling the Earth (CIME)

*\n" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "id": "4c689c94-e8c6-40a6-a2a0-0fa873d1f111", 51 | "metadata": {}, 52 | "source": [ 53 | "## Model Coupling Toolkit (MCT)" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "id": "03cb0afa-459e-44f2-948b-452195c8589d", 59 | "metadata": {}, 60 | "source": [ 61 | "The CESM2 coupling is performed through the Model Coupling Toolkit (MCT). Additionally, the MCT coupling framework allows data and stub components to \n", 62 | "replace active or prognostic components providing flexible activation/deactivation of feedbacks. \n", 63 | "The schematic below shows all of the components and their connections.\n", 64 | "

\n" 65 | ] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "id": "9bc59881-d61d-49a0-8178-f5ffba630a41", 70 | "metadata": {}, 71 | "source": [ 72 | "![CESM directories and namelists](../../images/intro/CESM2_MCT_Coupling.png)\n", 73 | "*

Figure: Overview of the CESM2 Components and Model Coupling Toolkit (MCT)

*\n" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "id": "9c213a95-b901-4db3-b263-4bf2d3e54196", 79 | "metadata": {}, 80 | "source": [ 81 | "## Earth System Modeling Framework (ESMF) Coupling" 82 | ] 83 | }, 84 | { 85 | "cell_type": "markdown", 86 | "id": "70a62a59-021b-4798-9e77-7ff786f54e7e", 87 | "metadata": {}, 88 | "source": [ 89 | "Coupling development beyond CESM2 will be changing to the Earth System Modeling Framework (ESMF) National Unified Operational Prediction Capability (NUOPC) framework. More details on NUOPC can be found at \n", 90 | " https://earthsystemmodeling.org/nuopc/ . The schema below shows the new CESM configuration and coupling with NUOPC.\n", 91 | "

" 92 | ] 93 | }, 94 | { 95 | "cell_type": "markdown", 96 | "id": "d9569358-6f6b-4fcc-9909-11e295957bca", 97 | "metadata": {}, 98 | "source": [ 99 | "\n", 100 | "![CESM directories and namelists](../../images/intro/CESM_NUOPC_Coupling.png)\n", 101 | "*

Figure: Overview of the new CESM Components and National Unified Operational Prediction Capability (NUOPC) framework

*" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": null, 107 | "id": "40abbd6b-70cb-427b-a468-9311191be2a7", 108 | "metadata": {}, 109 | "outputs": [], 110 | "source": [] 111 | } 112 | ], 113 | "metadata": { 114 | "kernelspec": { 115 | "display_name": "Python 3 (ipykernel)", 116 | "language": "python", 117 | "name": "python3" 118 | }, 119 | "language_info": { 120 | "codemirror_mode": { 121 | "name": "ipython", 122 | "version": 3 123 | }, 124 | "file_extension": ".py", 125 | "mimetype": "text/x-python", 126 | "name": "python", 127 | "nbconvert_exporter": "python", 128 | "pygments_lexer": "ipython3", 129 | "version": "3.10.13" 130 | }, 131 | "toc-showcode": false 132 | }, 133 | "nbformat": 4, 134 | "nbformat_minor": 5 135 | } 136 | -------------------------------------------------------------------------------- /notebooks/intro/getting_help.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Getting Help\n" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "de6ee277-ec79-4c5f-9cbf-d2901dd20ba3", 14 | "metadata": {}, 15 | "source": [ 16 | "As you gain experience using and running CESM, you may want additional sources of information to help with problem solving, designing modeling experiments, runtime issues, etc." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "aa8da793-cfa0-472f-980e-6ec0c5478791", 22 | "metadata": {}, 23 | "source": [ 24 | "## DiscussCESM Forums" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "3dfb2ac3-aeb3-421a-a8ea-636ffe0a61b4", 30 | "metadata": {}, 31 | "source": [ 32 | "The DiscussCESM or Bulletin Board forum is an excellent location to post questions or to search through previously posted and answered questions in regard to problems encounter while using CESM.\n", 33 | "\n", 34 | "Register as a forums user by entering your valid information in the registration form. You can subscribe to forums of interest -- especially the “Announcements” and “Known Problems” -- and this way we can communicate updates to you.\n" 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "id": "153bdbd3-d587-4125-8f90-a69496f5f264", 40 | "metadata": {}, 41 | "source": [ 42 | "
\n", 43 | "\n", 44 | "[DiscussCESM Forum](https://bb.cgd.ucar.edu/cesm/)\n", 45 | "\n", 46 | "
" 47 | ] 48 | }, 49 | { 50 | "cell_type": "markdown", 51 | "id": "f5f4bfa4-9482-4e29-8a9b-b4082ae8f452", 52 | "metadata": {}, 53 | "source": [ 54 | "![Discuss Image](../../images/intro/CESM2_Discuss.png)\n", 55 | "*

Figure: CESM2 Discuss Bulletin Board

*" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": null, 61 | "id": "1dedd34e-f4c7-452d-b31e-b80acc32609a", 62 | "metadata": {}, 63 | "outputs": [], 64 | "source": [] 65 | } 66 | ], 67 | "metadata": { 68 | "kernelspec": { 69 | "display_name": "Python 3 (ipykernel)", 70 | "language": "python", 71 | "name": "python3" 72 | }, 73 | "language_info": { 74 | "codemirror_mode": { 75 | "name": "ipython", 76 | "version": 3 77 | }, 78 | "file_extension": ".py", 79 | "mimetype": "text/x-python", 80 | "name": "python", 81 | "nbconvert_exporter": "python", 82 | "pygments_lexer": "ipython3", 83 | "version": "3.10.13" 84 | } 85 | }, 86 | "nbformat": 4, 87 | "nbformat_minor": 5 88 | } 89 | -------------------------------------------------------------------------------- /notebooks/intro/getting_involved.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Getting Involved\n" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "3d14afe8-0247-4446-a1d4-1a2859156d90", 14 | "metadata": {}, 15 | "source": [ 16 | "## CESM Events" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "ae8ef153-ef12-4306-97d7-9d1ce6cda746", 22 | "metadata": {}, 23 | "source": [ 24 | "CESM has a long history of open, Community Events. A schedule of CESM Events is maintained on the CESM Website. CESM events include Community and Working Group Meetings, Tutorials, Seminars, and other related events. The first Community workshop was held in 1996 and continues annually today, and there are winter working-group specific meetings.\n" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "d0a9d7fd-4003-4b94-8e42-2342a148909b", 30 | "metadata": {}, 31 | "source": [ 32 | "
\n", 33 | " \n", 34 | "[CESM Events](https://www.cesm.ucar.edu/events)\n", 35 | "\n", 36 | "
" 37 | ] 38 | }, 39 | { 40 | "cell_type": "markdown", 41 | "id": "9347c979-52dc-44f8-9d7f-57a74b722db4", 42 | "metadata": {}, 43 | "source": [ 44 | "![CESM Events Image](../../images/basics/CESM2_Events.png)\n", 45 | "*

Figure: CESM2 Events Page

*" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "id": "e231cf65-e68f-4767-a5f1-0a59ad02922c", 51 | "metadata": {}, 52 | "source": [ 53 | "**We hope to see you at a future CESM workshop!**" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "id": "2fc2e42c-dcfa-45aa-a16b-c1846590f2f9", 59 | "metadata": {}, 60 | "source": [ 61 | "## CESM Email Lists" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "id": "a459419f-4e90-4aac-a7f4-13ce597afd1c", 67 | "metadata": {}, 68 | "source": [ 69 | "There are a number of email lists for the CESM community that you can join to receive updates for the whole CESM community or for particular working groups." 70 | ] 71 | }, 72 | { 73 | "cell_type": "markdown", 74 | "id": "002db32d-d135-446c-9c01-c6807467ae32", 75 | "metadata": {}, 76 | "source": [ 77 | "
\n", 78 | "\n", 79 | "[CESM Email lists](https://www.cesm.ucar.edu/about/faqs)\n", 80 | "\n", 81 | "
" 82 | ] 83 | }, 84 | { 85 | "cell_type": "markdown", 86 | "id": "47c38994-bf8c-4cf3-8112-9e6b871398de", 87 | "metadata": {}, 88 | "source": [ 89 | "## CESM Github Alerts" 90 | ] 91 | }, 92 | { 93 | "cell_type": "markdown", 94 | "id": "df28fe76-4efe-491c-8784-3c4f0fb2fd04", 95 | "metadata": {}, 96 | "source": [ 97 | "If you create a github account and opt-in, you can watch CESM related repositories." 98 | ] 99 | }, 100 | { 101 | "cell_type": "markdown", 102 | "id": "909d4342-cfab-40ea-90bc-bf9c713939c5", 103 | "metadata": {}, 104 | "source": [ 105 | "
\n", 106 | "\n", 107 | "[CESM Github](https://github.com/ESCOMP/CESM)\n", 108 | "\n", 109 | "
" 110 | ] 111 | }, 112 | { 113 | "cell_type": "markdown", 114 | "id": "30eb47fb-19c2-4b0a-a0c6-ae412f018ef3", 115 | "metadata": {}, 116 | "source": [ 117 | "![Discuss Image](../../images/intro/CESM_github.png)\n", 118 | "*

Figure: CESM2 Github Page

*" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": null, 124 | "id": "1dedd34e-f4c7-452d-b31e-b80acc32609a", 125 | "metadata": {}, 126 | "outputs": [], 127 | "source": [] 128 | } 129 | ], 130 | "metadata": { 131 | "kernelspec": { 132 | "display_name": "Python 3 (ipykernel)", 133 | "language": "python", 134 | "name": "python3" 135 | }, 136 | "language_info": { 137 | "codemirror_mode": { 138 | "name": "ipython", 139 | "version": 3 140 | }, 141 | "file_extension": ".py", 142 | "mimetype": "text/x-python", 143 | "name": "python", 144 | "nbconvert_exporter": "python", 145 | "pygments_lexer": "ipython3", 146 | "version": "3.10.13" 147 | } 148 | }, 149 | "nbformat": 4, 150 | "nbformat_minor": 5 151 | } 152 | -------------------------------------------------------------------------------- /notebooks/intro/intro_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Introduction" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "f0015117-d84f-471e-9bc5-ba87dc050baf", 14 | "metadata": {}, 15 | "source": [ 16 | "Welcome to the world of the **Community Earth System Model (CESM)**. This introduction will discuss the structure of the CESM model, provide information about how to become more involved in the CESM community, and how to get help if required.\n" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "8a108581-ab10-4779-b8a7-da44ccaf4495", 22 | "metadata": {}, 23 | "source": [ 24 | "## Visualizing this documentation" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "864d5c25-d84a-437a-b86f-65a5211db5e8", 30 | "metadata": {}, 31 | "source": [ 32 | "Depending on your computer settings, you may see this documentation with a **white** or **black background**. To toggle between these settings click the sun or moon in the upper right of the page (see red arrow below). \n", 33 | "\n", 34 | "We have developed the documentation with the **white background** and recommend you use these settings. If you choose to use the dark background it is possible some of the visualizations will be more difficult to read." 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "id": "1a9457c9-8717-4882-b6b2-311ce7ff899c", 40 | "metadata": {}, 41 | "source": [ 42 | "![Light/Dark mode](../../images/intro/light_dark_mode.png)\n", 43 | "\n", 44 | "*

Figure: How to change between light/dark mode.

*" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "id": "7f68efa6-c770-4448-aa2a-13882b8fd5f4", 50 | "metadata": {}, 51 | "source": [ 52 | "## Advanced Knowledge\n", 53 | "\n", 54 | "Some of the pages of this tutorial are marked as **Advanced**. Feel free to skip these as needed." 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "id": "acd1bd32-84b7-4d4e-9688-605a832766e6", 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [] 64 | } 65 | ], 66 | "metadata": { 67 | "kernelspec": { 68 | "display_name": "Python 3 (ipykernel)", 69 | "language": "python", 70 | "name": "python3" 71 | }, 72 | "language_info": { 73 | "codemirror_mode": { 74 | "name": "ipython", 75 | "version": 3 76 | }, 77 | "file_extension": ".py", 78 | "mimetype": "text/x-python", 79 | "name": "python", 80 | "nbconvert_exporter": "python", 81 | "pygments_lexer": "ipython3", 82 | "version": "3.10.13" 83 | } 84 | }, 85 | "nbformat": 4, 86 | "nbformat_minor": 5 87 | } 88 | -------------------------------------------------------------------------------- /notebooks/modifications/xml.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Simple XML Modifications" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "09b1ddf9-0892-4a46-bfa6-11fa05eac358", 14 | "metadata": {}, 15 | "source": [ 16 | "We use XML files to control case settings. This is what we cover in this chapter:\n", 17 | "- The section *Overview* describes what XML files are and the primary files used in CESM.\n", 18 | "- You will then learn how to query and change XML variables.\n", 19 | "- Next, we describe some of the main XML variables used to control run length or run type. \n", 20 | "- The section *Exercise Overview* offers opportunities to practice the concepts learned in this chapter." 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "bb5bff3c-1583-4653-8286-f45e4cc86b5f", 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [] 30 | } 31 | ], 32 | "metadata": { 33 | "kernelspec": { 34 | "display_name": "Python 3 (ipykernel)", 35 | "language": "python", 36 | "name": "python3" 37 | }, 38 | "language_info": { 39 | "codemirror_mode": { 40 | "name": "ipython", 41 | "version": 3 42 | }, 43 | "file_extension": ".py", 44 | "mimetype": "text/x-python", 45 | "name": "python", 46 | "nbconvert_exporter": "python", 47 | "pygments_lexer": "ipython3", 48 | "version": "3.10.13" 49 | } 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 5 53 | } 54 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/copying_cases.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Copying Cases \n", 9 | "\n", 10 | "This is a placeholder for this lesson." 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3 (ipykernel)", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.9.12" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 5 35 | } 36 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/exercises.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "bfc54be9-aad8-420b-83c1-874ecd9cdc1b", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise Overview" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "eb20fd6b-c748-428f-a8dc-565b2c43dfe4", 14 | "metadata": {}, 15 | "source": [ 16 | "We will do three exercises to help us better understand xml modifications.\n", 17 | "\n", 18 | "- In Exercise 1, we will practice runtime variable modifications.\n", 19 | "- In Exercise 2, we will create a branch run and modify the ocean coupling frequency. \n", 20 | "- In Exercise 3, we will create a hybrid run and modify the atmosphere physics timestep. " 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "6b57bbfc-2712-460c-9da6-9545fe3e9869", 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [] 30 | } 31 | ], 32 | "metadata": { 33 | "kernelspec": { 34 | "display_name": "Python 3 (ipykernel)", 35 | "language": "python", 36 | "name": "python3" 37 | }, 38 | "language_info": { 39 | "codemirror_mode": { 40 | "name": "ipython", 41 | "version": 3 42 | }, 43 | "file_extension": ".py", 44 | "mimetype": "text/x-python", 45 | "name": "python", 46 | "nbconvert_exporter": "python", 47 | "pygments_lexer": "ipython3", 48 | "version": "3.9.12" 49 | } 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 5 53 | } 54 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/exercises/xml_timestep_exercise.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "bd28c148-b907-489d-9892-068ed48b11d9", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise 3: Change physics timestep" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "dddd8ba3-aa00-451c-938f-35b3927a016f", 14 | "metadata": {}, 15 | "source": [ 16 | "
\n", 17 | "\n", 18 | "Exercise: Change physics timestep in CAM and CLM

\n", 19 | "\n", 20 | "**Hybrid** start a fully coupled run under pre-Industrial conditions with a resolution of f19_g17. \n", 21 | "\n", 22 | "Use restart and initial files from the run ``b1850.initial`` at year 2. The restart files for this run are located in: \n", 23 | "```\n", 24 | "/glade/campaign/cesm/tutorial/tutorial_2025_archive/b1850.initial/rest/0002-01-01-00000\n", 25 | "```\n", 26 | "\n", 27 | "Change the physics timestep in the atmosphere and land to 1200 seconds (default is 1800). Run 5 days.\n", 28 | " \n", 29 | "
" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "id": "f2dacddc-4f8f-4fb5-9664-65ab2618f97f", 35 | "metadata": {}, 36 | "source": [ 37 | "
\n", 38 | " \n", 39 | "
\n", 40 | " \n", 41 | " \n", 42 | " Hint!\n", 43 | " \n", 44 | "\n", 45 | "The atmosphere physics timestep is determined by the base period of coupling `NCPL_BASE_PERIOD` and the coupling frequency `ATM_NCPL`. \n", 46 | "Find out their default values using xmlquery.\n", 47 | " \n", 48 | " \n", 49 | "
\n", 50 | "
" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "id": "cb35e292-fcbb-45a6-9a28-f02a80df83a6", 56 | "metadata": {}, 57 | "source": [ 58 | "
\n", 59 | " \n", 60 | "
\n", 61 | " \n", 62 | " \n", 63 | " Click here for the solution\n", 64 | " \n", 65 | "\n", 66 | "
\n", 67 | "1. From the script directory, create your case:\n", 68 | " \n", 69 | "```\n", 70 | " cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts/\n", 71 | " ./create_newcase --case /glade/u/home/$USER/cases/b1850.timestep --res f19_g17 --compset B1850\n", 72 | "```\n", 73 | " \n", 74 | "
\n", 75 | "2. In your case directory, change run type and runtime variables:\n", 76 | " \n", 77 | "```\n", 78 | " cd /glade/u/home/$USER/cases/b1850.timestep\n", 79 | " ./xmlchange RUN_TYPE=hybrid\n", 80 | " ./xmlchange RUN_REFCASE=b1850.initial,RUN_REFDATE=0002-01-01,GET_REFCASE=FALSE,JOB_WALLCLOCK_TIME=2:00:00\n", 81 | "```\n", 82 | " \n", 83 | "
\n", 84 | "3. Change the physics timestep for CAM: \n", 85 | " \n", 86 | "```\n", 87 | " ./xmlchange ATM_NCPL=72\n", 88 | "```\n", 89 | "(Why `ATM_NCPL` = 72? Do the math).\n", 90 | "\n", 91 | "
\n", 92 | "4. Set up the case and position your initial and restart files in the `$RUNDIR`:\n", 93 | " \n", 94 | "```\n", 95 | " ./case.setup\n", 96 | " cp /glade/campaign/cesm/tutorial/tutorial_2023_archive/b1850.initial/rest/0002-01-01-00000/* /glade/derecho/scratch/$USER/b1850.timestep/run/\n", 97 | "```\n", 98 | " \n", 99 | "
\n", 100 | "5. Continue to build and submit: \n", 101 | " \n", 102 | "```\n", 103 | " qcmd -- ./case.build\n", 104 | " ./case.submit\n", 105 | "```\n", 106 | " \n", 107 | "Remember that `qcmd` is used on derecho only.\n", 108 | "\n", 109 | "
\n", 110 | "
" 111 | ] 112 | }, 113 | { 114 | "cell_type": "code", 115 | "execution_count": null, 116 | "id": "dd58b568-cd97-4a59-bd26-a6c13f3b0ba3", 117 | "metadata": {}, 118 | "outputs": [], 119 | "source": [] 120 | } 121 | ], 122 | "metadata": { 123 | "kernelspec": { 124 | "display_name": "Python 3 (ipykernel)", 125 | "language": "python", 126 | "name": "python3" 127 | }, 128 | "language_info": { 129 | "codemirror_mode": { 130 | "name": "ipython", 131 | "version": 3 132 | }, 133 | "file_extension": ".py", 134 | "mimetype": "text/x-python", 135 | "name": "python", 136 | "nbconvert_exporter": "python", 137 | "pygments_lexer": "ipython3", 138 | "version": "3.10.13" 139 | } 140 | }, 141 | "nbformat": 4, 142 | "nbformat_minor": 5 143 | } 144 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/modify_run_type.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Modifying the Type of Run \n", 9 | "\n", 10 | "CESM has three types of initial runs:\n", 11 | "- startup\n", 12 | "- branch\n", 13 | "- hybrid\n" 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "id": "fb99d6cf-09ee-45da-9af8-4d404709378a", 19 | "metadata": {}, 20 | "source": [ 21 | "\n", 22 | "The xml variable `$RUN_TYPE` determines the initialization type. \n", 23 | "\n", 24 | "Note that the `RUN_TYPE` setting is ***only important for the initial run*** of a production run when the `$CONTINUE_RUN` variable is set to `FALSE`. After the initial run, the `$CONTINUE_RUN` variable is set to `TRUE`, and the model restarts exactly using input files in a case, date, and bit-for-bit continuous fashion. " 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": null, 30 | "id": "9447be66-ca1f-4b05-b93c-4f1a0bb303ad", 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [] 34 | } 35 | ], 36 | "metadata": { 37 | "kernelspec": { 38 | "display_name": "Python 3 (ipykernel)", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "codemirror_mode": { 44 | "name": "ipython", 45 | "version": 3 46 | }, 47 | "file_extension": ".py", 48 | "mimetype": "text/x-python", 49 | "name": "python", 50 | "nbconvert_exporter": "python", 51 | "pygments_lexer": "ipython3", 52 | "version": "3.9.12" 53 | } 54 | }, 55 | "nbformat": 4, 56 | "nbformat_minor": 5 57 | } 58 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/modify_run_type/run_variables.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Variables Related to Run Type\n", 9 | "\n", 10 | "A summary of the xml variables pertaining to run type in `env_run.xml`. \n", 11 | "\n", 12 | "
\n", 13 | "\n", 14 | "***\n" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "id": "a0652973-f463-4459-bcd1-0027c3cc2c9e", 20 | "metadata": {}, 21 | "source": [ 22 | "- **`RUN_TYPE`** ==> Determines the model run initialization type. Only important for the initial run of a production run when the `$CONTINUE_RUN` variable is set to `FALSE`. Valid values are: 'startup', 'hybrid', 'branch'. \n", 23 | "\n", 24 | "- **`RUN_STARTDATE`** ==> Run start date (yyyy-mm-dd). Only used for startup or hybrid runs. \n", 25 | "\n", 26 | "- **`RUN_REFCASE`** ==> For hybrid or branch runs, name of the reference case you are starting from. \n", 27 | "\n", 28 | "- **`RUN_REFDATE`** ==> For hybrid or branch runs, date stamp (yyyy-mm-dd) of reference case you are starting from. \n", 29 | "\n", 30 | "- **`GET_REFCASE`** ==> Flag for automatically prestaging the refcase restart dataset. If `TRUE`, then the refcase data is prestaged into the executable directory. If `FALSE`, the user need to manually put the restart files into the `$RUNDIR`. " 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "id": "26abab24-5108-4006-8f31-bf696f837aa4", 36 | "metadata": {}, 37 | "source": [] 38 | } 39 | ], 40 | "metadata": { 41 | "kernelspec": { 42 | "display_name": "Python 3 (ipykernel)", 43 | "language": "python", 44 | "name": "python3" 45 | }, 46 | "language_info": { 47 | "codemirror_mode": { 48 | "name": "ipython", 49 | "version": 3 50 | }, 51 | "file_extension": ".py", 52 | "mimetype": "text/x-python", 53 | "name": "python", 54 | "nbconvert_exporter": "python", 55 | "pygments_lexer": "ipython3", 56 | "version": "3.9.12" 57 | } 58 | }, 59 | "nbformat": 4, 60 | "nbformat_minor": 5 61 | } 62 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/other_xml_variables.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8f61eb16-f182-4b94-9959-5fb517a5bc7e", 6 | "metadata": {}, 7 | "source": [ 8 | "# Other Useful XML Variables " 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "b616dc75-7fd6-46db-8e96-27278c7ec731", 14 | "metadata": {}, 15 | "source": [ 16 | "Here are some more xml variables in `env_run.xml` that you may encounter:\n", 17 | "\n", 18 | "- `INFO_DBUG` ==> sets the level of stdout (standard out) print statements. This variable is useful for debugging. If debugging, a higher value may be set. \n", 19 | "- `DOUT_S` ==> turns on short-term archiving. `DOUT_S` is set to `TRUE` by default. \n", 20 | "- `HIST_OPTION` ==> sets driver snapshot history file frequency. \n", 21 | "- `CCSM_CO2_PPMV` ==> CO2 value to be propogated to the ocean component POP and the land component CLM, when `OCN_CO2_TYPE` and `CLM_CO2_TYPE` are set to `'constant'`. \n" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "7d74f86e-c1dc-45a3-845f-2d0200fbedbd", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [] 31 | } 32 | ], 33 | "metadata": { 34 | "kernelspec": { 35 | "display_name": "Python 3 (ipykernel)", 36 | "language": "python", 37 | "name": "python3" 38 | }, 39 | "language_info": { 40 | "codemirror_mode": { 41 | "name": "ipython", 42 | "version": 3 43 | }, 44 | "file_extension": ".py", 45 | "mimetype": "text/x-python", 46 | "name": "python", 47 | "nbconvert_exporter": "python", 48 | "pygments_lexer": "ipython3", 49 | "version": "3.9.12" 50 | } 51 | }, 52 | "nbformat": 4, 53 | "nbformat_minor": 5 54 | } 55 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# Overview \n", 11 | "\n", 12 | "What is an XML file, and how do we use it in CESM?" 13 | ] 14 | }, 15 | { 16 | "cell_type": "markdown", 17 | "id": "55a68c69-196d-42c3-ae01-ad55f10daa6d", 18 | "metadata": {}, 19 | "source": [ 20 | "***" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "id": "0637e559-0f3c-46b3-bc80-f7fe1081387a", 26 | "metadata": {}, 27 | "source": [ 28 | "## 1. What is an XML file?\n", 29 | "\n", 30 | "XML (Extensible Markup Language) is a markup language that defines a syntax for encoding documents that both humans and machines could read. It is used to describe data in a structured way and defines how the document should be stored and transported." 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "id": "027b5e63-e318-411e-b854-9109fc0491ce", 36 | "metadata": {}, 37 | "source": [ 38 | "
\n", 39 | "\n", 40 | "[Additional information on XML files](https://www.howtogeek.com/357092/what-is-an-xml-file-and-how-do-i-open-one/)\n", 41 | "\n", 42 | "
" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "id": "fa35fe32-ea6a-4e3e-9a9a-070697bca22f", 48 | "metadata": {}, 49 | "source": [ 50 | "\n", 51 | "***" 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "id": "57f433ea-3424-447f-b6e7-68673a40d24d", 57 | "metadata": {}, 58 | "source": [ 59 | "## 2. CESM XML files and CESM environment variables" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "id": "0c67affb-108e-4005-8329-ccd19ef87eda", 65 | "metadata": {}, 66 | "source": [ 67 | "CESM cases are customized, built and run largely through setting what CESM calls **\"environment variables\"**. These actually appear to the user as variables defined in xml files. \n", 68 | "\n", 69 | "\n", 70 | "These files appear in the case directory (`$CASEROOT`) once a case is created and are named something like **`env_*.xml`**. We control how we compile and run the model with these files." 71 | ] 72 | }, 73 | { 74 | "cell_type": "markdown", 75 | "id": "e58d2ab9-957f-4078-a7eb-5b7091c28616", 76 | "metadata": {}, 77 | "source": [ 78 | "## XML file locations\n", 79 | "\n", 80 | "![CESM xml files](../../../images/modifications/CESM2_xml_files.png)\n", 81 | "*

Figure: Overview of the XML file locations

*\n", 82 | "For the current tutorial on derecho, the paths are:\n", 83 | "- `$CASEROOT` = `/glade/u/home/$USER/cases/$CASE`" 84 | ] 85 | }, 86 | { 87 | "cell_type": "markdown", 88 | "id": "cce5ecd7-e613-47bd-8c4b-1e547b2a75ae", 89 | "metadata": {}, 90 | "source": [ 91 | "There are multiple **`env_*.xml`** files in the `$CASEROOT` directory:\n", 92 | "\n", 93 | "- `env_archive.xml`: specifies rules for short term archive script `case.st_archive`\n", 94 | "- `env_batch.xml`: specifies batch specific settings used in `case.submit` script\n", 95 | "- `env_build.xml`: specifies build information used in the `case.build` script\n", 96 | "- `env_case.xml`: set by create_newcase and **cannot** be modified\n", 97 | "- `env_mach_pes.xml`: specifies PE layout on NCAR HPC for components and used by `case.run` script \n", 98 | "- `env_mach_specific.xml`: specifies machine specific information used in `case.build` script\n", 99 | "- `env_run.xml`: sets run time information (such as length of run, number of submissions, …)\n" 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "id": "58df9e9f-ef86-4a65-91c2-4b829b33a86e", 105 | "metadata": {}, 106 | "source": [ 107 | "In this section, we will learn and practice **modifying CESM run length and run type using `env_run.xml`**!" 108 | ] 109 | } 110 | ], 111 | "metadata": { 112 | "kernelspec": { 113 | "display_name": "Python 3 (ipykernel)", 114 | "language": "python", 115 | "name": "python3" 116 | }, 117 | "language_info": { 118 | "codemirror_mode": { 119 | "name": "ipython", 120 | "version": 3 121 | }, 122 | "file_extension": ".py", 123 | "mimetype": "text/x-python", 124 | "name": "python", 125 | "nbconvert_exporter": "python", 126 | "pygments_lexer": "ipython3", 127 | "version": "3.10.13" 128 | } 129 | }, 130 | "nbformat": 4, 131 | "nbformat_minor": 5 132 | } 133 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/physics_timestep.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Physics Timestep\n", 9 | "\n", 10 | "**Where and When to Change Time Steps**:\n", 11 | "\n", 12 | "When the model crashes due to large, temporary instabilities, one method to overcome the problem is to change the time step.\n", 13 | "This is typically done in either the atmosphere or ocean components. \n", 14 | "\n", 15 | "- For atmosphere and land component (CAM/CLM): change `ATM_NCPL` in `env_run.xml`.
\n", 16 | "- For ocean (POP): change `dt_count` in POP namelist. \n", 17 | "\n", 18 | "
\n", 19 | "\n", 20 | "***\n", 21 | "\n", 22 | "
" 23 | ] 24 | }, 25 | { 26 | "cell_type": "markdown", 27 | "id": "dc35cf0e-f3be-4a26-b2f0-0b716ca440f1", 28 | "metadata": {}, 29 | "source": [ 30 | "- **For the atmosphere component (CAM)**, the physics time step is set by `ATM_NCPL` and `NCPL_BASE_PERIOD`in `env_run.xml`. `NCPL_BASE_PERIOD` specifies base period associated with coupling frequency, the default value is \"day\". The `ATM_NCPL` variable specifies the number of coupling intervals per `NCPL_BASE_PERIOD` between the atmosphere/land and the coupled system. Based on these two variables, the scripts will automatically compute the time step for the atmosphere and land and populate the namelist files accordingly. For example, if `NCPL_BASE_PERIOD` is set to \"day\", and `ATM_NCPL` is 48, then the timestep is 1800 seconds. \n", 31 | "\n", 32 | "- **For the land component (CLM)**, the physics ime step is the same as the CAM time step; this is automatically set with the CAM time step via `ATM_NCPL`. You cannot set this separately.\n", 33 | "\n", 34 | "- **For the ocean component (POP2)**, the physics time step is changed in the `user_nl_pop` file and is based on `$OCN_NCPL` (found in `env_run.xml`), `dt_count` , and `dt_option`. The default `dt_option` is `“steps_per_day”`.\n", 35 | "\n", 36 | "- **For the sea ice component (CICE)**, the physics time step is set by the coupling interval variable `$ICE_NCPL` found in env_run.xml. " 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": null, 42 | "id": "d227999f-f3c0-4ae7-adbc-558cc7a6f287", 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [] 46 | } 47 | ], 48 | "metadata": { 49 | "kernelspec": { 50 | "display_name": "Python 3 (ipykernel)", 51 | "language": "python", 52 | "name": "python3" 53 | }, 54 | "language_info": { 55 | "codemirror_mode": { 56 | "name": "ipython", 57 | "version": 3 58 | }, 59 | "file_extension": ".py", 60 | "mimetype": "text/x-python", 61 | "name": "python", 62 | "nbconvert_exporter": "python", 63 | "pygments_lexer": "ipython3", 64 | "version": "3.9.12" 65 | } 66 | }, 67 | "nbformat": 4, 68 | "nbformat_minor": 5 69 | } 70 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/run_length.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Controlling Run Length \n", 9 | "\n", 10 | "The length of your model run is controlled by several run time variables in the **`env_run.xml`** file. \n", 11 | "These variables may be modified at the initialization of the model run and during the course of the model run. \n", 12 | "\n", 13 | "These variables comprise coupler namelist settings for the model stop time, model restart frequency, coupler history frequency and a flag to determine if the run should be flagged as a continuation run." 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "id": "b69bbda8-c906-420f-a782-7da8f223c8bc", 19 | "metadata": {}, 20 | "source": [ 21 | "We will learn about customizing runtime settings to control starting, stopping, restarting and continuing a model run, and practice how to specify the run length of your long simulations. \n" 22 | ] 23 | } 24 | ], 25 | "metadata": { 26 | "kernelspec": { 27 | "display_name": "Python 3 (ipykernel)", 28 | "language": "python", 29 | "name": "python3" 30 | }, 31 | "language_info": { 32 | "codemirror_mode": { 33 | "name": "ipython", 34 | "version": 3 35 | }, 36 | "file_extension": ".py", 37 | "mimetype": "text/x-python", 38 | "name": "python", 39 | "nbconvert_exporter": "python", 40 | "pygments_lexer": "ipython3", 41 | "version": "3.9.12" 42 | } 43 | }, 44 | "nbformat": 4, 45 | "nbformat_minor": 5 46 | } 47 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/run_length/number_of_submissions.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Controlling the Number of Submissions \n", 9 | "\n", 10 | "and continue_run" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "id": "e59cdc0f-21dc-430d-bdb9-1f9c9f2d7bcb", 17 | "metadata": {}, 18 | "outputs": [], 19 | "source": [] 20 | } 21 | ], 22 | "metadata": { 23 | "kernelspec": { 24 | "display_name": "Python 3 (ipykernel)", 25 | "language": "python", 26 | "name": "python3" 27 | }, 28 | "language_info": { 29 | "codemirror_mode": { 30 | "name": "ipython", 31 | "version": 3 32 | }, 33 | "file_extension": ".py", 34 | "mimetype": "text/x-python", 35 | "name": "python", 36 | "nbconvert_exporter": "python", 37 | "pygments_lexer": "ipython3", 38 | "version": "3.9.12" 39 | } 40 | }, 41 | "nbformat": 4, 42 | "nbformat_minor": 5 43 | } 44 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/run_length/starting_and_stopping.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Starting and Stopping \n", 9 | "\n", 10 | "To start a model run, we will need to submit `$CASE.run` to the batch queue. In addition, we will also need to specify how long we want to run the model in `env_run.xml`. \n", 11 | "\n", 12 | "\n", 13 | "We will learn how to modify the runtime variables in `env_run.xml` to initialize, stop and restart a CESM model run." 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "id": "ec38ef4d-2a68-44e8-a731-c55e1a2d940a", 19 | "metadata": {}, 20 | "source": [ 21 | "
\n", 22 | "\n", 23 | "***\n" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "id": "344c4fb8-da46-44c1-8a64-6808e7b3a814", 29 | "metadata": {}, 30 | "source": [ 31 | "## 1. \"Initial run\" and \"continue run\"\n", 32 | "\n", 33 | "When a CESM model run is first initialized, it is called an **initial run**. \n", 34 | "\n", 35 | "The variable **`$CONTINUE_RUN`** is a flag indicating if the current model run is an **initial run** or a **continue run**. \n", 36 | "- For an intial run, `CONTINUE_RUN` must be set to *`FALSE`*, \n", 37 | "- If the model continues a run, `CONTINUE_RUN` is set to *`TRUE`*. \n", 38 | "\n", 39 | "Your initial CESM run can be initialized in one of three run types: startup, branch,or hybrid. We will get into more details about the **run types** in the Chapter [Modifying Run Types](../modify_run_type/hybrid_branch_restart.ipynb). \n", 40 | "\n", 41 | "For now, we need to know that **setting run types is only important for an initial run when `CONTINUE_RUN` is set to `FALSE`**. \n", 42 | "\n" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "id": "37195fbd-8a4f-45f8-81b6-7042bcbf5f08", 48 | "metadata": {}, 49 | "source": [ 50 | "
\n", 51 | "\n", 52 | "****\n", 53 | "\n" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "id": "fa6734b1-bb5e-4fc3-96b7-df867adbbf04", 59 | "metadata": {}, 60 | "source": [ 61 | "## 2. Set runtime limits with **`STOP_OPTION`** and **`STOP_N`**" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "id": "68eef81e-bd50-43e1-9961-15d0712d17d3", 67 | "metadata": {}, 68 | "source": [ 69 | "Run length options can be set using **`$STOP_OPTION`** and **`$STOP_N`** variables in env_run.xml. \n", 70 | "\n", 71 | "- `STOP_OPTION` : sets the run length time interval type, i.e. nmonths, ndays, nyears.\n", 72 | "- `STOP_N` : sets the number of intervals (set by `STOP_OPTION`) to run the model during each submission within the specified wallclock time. " 73 | ] 74 | }, 75 | { 76 | "cell_type": "markdown", 77 | "id": "da97a05c-ef45-4473-8f05-032aed8dfcf9", 78 | "metadata": {}, 79 | "source": [ 80 | "
\n", 81 | "For example, if you want to run a simulation for 6 months during the job submssion, you will need to set:\n", 82 | "\n", 83 | "```\n", 84 | "./xmlchange STOP_N=6\n", 85 | "./xmlchange STOP_OPTION='nmonths'\n", 86 | "```" 87 | ] 88 | }, 89 | { 90 | "cell_type": "markdown", 91 | "id": "c5947ac5-c8d6-4abb-9ea7-bce711f48ddd", 92 | "metadata": {}, 93 | "source": [ 94 | "
\n", 95 | "\n", 96 | "`STOP_N` and `STOP_OPTION` control the length of the run **per job submission**. They should be set based on the job queue limit and model throughput. You can find more information on this topic in the chapter [Using timing files](./timing_files.ipynb).\n", 97 | "\n", 98 | "
\n", 99 | "\n", 100 | "A typical simulation is comprised of many job submissions. This is because you can only stay in the computer queue for a limited time. We will learn more about completing long simulations in the chapter [Changing run length](./changing_run_length.ipynb)." 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": null, 106 | "id": "c99fbe29-f232-4534-8476-d12bbbc41ffe", 107 | "metadata": {}, 108 | "outputs": [], 109 | "source": [] 110 | } 111 | ], 112 | "metadata": { 113 | "kernelspec": { 114 | "display_name": "Python 3 (ipykernel)", 115 | "language": "python", 116 | "name": "python3" 117 | }, 118 | "language_info": { 119 | "codemirror_mode": { 120 | "name": "ipython", 121 | "version": 3 122 | }, 123 | "file_extension": ".py", 124 | "mimetype": "text/x-python", 125 | "name": "python", 126 | "nbconvert_exporter": "python", 127 | "pygments_lexer": "ipython3", 128 | "version": "3.9.12" 129 | } 130 | }, 131 | "nbformat": 4, 132 | "nbformat_minor": 5 133 | } 134 | -------------------------------------------------------------------------------- /notebooks/modifications/xml/run_length/timing_files.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Using Timing Files \n", 9 | "\n", 10 | "Model timing files contain a summary of various timing information for the run. It is helpful to check the timings after the run to verify that the model is running efficiently. \n", 11 | "\n", 12 | "
\n", 13 | "\n", 14 | "***" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "id": "78615f64-047d-421d-9436-925533cf6827", 20 | "metadata": {}, 21 | "source": [ 22 | "## 1. What are timing files and where are they located?\n", 23 | "\n", 24 | "A summary timing output file is produced after every CESM run. This file is placed in `$CASEROOT/timing/cesm_timing.$CASE.$date`, where $date is a datestamp set by CESM at runtime, and contains a summary of various timing information.\n", 25 | "\n", 26 | "The first section in the timing output, \"TIMING PROFILE\", summarizes general timing information for the run. The total run time and cost is given in several metrics including pe-hrs per simulated year (**cost**), simulated years per wall day (**thoughput**), seconds, and seconds per model day. This provides general summary information quickly in several units for analysis and comparison with other runs. The total run time for each component is also provided, as is the time for initialization of the model. These times are the aggregate over the total run and do not take into account any temporal or processor load imbalances.\n", 27 | "\n", 28 | "
\n", 29 | "\n", 30 | "***\n", 31 | "\n", 32 | "
\n" 33 | ] 34 | }, 35 | { 36 | "cell_type": "markdown", 37 | "id": "40e1c00d-ab11-427c-aa03-c6e0f366dceb", 38 | "metadata": { 39 | "tags": [] 40 | }, 41 | "source": [ 42 | "## 2. Use timing files to determine runtime variables\n", 43 | "\n", 44 | "Here is an example of cost information shown in a timing file:\n", 45 | "\n", 46 | "```\n", 47 | "Overall Metrics: \n", 48 | "Model Cost: 327.14 pe-hrs/simulated_year (scale= 0.50)\n", 49 | "Model Throughput: 4.70 simulated_years/day\n", 50 | "```\n", 51 | "\n", 52 | "The model throughput is the estimated number of model years that you can run in a wallclock day. Based on this, you can maximize `$CASE.run` queue limit and change `STOP_OPTION` and `STOP_N` in `env_run.xml`.\n", 53 | "\n", 54 | "For example, say a model’s throughput is 4.7 simulated_years/day. On derecho, the maximum runtime limit is 12 hours. 4.7 model years/24 hours * 12 hours = 2.34 years. On the massively parallel computers, there is always some variability in how long it will take a job to run. On some machines, you may need to leave as much as 20% buffer time in your run to guarantee that jobs finish reliably before the time limit. For that reason we will set our model to run only 2 model year/job. \n", 55 | "\n", 56 | "Continuing to assume that the run is on derecho, we can set:\n", 57 | "\n", 58 | "```\n", 59 | "./xmlchange STOP_OPTION='nyears'\n", 60 | "./xmlchange STOP_N=2\n", 61 | "```\n", 62 | "\n" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "id": "c03243b7-4aca-40d2-bdab-02312b58e016", 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [] 72 | } 73 | ], 74 | "metadata": { 75 | "kernelspec": { 76 | "display_name": "Python 3 (ipykernel)", 77 | "language": "python", 78 | "name": "python3" 79 | }, 80 | "language_info": { 81 | "codemirror_mode": { 82 | "name": "ipython", 83 | "version": 3 84 | }, 85 | "file_extension": ".py", 86 | "mimetype": "text/x-python", 87 | "name": "python", 88 | "nbconvert_exporter": "python", 89 | "pygments_lexer": "ipython3", 90 | "version": "3.9.12" 91 | } 92 | }, 93 | "nbformat": 4, 94 | "nbformat_minor": 5 95 | } 96 | -------------------------------------------------------------------------------- /notebooks/namelist/documentation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Namelist Variables Documentation\n", 9 | "\n", 10 | "\n", 11 | "
\n", 12 | "\n", 13 | "Complete documentation about the namelist variables can be found on the [CESM webpage.](https://www2.cesm.ucar.edu/models/cesm2/settings/current/)\n", 14 | "\n", 15 | "
\n", 16 | "\n", 17 | "For instance, if you want to change the **_output frequency_** in CAM, go to the website and type the word ``frequency`` in the search box as illustrated in *Figure 1*. " 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "id": "017b45ad-dcff-42b2-8623-06033b8e11d8", 23 | "metadata": {}, 24 | "source": [ 25 | "___\n", 26 | "![Search namelist variables](../../images/namelist/namelist_var_search.png)\n", 27 | "\n", 28 | "*

Figure 1: Search for a namelist variable.

*\n", 29 | "___" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "id": "42e1dd6f-c704-4f69-965a-a015d3d0baed", 35 | "metadata": {}, 36 | "source": [ 37 | "This will return the attributes of the namelist variable ``nhtfrq``, as illustrated in *Figure 2*. ``nhtfrq`` is the variable you need in order to change the output frequency of a history file. \n", 38 | "\n", 39 | "___\n", 40 | "![Attribute of a namelist variable](../../images/namelist/nhtfrq.png)\n", 41 | "\n", 42 | "*

Figure 2: Attribute of a namelist variable. Here the variable: ``nhtfrq``

*" 43 | ] 44 | } 45 | ], 46 | "metadata": { 47 | "kernelspec": { 48 | "display_name": "Python 3 (ipykernel)", 49 | "language": "python", 50 | "name": "python3" 51 | }, 52 | "language_info": { 53 | "codemirror_mode": { 54 | "name": "ipython", 55 | "version": 3 56 | }, 57 | "file_extension": ".py", 58 | "mimetype": "text/x-python", 59 | "name": "python", 60 | "nbconvert_exporter": "python", 61 | "pygments_lexer": "ipython3", 62 | "version": "3.9.12" 63 | } 64 | }, 65 | "nbformat": 4, 66 | "nbformat_minor": 5 67 | } 68 | -------------------------------------------------------------------------------- /notebooks/namelist/exercises_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise Overview \n", 9 | "\n", 10 | "## Learning Goals\n", 11 | "\n", 12 | "- Student will practice performing namelist changes. \n", 13 | "- Student will edit `user_nl_*` files, run the model and check the results.\n", 14 | "\n", 15 | "\n", 16 | "## Exercise overview:\n", 17 | "\n", 18 | "Do at least one exercise:\n", 19 | "- Output high frequency data in CAM.\n", 20 | "- Change a tuning parameter in CAM.\n" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "84583445-5875-44e3-91a1-14fe6db10093", 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [] 30 | } 31 | ], 32 | "metadata": { 33 | "kernelspec": { 34 | "display_name": "Python 3 (ipykernel)", 35 | "language": "python", 36 | "name": "python3" 37 | }, 38 | "language_info": { 39 | "codemirror_mode": { 40 | "name": "ipython", 41 | "version": 3 42 | }, 43 | "file_extension": ".py", 44 | "mimetype": "text/x-python", 45 | "name": "python", 46 | "nbconvert_exporter": "python", 47 | "pygments_lexer": "ipython3", 48 | "version": "3.9.12" 49 | } 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 5 53 | } 54 | -------------------------------------------------------------------------------- /notebooks/namelist/namelist.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Namelist Modifications" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "285a23b4-2906-4422-a8a8-987546de6f0c", 14 | "metadata": {}, 15 | "source": [ 16 | "There are several ways in which the model can be modified using namelist settings. This is what we cover in this chapter:\n", 17 | "- The section **_Overview_** describes the steps to modify the namelists and provides a visual representation of the directories and files that need to be modified.\n", 18 | "- The section **_Documentation_** explains how to find information about the namelist variables on the CESM webpage.\n", 19 | "- The section **_Customizing output_** describes how to customize the output history files, such as changing the output frequency or adding variables to a file.\n", 20 | "- The section **_Exercises_** offers opportunities to practice the concepts learned in this chapter. " 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "f7cf2d79-da13-416d-8345-385bc1977b79", 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [] 30 | } 31 | ], 32 | "metadata": { 33 | "kernelspec": { 34 | "display_name": "Python 3 (ipykernel)", 35 | "language": "python", 36 | "name": "python3" 37 | }, 38 | "language_info": { 39 | "codemirror_mode": { 40 | "name": "ipython", 41 | "version": 3 42 | }, 43 | "file_extension": ".py", 44 | "mimetype": "text/x-python", 45 | "name": "python", 46 | "nbconvert_exporter": "python", 47 | "pygments_lexer": "ipython3", 48 | "version": "3.9.12" 49 | } 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 5 53 | } 54 | -------------------------------------------------------------------------------- /notebooks/namelist/output.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Customizing Output\n" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "34b38707-9fbb-4e2a-bb99-5d3ddac76dc0", 14 | "metadata": {}, 15 | "source": [ 16 | "If you don't add anything to the namelist, CESM will generate its **``default output``**. This is what was done in previous chapters of this tutorial. Typically, the model outputs monthly means (and in some cases, higher frequency outputs) of a default set of variables. Depending on your needs, you may want to output variables at a different frequency, or add more variables, etc ... \n", 17 | "\n", 18 | "In this chapter **``Customizing output``**, we will cover how to output at a different frequency, add history files, or add variables to the history files.\n", 19 | "\n", 20 | "In the sections below, we provide the basics of customizing the output for the different components (atm, lnd, ice, and pop). The **``Customize CAM output``** is the most **_comprehensive_**, so we recommend **_at least reviewing that section_**." 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "fd23aec3-cb79-432b-96e1-dcad3c071a90", 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [] 30 | }, 31 | { 32 | "cell_type": "code", 33 | "execution_count": null, 34 | "id": "4115c790-a2b3-41c1-8291-db1a9de90ef3", 35 | "metadata": {}, 36 | "outputs": [], 37 | "source": [] 38 | } 39 | ], 40 | "metadata": { 41 | "kernelspec": { 42 | "display_name": "Python 3 (ipykernel)", 43 | "language": "python", 44 | "name": "python3" 45 | }, 46 | "language_info": { 47 | "codemirror_mode": { 48 | "name": "ipython", 49 | "version": 3 50 | }, 51 | "file_extension": ".py", 52 | "mimetype": "text/x-python", 53 | "name": "python", 54 | "nbconvert_exporter": "python", 55 | "pygments_lexer": "ipython3", 56 | "version": "3.9.12" 57 | } 58 | }, 59 | "nbformat": 4, 60 | "nbformat_minor": 5 61 | } 62 | -------------------------------------------------------------------------------- /notebooks/namelist/output/output_cice.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Customize CICE output\n", 9 | "\n", 10 | "The CICE output can changed with the namelist variables\n", 11 | "\n", 12 | "- **``histfreq``**: Frequency of output written to history files ('1', 'm', 'd', 'y', …)\n", 13 | "- **``histfreq_n``**: Frequency history data is written to history files\n", 14 | "- **``hist_avg``**: if false => instantaneous values, if true => time-averages\n", 15 | "\n", 16 | "\n", 17 | "Here is how to set ``user_nl_cice`` to output an extra history file with daily values (leaving the primary history file as monthly): \n", 18 | "```\n", 19 | " histfreq = 'm','d','x','x','x'\n", 20 | " histfreq_n = 1,1,1,1,1 \n", 21 | "```\n", 22 | "\n", 23 | "See: http://www.cesm.ucar.edu/models/cesm2/settings/current/cice_nml.html\n", 24 | "\n" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": null, 30 | "id": "bd6df83b-1a5d-4878-96b5-715e12c4c0a9", 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [] 34 | } 35 | ], 36 | "metadata": { 37 | "kernelspec": { 38 | "display_name": "Python 3 (ipykernel)", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "codemirror_mode": { 44 | "name": "ipython", 45 | "version": 3 46 | }, 47 | "file_extension": ".py", 48 | "mimetype": "text/x-python", 49 | "name": "python", 50 | "nbconvert_exporter": "python", 51 | "pygments_lexer": "ipython3", 52 | "version": "3.9.12" 53 | } 54 | }, 55 | "nbformat": 4, 56 | "nbformat_minor": 5 57 | } 58 | -------------------------------------------------------------------------------- /notebooks/namelist/output/output_pop.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Customize POP output\n", 9 | "\n", 10 | "POP output is controlled by POP's tavg_nml namelist, which variables such as\n", 11 | "\n", 12 | "- **``tavg_freq``**: frequency at which the model fields are written\n", 13 | "- **``tavg_freq_opt``**: units of time for 'tavg_freq’ ('nmonth’, 'nhour’, 'once’,…)\n", 14 | "- **``tavg_file_freq``**:frequency at which the model files are written\n", 15 | "- **``tavg_file_freq_opt``**: units of time for 'tavg_file_freq’ ('nmonth’, 'nhour’, …)\n", 16 | "\n", 17 | "These are arrays, with a value for each output stream.\n", 18 | "A convenient way to change the first stream to be daily averages bundled into monthly\n", 19 | "files is to add the following lines to ``user_nl_pop``: \n", 20 | "```\n", 21 | "tavg_freq_opt(1) = 'nday' \n", 22 | "tavg_freq(1) = 1 \n", 23 | "tavg_file_freq_opt(1) = 'nmonth' \n", 24 | "tavg_file_freq(1) = 1 \n", 25 | "```\n", 26 | "\n", 27 | "See: https://www.cesm.ucar.edu/models/cesm2/settings/current/pop2_nml.html\n", 28 | "\n", 29 | "\n", 30 | "CAUTION: Note that changing tavg_nml variables via ``user_nl_pop`` is non-standard.\n", 31 | "While the above is convenient, attempting more complicated changes can lead to unexpected model behavior.\n", 32 | "For full flexibility, use the **workaround** explained in ``user_nl_pop``.\n" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": null, 38 | "id": "6857dadc-8cbd-4a2e-af21-14b0be4600ee", 39 | "metadata": {}, 40 | "outputs": [], 41 | "source": [] 42 | } 43 | ], 44 | "metadata": { 45 | "kernelspec": { 46 | "display_name": "Python 3 (ipykernel)", 47 | "language": "python", 48 | "name": "python3" 49 | }, 50 | "language_info": { 51 | "codemirror_mode": { 52 | "name": "ipython", 53 | "version": 3 54 | }, 55 | "file_extension": ".py", 56 | "mimetype": "text/x-python", 57 | "name": "python", 58 | "nbconvert_exporter": "python", 59 | "pygments_lexer": "ipython3", 60 | "version": "3.9.12" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 5 65 | } 66 | -------------------------------------------------------------------------------- /notebooks/namelist/overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f5e23fcc-d36b-4ca2-a596-9fb3c88c82e8", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# Overview \n", 11 | "\n", 12 | "There are a number of ways that the model can be modified via namelist settings. These values control the way the code is run. \n", 13 | "\n", 14 | "The **namelist variables** include settings to control over output, tune the model for various quantities, and many other options. For instance, the output frequency in the different components can be controlled via the namelists. \n", 15 | "\n", 16 | "
\n", 17 | "\n", 18 | "The **steps** to modify the **namelists** are:\n", 19 | "\n", 20 | "In ``$CASEROOT`` \n", 21 | "- edit the ``user_nl_xxx`` files.\n", 22 | "- generate the namelists by running ``./preview_namelists``. \n", 23 | " \n", 24 | " \n", 25 | "This results in the creation of component namelists, the ``*_in`` files (i.e. `atm_in`, `lnd_in`, and so on). \n", 26 | "\n", 27 | "The ``*_in`` files are located in ``$CASEROOT/CaseDocs/`` and in ``$RUNDIR``.\n", 28 | " \n", 29 | "
\n", 30 | "\n", 31 | "\n", 32 | "An overview of the CESM directories and the location of the namelist files is showed in *Figure 1*\n" 33 | ] 34 | }, 35 | { 36 | "cell_type": "markdown", 37 | "id": "301171cd-e6da-4574-ab96-02d82d5fc95f", 38 | "metadata": {}, 39 | "source": [ 40 | "___\n", 41 | "![CESM directories and namelists](../../images/namelist/CESM_directories_and_namelists.png)\n", 42 | "

Figure 1: Overview of the CESM directories and the namelist files.

\n", 43 | "\n", 44 | "___" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "id": "f0a5cc0d-f3cf-4508-9751-ff6866fa3f20", 50 | "metadata": {}, 51 | "source": [ 52 | "\n", 53 | "The ``*_in`` files **should not be directly edited**. Any manual changes of the ``*_in`` files will be overwritten when you compile or submit the run. \n", 54 | "\n", 55 | "Note that step ``./preview_namelists`` is **optional** as the script *preview_namelists* is also called when you build the model. \n", 56 | "\n", 57 | "Note that you cannot change the namelist variables: \n", 58 | "- after the run is submitted \n", 59 | "- or when `CONTINUE_RUN=TRUE`. \n" 60 | ] 61 | }, 62 | { 63 | "cell_type": "markdown", 64 | "id": "c55ea30e-7dc5-4694-82d6-90952257c06a", 65 | "metadata": {}, 66 | "source": [ 67 | "
\n", 68 | "\n", 69 | "Complete documentation about the namelist variables can be found on the [CESM webpage.](https://www2.cesm.ucar.edu/models/cesm2/settings/current/)\n", 70 | "\n", 71 | "
" 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": null, 77 | "id": "9e30b4f4-1e35-4f70-af22-a81489b56018", 78 | "metadata": {}, 79 | "outputs": [], 80 | "source": [] 81 | } 82 | ], 83 | "metadata": { 84 | "kernelspec": { 85 | "display_name": "Python 3 (ipykernel)", 86 | "language": "python", 87 | "name": "python3" 88 | }, 89 | "language_info": { 90 | "codemirror_mode": { 91 | "name": "ipython", 92 | "version": 3 93 | }, 94 | "file_extension": ".py", 95 | "mimetype": "text/x-python", 96 | "name": "python", 97 | "nbconvert_exporter": "python", 98 | "pygments_lexer": "ipython3", 99 | "version": "3.9.12" 100 | } 101 | }, 102 | "nbformat": 4, 103 | "nbformat_minor": 5 104 | } 105 | -------------------------------------------------------------------------------- /notebooks/prereqs/exercises.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "082bb7b7-5657-4601-8615-4dd2058a4625", 6 | "metadata": { 7 | "tags": [] 8 | }, 9 | "source": [ 10 | "# Exercise Overview\n", 11 | "\n", 12 | "This exercise will introduce you to the derecho computing system. Specifically, in this exercise we will:\n", 13 | "\n", 14 | "- Step 1. Login to the derecho supercomputer.\n", 15 | "- Step 2. Examine the derecho glade file system.\n", 16 | "\n" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "d9ff1113-8a6d-42b5-8ca7-d3bef493d7fb", 22 | "metadata": {}, 23 | "source": [ 24 | "## Step 1: derecho Login" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "f4a25131-701e-4d13-aad7-461d1302b84b", 30 | "metadata": {}, 31 | "source": [ 32 | "From your tutorial terminal window prompt get online.
\n", 33 | "\n", 34 | "
\n", 35 | "Login to derecho:

\n", 36 | "\n", 37 | "```\n", 38 | "ssh –XY username@derecho.hpc.ucar.edu\n", 39 | "```\n", 40 | "\n", 41 | "
\n", 42 | "\n", 43 | "Where `username` is replaced with your tutorial username. Your derecho login will be used through out the tutorial. If you have difficulty getting this to work please ask for help. \n", 44 | "- If you are in the in-person tutorial at NCAR, there will be helpers available.\n", 45 | "- If you are doing this outside of the tutorial then you can contact the user support from the NCAR Computational and Information Systems Laboratory (CISL)." 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "id": "74512322-32da-400c-8aea-ff65658233db", 51 | "metadata": {}, 52 | "source": [ 53 | "
\n", 54 | "\n", 55 | "[CISL User Support](https://ithelp.ucar.edu/plugins/servlet/desk/site/rc)\n", 56 | "\n", 57 | "
" 58 | ] 59 | }, 60 | { 61 | "cell_type": "markdown", 62 | "id": "6250a6b0-e65e-43c1-b36d-ebec14345076", 63 | "metadata": {}, 64 | "source": [ 65 | "## Step 2: Look Around derecho File Systems" 66 | ] 67 | }, 68 | { 69 | "cell_type": "markdown", 70 | "id": "ff5b81e1-292a-4bc4-8415-57098366cf80", 71 | "metadata": {}, 72 | "source": [ 73 | "Now that you are on the derecho login nodes you can start to explore the file system. The following simple exercises will start that process.\n", 74 | "\n", 75 | "
\n", 76 | "Show your current directory:
\n", 77 | "\n", 78 | "```\n", 79 | "pwd\n", 80 | "```\n", 81 | "
\n", 82 | "\n", 83 | "List all the directories on the glade file system:
\n", 84 | "\n", 85 | "```\n", 86 | "ls /glade\n", 87 | "```\n", 88 | "
\n", 89 | " \n", 90 | "List the contents of the Input Data directory:
\n", 91 | "\n", 92 | "```\n", 93 | "ls /glade/campaign/cesm/cesmdata/cseg/inputdata/\n", 94 | "```\n", 95 | "\n", 96 | "
\n", 97 | "\n", 98 | "\n" 99 | ] 100 | }, 101 | { 102 | "cell_type": "raw", 103 | "id": "b32ec2e7-06f8-4f26-905f-6d495c4cf299", 104 | "metadata": {}, 105 | "source": [ 106 | "Feel free to look around more of the NCAR HPC system. In the Resources chapter, you will find a section about the [NCAR Supercomputer](https://ncar.github.io/CESM-Tutorial/notebooks/resources/ncar_hpc.html) with links that may be particularly relevant to you." 107 | ] 108 | }, 109 | { 110 | "cell_type": "code", 111 | "execution_count": null, 112 | "id": "d338e513-cb0b-45fd-b65a-1e7a66d95971", 113 | "metadata": {}, 114 | "outputs": [], 115 | "source": [] 116 | } 117 | ], 118 | "metadata": { 119 | "kernelspec": { 120 | "display_name": "Python 3 (ipykernel)", 121 | "language": "python", 122 | "name": "python3" 123 | }, 124 | "language_info": { 125 | "codemirror_mode": { 126 | "name": "ipython", 127 | "version": 3 128 | }, 129 | "file_extension": ".py", 130 | "mimetype": "text/x-python", 131 | "name": "python", 132 | "nbconvert_exporter": "python", 133 | "pygments_lexer": "ipython3", 134 | "version": "3.10.13" 135 | } 136 | }, 137 | "nbformat": 4, 138 | "nbformat_minor": 5 139 | } 140 | -------------------------------------------------------------------------------- /notebooks/resources/fortran.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Fortran" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "386d6593-bcbf-4c9a-8e64-9c0ee687de47", 14 | "metadata": {}, 15 | "source": [ 16 | "The CESM model is primarily written in Fortran. If you plan to modify the CESM code in any way, we strongly recommend you be able to navigate the Fortran code." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "db9ec999-e1b8-43dc-b72c-77223226e1af", 22 | "metadata": {}, 23 | "source": [ 24 | "The 2-unit module listed below, from The COMET Program, introduces users to scientific programming structures and methods and the history, basic syntax and functionality of Fortran. " 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "id": "d65da730-a8df-47ad-9e9d-68f283637fef", 30 | "metadata": {}, 31 | "source": [ 32 | "Recommendations for Module Use:\n", 33 | "\n", 34 | "- Users who have little to no programming experience should take both units in full.\n", 35 | "- Users that do have some programming experience, such as a web-based language like HTML, but have limited experience in scientific programming, such as a C-based languages, should start with unit 1 and may find they can complete it quickly. While unit 2, covering Fortran and CESM Fortran examples, should be taken in full.\n", 36 | "- Users that have significant scientific programming experience (C-based languages, for example) can safely start in unit 2, which covers Fortran and CESM Fortran examples.\n", 37 | "- Users that have significant programming experience in Fortran can likely begin at the \"Fortran and CESM\" subsection (near bottom of table of contents) in unit 2." 38 | ] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "id": "6924d6f2-f210-4704-8084-415c81a2122a", 43 | "metadata": {}, 44 | "source": [ 45 | "
\n", 46 | "\n", 47 | "[Fortran COMET module](https://www.meted.ucar.edu/ucar/fortran)\n", 48 | "\n", 49 | "
" 50 | ] 51 | } 52 | ], 53 | "metadata": { 54 | "kernelspec": { 55 | "display_name": "Python 3 (ipykernel)", 56 | "language": "python", 57 | "name": "python3" 58 | }, 59 | "language_info": { 60 | "codemirror_mode": { 61 | "name": "ipython", 62 | "version": 3 63 | }, 64 | "file_extension": ".py", 65 | "mimetype": "text/x-python", 66 | "name": "python", 67 | "nbconvert_exporter": "python", 68 | "pygments_lexer": "ipython3", 69 | "version": "3.9.12" 70 | } 71 | }, 72 | "nbformat": 4, 73 | "nbformat_minor": 5 74 | } 75 | -------------------------------------------------------------------------------- /notebooks/resources/porting.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Porting" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "fe00d177-b2e2-4067-b1fe-95b0a1d45f3d", 14 | "metadata": {}, 15 | "source": [ 16 | "Moving CESM to a new machine that has not been previously setup requires knowledge of both the CESM model and the target machine architecture and software. Porting details can also be found in specialized lecture slides from previous CESM tutorials.
" 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "52b78297-4829-477b-8018-6d80512389a5", 22 | "metadata": {}, 23 | "source": [ 24 | "
\n", 25 | "\n", 26 | "[CIME documentation (see part 2)](http://esmci.github.io/cime/)\n", 27 | "\n", 28 | "[Porting CESM2](http://www.cesm.ucar.edu/models/cesm2/linux_cluster/)\n", 29 | " \n", 30 | "
" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "id": "080839b4-514f-4072-88a6-bd514424cf6e", 36 | "metadata": {}, 37 | "source": [ 38 | "![Porting Image](../../images/resources/CESM2_Porting.png)\n", 39 | "*

Figure: Porting CESM2 to the CGD Cluster Hobart

*" 40 | ] 41 | }, 42 | { 43 | "cell_type": "markdown", 44 | "id": "f1ec0337-eadf-46e3-80b5-2085854b9742", 45 | "metadata": {}, 46 | "source": [ 47 | "# Take-away Points\n", 48 | "- On supported machines - no porting is necessary\n", 49 | "- On new machines - porting needs to be done\n", 50 | "- Documentation from CIME and CESM Website\n", 51 | "- Thursday afternoon lecture on Porting" 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": null, 57 | "id": "d2de6735-4420-4b9d-bae1-3384a34de010", 58 | "metadata": {}, 59 | "outputs": [], 60 | "source": [] 61 | } 62 | ], 63 | "metadata": { 64 | "kernelspec": { 65 | "display_name": "Python 3 (ipykernel)", 66 | "language": "python", 67 | "name": "python3" 68 | }, 69 | "language_info": { 70 | "codemirror_mode": { 71 | "name": "ipython", 72 | "version": 3 73 | }, 74 | "file_extension": ".py", 75 | "mimetype": "text/x-python", 76 | "name": "python", 77 | "nbconvert_exporter": "python", 78 | "pygments_lexer": "ipython3", 79 | "version": "3.10.13" 80 | } 81 | }, 82 | "nbformat": 4, 83 | "nbformat_minor": 5 84 | } 85 | -------------------------------------------------------------------------------- /notebooks/resources/resources_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Resources" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "43fca83b-54e5-4950-a9b3-bbfbbcb01c77", 14 | "metadata": {}, 15 | "source": [ 16 | "While there is no way for this tutorial to provide every bit of information or resources needed to successfully learn CESM, this section provides some resources that you may find particularly helpful." 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "id": "6dc4950b-9954-4019-9c0b-46a3e3b0b3aa", 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [] 26 | } 27 | ], 28 | "metadata": { 29 | "kernelspec": { 30 | "display_name": "Python 3 (ipykernel)", 31 | "language": "python", 32 | "name": "python3" 33 | }, 34 | "language_info": { 35 | "codemirror_mode": { 36 | "name": "ipython", 37 | "version": 3 38 | }, 39 | "file_extension": ".py", 40 | "mimetype": "text/x-python", 41 | "name": "python", 42 | "nbconvert_exporter": "python", 43 | "pygments_lexer": "ipython3", 44 | "version": "3.10.13" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 5 49 | } 50 | -------------------------------------------------------------------------------- /notebooks/resources/tutorial_queue_account.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b2cd974a-dfbb-4937-8ed0-ab87ab60f1ef", 6 | "metadata": {}, 7 | "source": [ 8 | "# Tutorial queue and account" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "4a6f76fe-9658-443c-89a7-9ede364803e5", 14 | "metadata": {}, 15 | "source": [ 16 | "### Tutorial Project Account\n", 17 | "\n", 18 | "
\n", 19 | "You should have access to project account UESM0013 and use this for your simulations.\n", 20 | "
\n", 21 | "\n", 22 | "You can change the account in your case directory using the following command:\n", 23 | "```\n", 24 | "./xmlchange PROJECT=UESM0013\n", 25 | "```" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "id": "9db9d54e-ef78-44ef-a003-4ddd8a416317", 31 | "metadata": {}, 32 | "source": [ 33 | "### Special Queues\n", 34 | "\n", 35 | "
\n", 36 | "\n", 37 | "Schedule for Tutorial Reservation Queues\n", 38 | " \n", 39 | "- We have a special queue tutorial during the lab sessions to ensure you get through the derecho queues quickly and get your jobs run. This queue are only active during our lab sessions. \n", 40 | "\n", 41 | "- Outside the lab sessions, you should use the queue main to run cesm.\n", 42 | " \n", 43 | "
\n", 44 | "\n", 45 | "If you need to change the value for a run, you can change the reservation queue in your case directory using the following command:\n", 46 | "\n", 47 | "During the lab sessions:\n", 48 | "```\n", 49 | "./xmlchange JOB_QUEUE=tutorial --force\n", 50 | "```\n", 51 | "\n", 52 | "Outside the lab sessions:\n", 53 | "```\n", 54 | "./xmlchange JOB_QUEUE=main --force\n", 55 | "```" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "id": "d312e6e0-f48b-4f86-a97b-96c255d35d26", 61 | "metadata": {}, 62 | "source": [ 63 | "### Compiling in the Special Queue" 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "id": "6ddf7177-0dd6-4ce3-be1e-ee70e5be9419", 69 | "metadata": {}, 70 | "source": [ 71 | "By default, we compile cesm on a shared node called `develop`. However, as we want to avoid long wait time during the labs, we will compile in the specialed reservation queue `tutorial`. \n", 72 | "\n", 73 | "During the lab sessions, use\n", 74 | "\n", 75 | "```\n", 76 | "qcmd -q tutorial -- ./case.build \n", 77 | "```\n", 78 | "\n", 79 | "\n", 80 | "Outside the lab sessions, use\n", 81 | "\n", 82 | "```\n", 83 | "qcmd -- ./case.build \n", 84 | "```" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": null, 90 | "id": "5b77ea28-df80-4c20-a123-ec1e09a1475a", 91 | "metadata": {}, 92 | "outputs": [], 93 | "source": [] 94 | } 95 | ], 96 | "metadata": { 97 | "kernelspec": { 98 | "display_name": "Python 3 (ipykernel)", 99 | "language": "python", 100 | "name": "python3" 101 | }, 102 | "language_info": { 103 | "codemirror_mode": { 104 | "name": "ipython", 105 | "version": 3 106 | }, 107 | "file_extension": ".py", 108 | "mimetype": "text/x-python", 109 | "name": "python", 110 | "nbconvert_exporter": "python", 111 | "pygments_lexer": "ipython3", 112 | "version": "3.10.13" 113 | }, 114 | "toc-showcode": false 115 | }, 116 | "nbformat": 4, 117 | "nbformat_minor": 5 118 | } 119 | -------------------------------------------------------------------------------- /notebooks/resources/unix-cheatsheet.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# UNIX cheatsheet\n", 9 | "\n", 10 | "This Unix commands cheat sheet summarizes a few basic commands you will need during the tutorial." 11 | ] 12 | }, 13 | { 14 | "cell_type": "markdown", 15 | "id": "76bc874f-270c-4a05-8fe9-eac874cb0db7", 16 | "metadata": {}, 17 | "source": [ 18 | "\n", 19 | " \n", 20 | " \n", 21 | " \n", 22 | " \n", 23 | " \n", 24 | " \n", 25 | " \n", 26 | " \n", 27 | " \n", 28 | " \n", 29 | " \n", 30 | " \n", 31 | " \n", 32 | " \n", 33 | " \n", 34 | " \n", 35 | " \n", 36 | " \n", 37 | " \n", 38 | " \n", 39 | " \n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " " 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "id": "805c8473-8106-4ba6-9d8e-c27cee7fcd7d", 79 | "metadata": {}, 80 | "source": [ 81 | "You can also find a lot of resources online. " 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "id": "96f010ce-2005-4a69-9081-7ced219e66ea", 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [] 91 | } 92 | ], 93 | "metadata": { 94 | "kernelspec": { 95 | "display_name": "Python 3 (ipykernel)", 96 | "language": "python", 97 | "name": "python3" 98 | }, 99 | "language_info": { 100 | "codemirror_mode": { 101 | "name": "ipython", 102 | "version": 3 103 | }, 104 | "file_extension": ".py", 105 | "mimetype": "text/x-python", 106 | "name": "python", 107 | "nbconvert_exporter": "python", 108 | "pygments_lexer": "ipython3", 109 | "version": "3.10.13" 110 | } 111 | }, 112 | "nbformat": 4, 113 | "nbformat_minor": 5 114 | } 115 | -------------------------------------------------------------------------------- /notebooks/resources/unix.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# UNIX" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "011c91f1-75f0-496e-a329-45ed70297e86", 14 | "metadata": {}, 15 | "source": [ 16 | "Most CESM users and developers use the UNIX environment to set up CESM experiments and do preliminary analysis of their CESM model output data. We strongly suggest those using CESM become familiar with working in a command line environment." 17 | ] 18 | }, 19 | { 20 | "cell_type": "markdown", 21 | "id": "31e68033-a4f3-4866-8048-f2f57900f98b", 22 | "metadata": {}, 23 | "source": [ 24 | "## Some Unix Basics\n", 25 | "\n", 26 | "The module listed below, from The COMET Program, will help those unfamiliar with UNIX. You can learn about the basics of UNIX file structures, how to navigate in a UNIX environment, and you'll get to practice creating, storing and searching for files.\n", 27 | "\n", 28 | "The expected length is 15-30 minutes for users with some UNIX experience, and 30-60 minutes for novices.\n" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "id": "b343574d-dae5-4653-87fd-db6d0748b338", 34 | "metadata": {}, 35 | "source": [ 36 | "
\n", 37 | "\n", 38 | "[UNIX module from COMET](https://www.meted.ucar.edu/ucar/unix/)\n", 39 | "\n", 40 | "
" 41 | ] 42 | }, 43 | { 44 | "cell_type": "markdown", 45 | "id": "ef5eda98-33cc-460d-be37-fc080c09a1a2", 46 | "metadata": {}, 47 | "source": [ 48 | "## Unix cheatsheet\n", 49 | "\n", 50 | "This Unix commands cheat sheet summarizes a few basic commands you will need during the tutorial." 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "id": "399759d6-00b3-41f2-b483-541b84032ce3", 56 | "metadata": {}, 57 | "source": [ 58 | "
\n", 59 | "\n", 60 | "[UNIX cheatsheet](https://ncar.github.io/CESM-Tutorial/notebooks/resources/unix-cheatsheet.html)\n", 61 | "\n", 62 | "
" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "id": "66239ceb-8b7c-4d1b-9d6d-56a8c2ace41c", 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [] 72 | } 73 | ], 74 | "metadata": { 75 | "kernelspec": { 76 | "display_name": "Python 3 (ipykernel)", 77 | "language": "python", 78 | "name": "python3" 79 | }, 80 | "language_info": { 81 | "codemirror_mode": { 82 | "name": "ipython", 83 | "version": 3 84 | }, 85 | "file_extension": ".py", 86 | "mimetype": "text/x-python", 87 | "name": "python", 88 | "nbconvert_exporter": "python", 89 | "pygments_lexer": "ipython3", 90 | "version": "3.10.13" 91 | } 92 | }, 93 | "nbformat": 4, 94 | "nbformat_minor": 5 95 | } 96 | -------------------------------------------------------------------------------- /notebooks/sourcemods/add_fields_cam.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Source Modification Example\n", 9 | "\n", 10 | "A common source code modification that you may want to do is to output a **new variable** that is not defined in CESM. \n", 11 | "\n", 12 | "As an example, we will add a new variable to CAM: the atmopsheric **temperature at 750hPa**.\n", 13 | "\n", 14 | "## Adding a variable to CAM\n", 15 | "CAM has a history field that corresponds to the **temperature at 500hPa** and a number of other pressure levels, but not at **750hPa**. Suppose you wanted to output the **temperature at 750hPa**. The following two\n", 16 | "calls are required to add an output variable:\n", 17 | "```\n", 18 | "call addfld(’T750’,...) (Add a field to the master field list)\n", 19 | "call outfld(’T750’,...) (Collect values for this field and write to history file)\n", 20 | "```" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "id": "08800317-afcb-42b5-a181-38003b2323aa", 26 | "metadata": {}, 27 | "source": [ 28 | "Each of these are now described in more detail:\n", 29 | "\n", 30 | "## ``addfld``\n", 31 | "The sub-routine ``addfld`` adds a field to the master list with the following syntax:\n", 32 | "```\n", 33 | "addfld(fname,type,avgflag,units,long name)\n", 34 | "```\n", 35 | "where\n", 36 | "\n", 37 | "- **``fname``** = field name\n", 38 | "- **``type``** = the type of field. The entry for a single level field would be “horiz only” and the entry\n", 39 | "for a 3D field would be “(/ ’lev’ /)”.\n", 40 | "- **``avgflag``** = Averaging flag, A = average, I=instantaneous\n", 41 | "- **``units``** = the units of the field\n", 42 | "- **``long name``** = Field full name\n", 43 | "\n", 44 | "Appropriate values of these parameters for the output of T750 are:\n", 45 | "\n", 46 | "```\n", 47 | "call addfld(’T750’,horiz only, ’A’, ’K’, ’Temperature at 750hPa pressure surface’)\n", 48 | "```\n", 49 | "\n" 50 | ] 51 | }, 52 | { 53 | "cell_type": "markdown", 54 | "id": "5fe6a0f0-e750-4d0c-bd8a-4966286a4764", 55 | "metadata": {}, 56 | "source": [ 57 | "\n", 58 | "## ``outfld``\n", 59 | "The subroutine ``outfld`` accumulates (or takes the minimum or maximum of, as appropriate) the field into the history buffer for the appropriate history tape with the following syntax\n", 60 | "```\n", 61 | " outfld(fname, field, idim, c)\n", 62 | "```\n", 63 | "\n", 64 | "with\n", 65 | "- **``fname``** = Field name\n", 66 | "- **``field``** = array containing field values\n", 67 | "- **``idim``** = longitude dimension of field array\n", 68 | "- **``c``** = chunk (physics) or latitude (dynamics) index.\n", 69 | "\n", 70 | "For example:\n", 71 | "\n", 72 | "```\n", 73 | " call outfld(’T750’,t750, pcols, lchnk)\n", 74 | "```" 75 | ] 76 | }, 77 | { 78 | "cell_type": "markdown", 79 | "id": "c1978926-c9f9-4405-8574-12d39e3f8ed8", 80 | "metadata": {}, 81 | "source": [ 82 | "\n", 83 | "## ``add_default`` \n", 84 | "Another useful subroutine is the subroutine ``add_default``. The subroutine ``add_default`` Add a field to the list of default fields on history file with the following syntax\n", 85 | "```\n", 86 | " subroutine add_default (fname, tindex, flag)\n", 87 | "```\n", 88 | "where\n", 89 | "- **``fname``** = Field name\n", 90 | "- **``tindex``** = history tape index\n", 91 | "- **``flag``** = Averaging flag: A = average (default). I = instantaneous\n", 92 | "\n", 93 | "\n", 94 | "For example:\n", 95 | "\n", 96 | "```\n", 97 | " call add_default ('T500', 1, ' ')\n", 98 | "```" 99 | ] 100 | } 101 | ], 102 | "metadata": { 103 | "kernelspec": { 104 | "display_name": "Python 3 (ipykernel)", 105 | "language": "python", 106 | "name": "python3" 107 | }, 108 | "language_info": { 109 | "codemirror_mode": { 110 | "name": "ipython", 111 | "version": 3 112 | }, 113 | "file_extension": ".py", 114 | "mimetype": "text/x-python", 115 | "name": "python", 116 | "nbconvert_exporter": "python", 117 | "pygments_lexer": "ipython3", 118 | "version": "3.9.12" 119 | } 120 | }, 121 | "nbformat": 4, 122 | "nbformat_minor": 5 123 | } 124 | -------------------------------------------------------------------------------- /notebooks/sourcemods/exercises_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise Overview \n", 9 | "\n", 10 | "## Learning Goals\n", 11 | "\n", 12 | "- Student will practice how to make a code modification in CESM. \n", 13 | "\n", 14 | "\n", 15 | "## Exercise overview:\n", 16 | "\n", 17 | "Do at least one exercise:\n", 18 | "- Add a new variable in CAM\n" 19 | ] 20 | } 21 | ], 22 | "metadata": { 23 | "kernelspec": { 24 | "display_name": "Python 3 (ipykernel)", 25 | "language": "python", 26 | "name": "python3" 27 | }, 28 | "language_info": { 29 | "codemirror_mode": { 30 | "name": "ipython", 31 | "version": 3 32 | }, 33 | "file_extension": ".py", 34 | "mimetype": "text/x-python", 35 | "name": "python", 36 | "nbconvert_exporter": "python", 37 | "pygments_lexer": "ipython3", 38 | "version": "3.9.12" 39 | } 40 | }, 41 | "nbformat": 4, 42 | "nbformat_minor": 5 43 | } 44 | -------------------------------------------------------------------------------- /notebooks/sourcemods/overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Overview\n", 9 | "\n", 10 | "If you want to make modifications to the CESM code, the best practice is to copy the relevant sub-routine into the relevant sub-directory within the `SourceMods` directory in your case directory. \n", 11 | "\n", 12 | "For example, if you wanted to modify a CAM subroutine, in the case called case01, you would copy that subroutine to the following location\n", 13 | "\n", 14 | "```\n", 15 | " case01/SourceMods/src.cam\n", 16 | "```\n", 17 | "and modify it there.\n", 18 | "\n", 19 | "*Figure 1* shows the location of the `SourceMods` directory and sub-directories.\n", 20 | "\n", 21 | "
\n", 22 | "\n", 23 | "The **steps** when making a **source code modification** are:\n", 24 | "\n", 25 | "- In the **CESM code**, find the subroutine you want to modify.\n", 26 | "- Copy this subroutine to the relevant **SourceMods** directory within your **case directory**\n", 27 | "- Make your **modifications**\n", 28 | "- **Compile** and **run** the model \n", 29 | " \n", 30 | "
\n" 31 | ] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "id": "017b45ad-dcff-42b2-8623-06033b8e11d8", 36 | "metadata": {}, 37 | "source": [ 38 | "![CESM directories and namelists](../../images/sourcemods/CESM_directories_and_SourceMods.png)\n", 39 | "\n", 40 | "*

Figure: Overview of the CESM directories and the SourceMods directories.

*" 41 | ] 42 | }, 43 | { 44 | "cell_type": "code", 45 | "execution_count": null, 46 | "id": "14f20e06-e171-4891-96de-759c5f5182a9", 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [] 50 | } 51 | ], 52 | "metadata": { 53 | "kernelspec": { 54 | "display_name": "Python 3 (ipykernel)", 55 | "language": "python", 56 | "name": "python3" 57 | }, 58 | "language_info": { 59 | "codemirror_mode": { 60 | "name": "ipython", 61 | "version": 3 62 | }, 63 | "file_extension": ".py", 64 | "mimetype": "text/x-python", 65 | "name": "python", 66 | "nbconvert_exporter": "python", 67 | "pygments_lexer": "ipython3", 68 | "version": "3.9.12" 69 | } 70 | }, 71 | "nbformat": 4, 72 | "nbformat_minor": 5 73 | } 74 | -------------------------------------------------------------------------------- /notebooks/sourcemods/sourcemods.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Source Modifications\n", 9 | "\n", 10 | "The goal of this chapter is to understand how to modify the CESM code. This is referred to as **_source modifications_**.\n", 11 | "\n", 12 | "- The section **_Overview_** describes the steps for making source modifications and provides a visual representation of the directories and files that need to be modified.\n", 13 | "\n", 14 | "- The section **_Source Modification Example_** provides detailed instructions on how to add a new variable to CAM: the atmospheric temperature at 750hPa.\n", 15 | "\n", 16 | "- The section **_Exercises_** offers opportunities to practice the concepts learned in this chapter." 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "id": "35b1a8e6-f30e-4e15-b519-a87d23bfffc6", 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [] 26 | } 27 | ], 28 | "metadata": { 29 | "kernelspec": { 30 | "display_name": "Python 3 (ipykernel)", 31 | "language": "python", 32 | "name": "python3" 33 | }, 34 | "language_info": { 35 | "codemirror_mode": { 36 | "name": "ipython", 37 | "version": 3 38 | }, 39 | "file_extension": ".py", 40 | "mimetype": "text/x-python", 41 | "name": "python", 42 | "nbconvert_exporter": "python", 43 | "pygments_lexer": "ipython3", 44 | "version": "3.9.12" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 5 49 | } 50 | -------------------------------------------------------------------------------- /notebooks/troubleshooting/debugging_flag.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "afbbe9ba-517d-4db4-9c7c-0b3daaf0e7ac", 6 | "metadata": {}, 7 | "source": [ 8 | "# Adding debugging info\n", 9 | "\n", 10 | "If you cannot find the reason of the crash in the **log** files, there are two ways to add more debugging information. \n", 11 | "- Increase the value of the run-time xml variable ``INFO_DBUG`` (This **does NOT require rebuilding**): \n", 12 | "```\n", 13 | "./xmlchange INFO_DBUG=2. \n", 14 | "```\n", 15 | "This adds more information to the ``cpl.log`` file that can be useful if you can’t tell what component is aborting the run, or where bad coupling fields are originating.\n", 16 | "\n", 17 | "- Try rebuilding and rerunning with the variable DEBUG set to TRUE (This ** requires rebuilding**): \n", 18 | "```\n", 19 | "./xmlchange DEBUG=TRUE.\n", 20 | "```\n", 21 | "This adds various runtime checks that trap conditions such as out-of-bounds array indexing, divide by 0, and other floating point exceptions.\n", 22 | "Before running, you must rebuild the run: \n", 23 | "```\n", 24 | "./case.build --clean-all\n", 25 | "qcmd -- ./case.build.\n", 26 | "```\n", 27 | "Note that the model will run **significantly slower** in ``DEBUG mode``, so this may not be feasible if the model has to run a long time before producing the error. " 28 | ] 29 | } 30 | ], 31 | "metadata": { 32 | "kernelspec": { 33 | "display_name": "Python 3 (ipykernel)", 34 | "language": "python", 35 | "name": "python3" 36 | }, 37 | "language_info": { 38 | "codemirror_mode": { 39 | "name": "ipython", 40 | "version": 3 41 | }, 42 | "file_extension": ".py", 43 | "mimetype": "text/x-python", 44 | "name": "python", 45 | "nbconvert_exporter": "python", 46 | "pygments_lexer": "ipython3", 47 | "version": "3.9.12" 48 | } 49 | }, 50 | "nbformat": 4, 51 | "nbformat_minor": 5 52 | } 53 | -------------------------------------------------------------------------------- /notebooks/troubleshooting/exercises_overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise Overview \n", 9 | "\n", 10 | "## Learning Goals\n", 11 | "- The goal of the exercise is to make the model crash, and then troubleshoot as to why it crashed. \n", 12 | "\n", 13 | "## Exercise\n", 14 | "- Do the exercise: Debugging CAM. " 15 | ] 16 | } 17 | ], 18 | "metadata": { 19 | "kernelspec": { 20 | "display_name": "Python 3 (ipykernel)", 21 | "language": "python", 22 | "name": "python3" 23 | }, 24 | "language_info": { 25 | "codemirror_mode": { 26 | "name": "ipython", 27 | "version": 3 28 | }, 29 | "file_extension": ".py", 30 | "mimetype": "text/x-python", 31 | "name": "python", 32 | "nbconvert_exporter": "python", 33 | "pygments_lexer": "ipython3", 34 | "version": "3.9.12" 35 | } 36 | }, 37 | "nbformat": 4, 38 | "nbformat_minor": 5 39 | } 40 | -------------------------------------------------------------------------------- /notebooks/troubleshooting/log_files.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f406f992-92bd-4b17-9bd3-b99c5c8abaf3", 6 | "metadata": {}, 7 | "source": [ 8 | "# The log files\n", 9 | "\n", 10 | "The log files are files in the format ``$model.log.*`` \n", 11 | "- When the model is running, it produces the log files in the **run directory**: ``RUNDIR``. \n", 12 | "- When the run completes successfully, the model moves the log files into the **archive** directory: ``DOUT_S_ROOT``\n", 13 | "- When the model fails, the log files remain in the run directory ``RUNDIR``\n", 14 | "\n", 15 | "![CESM directories and namelists](../../images/troubleshooting/CESM_directories_and_log_files.png)\n", 16 | "\n", 17 | "*

Figure: Overview of the CESM directories and the log files.

*\n" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "id": "017b45ad-dcff-42b2-8623-06033b8e11d8", 23 | "metadata": {}, 24 | "source": [ 25 | "## What to do when a run fails? \n", 26 | "\n", 27 | "First, check the latest ``cpl.log.*``, which will often tell you when the model failed. If a run completed successfully, the last several lines of the ``cpl.log.*`` file will have a string like ``SUCCESSFUL TERMINATION OF CESM``. \n", 28 | "If you don't see this message, it means the run has failed. \n", 29 | "\n", 30 | "Check these things first when a job fails:\n", 31 | "- Did the model time out?\n", 32 | "- Was a disk quota limit hit?\n", 33 | "- Did a machine go down?\n", 34 | "- Did a file system become full?\n", 35 | "If any of those things happened, take appropriate corrective action and resubmit the job.\n", 36 | "\n", 37 | "If it is not clear that any of the above caused a case to fail, check the rest of the component log files ``$model.log.*`` for error messages. It takes a bit of practice to interpret message errors. We will look at an example later on in this chapter's exercises. " 38 | ] 39 | } 40 | ], 41 | "metadata": { 42 | "kernelspec": { 43 | "display_name": "Python 3 (ipykernel)", 44 | "language": "python", 45 | "name": "python3" 46 | }, 47 | "language_info": { 48 | "codemirror_mode": { 49 | "name": "ipython", 50 | "version": 3 51 | }, 52 | "file_extension": ".py", 53 | "mimetype": "text/x-python", 54 | "name": "python", 55 | "nbconvert_exporter": "python", 56 | "pygments_lexer": "ipython3", 57 | "version": "3.9.12" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 5 62 | } 63 | -------------------------------------------------------------------------------- /notebooks/troubleshooting/troubleshooting.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0959db1d-1790-4519-a34e-7026444af537", 6 | "metadata": {}, 7 | "source": [ 8 | "# Troubleshooting runtime errors\n", 9 | "\n", 10 | "There are several places to look for information if a job fails. \n", 11 | "- The log files will probably give you a hint. \n", 12 | "- It is also possible to run with more debugging info. \n", 13 | "\n", 14 | "\n", 15 | "
\n", 16 | "\n", 17 | "More information about troubleshooting can be found in the [CIME documentation](https://esmci.github.io/cime/versions/master/html/users_guide/troubleshooting.html).\n", 18 | "\n", 19 | "
" 20 | ] 21 | } 22 | ], 23 | "metadata": { 24 | "kernelspec": { 25 | "display_name": "Python 3 (ipykernel)", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.9.12" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 5 44 | } 45 | --------------------------------------------------------------------------------
CommandDescriptionOptionsExamples
lsList files and directories.-l: Long format listing.
-a: Include hidden files.
ls -l
displays files and directories with detailed information.

ls -a shows all files and directories, including hidden ones.
cdChange directory.N/Acd /path/to/directory
changes the current directory to the specified path.
pwdPrint current working directory.N/Apwd
displays the current working directory.
mkdirCreate a new directory.N/Amkdir my_directory
creates a new directory named \"my_directory\".
rmRemove files and directories.-r: Remove directories recursively.
-f: Force removal without confirmation.
rm file.txt
deletes the file named \"file.txt\".
rm -r my_directory
deletes the directory \"my_directory\" and its contents.
rm -f file.txt
forcefully deletes the file \"file.txt\" without confirmation.
cpCopy files and directories.-r: Copy directories recursively.cp -r directory destination
copies the directory \"directory\" and its contents to the specified destination.
cp file.txt destination
copies the file \"file.txt\" to the specified destination.
mvMove/rename files and directories.N/Amv file.txt new_name.txt
renames the file \"file.txt\" to \"new_name.txt\".
mv file.txt directory
moves the file \"file.txt\" to the specified directory.
findSearch for files and directories.-name: Search by filename.find /path/to/search -name “*.txt”
searches for all files with the extension “.txt” in the specified directory.