Exercise Overview

Exercise Overview#

Learning Goals#

In this exercise, you will practice making a source code modification in CESM.

By the end of this exercise, you will be able to:

  • Locate the CAM source file that needs to be modified.

  • Copy the source file into the appropriate SourceMods directory.

  • Edit the source code within your case directory.

  • Rebuild the model after a source modification.

  • Run the modified model and verify that the change appears in the output.

Exercise#

The following exercises illustrate two common types of CESM source modifications:

  • Adding a new diagnostic output variable.

  • Modifying an existing model parameter.

Together, they provide a practical introduction to the CESM source modification workflow using SourceMods.

Complete at least one of the following exercises:

  1. Add a New Diagnostic Variable in CAM

    Modify CAM to add a new diagnostic variable to the history output. In this exercise, you will add atmospheric temperature at 750 hPa (T750) as a new CAM output field.

  2. Modify the Rain Threshold in CLM

    Modify a parameter in the CLM source code that controls the onset of stress-deciduous vegetation. In this exercise, you will change the rainfall threshold required to initiate leaf onset and investigate the impact of the modification.