Overview#

If you want to make modifications to the CESM code, the best practise is to copy the relevant subroutine into the relevant subdirectory within the SourceMods directory in your case directory.

For example, if you wanted to modify a CAM subroutine, in the case called case01, you would copy that subroutine to the following location

~/case01/SourceMods/src.cam

and modify it there.

Figure 1 shows the location of the SourceMods directory and sub-directories.

The steps when making a source code modification are:

  • In the CESM code, find the subroutine you want to modify.

  • Copy this subrouting to the relevant SourceMods directory within your case directory

  • Make your modifications

  • Compile and run the model

CESM directories and namelists

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