Overview#

What is an XML file, and how do we use it in CESM?


1. What is an XML file?#

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.


2. CESM XML files and CESM environment variables#

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.

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.

XML file locations#

CESM xml files

Figure: Overview of the XML file locations

For the current tutorial on derecho, the paths are:

  • $CASEROOT = /glade/u/home/$USER/cases/$CASE

There are multiple env_*.xml files in the $CASEROOT directory:

  • env_archive.xml: specifies rules for short term archive script case.st_archive

  • env_batch.xml: specifies batch specific settings used in case.submit script

  • env_build.xml: specifies build information used in the case.build script

  • env_case.xml: set by create_newcase and cannot be modified

  • env_mach_pes.xml: specifies PE layout on NCAR HPC for components and used by case.run script

  • env_mach_specific.xml: specifies machine specific information used in case.build script

  • env_run.xml: sets run time information (such as length of run, number of submissions, …)

In this section, we will learn and practice modifying CESM run length and run type using env_run.xml!