Initializing the Model


Teaching: min
Exercises: min
  • How to setup model initial conditions?


Setting up Experiments - Review

To setup experiments with CESM, we setup and configure the following things:

Understanding Initial Conditions in CESM

Initial conditions tell the model what state to start from. The files that contain this information are called restart and intial condition files. They represent an instantanous state of each model component at a given time. There are multiple restarts for each componenet of the model.

Initial Conditions in our B1850 simulation (Assignment #2)

Let’s take a look at the initial conditions we used for some of our previous experiments:

$ cd /glade/u/home/kpegion/cases/test1
Results in group run_begin_stop_restart
	RUN_TYPE: hybrid
	RUN_STARTDATE: 0001-01-01
	RUN_REFDATE: 0301-01-01
	RUN_REFCASE: b.e20.B1850.f19_g17.release_cesm2_1_0.020
	RUN_REFDIR: cesm2_init

RUN_TYPE=hybrid, so this indicates the information in the other variables need to be set and that this run uses initial conditions from another CESM run to start it.

GET_REFCASE=TRUE means that the code will get the initial condition/restart files for you from the RUN_REFDIR. If it is FASLE, we have to “stage” (meaning copy) the initial condition/restart files in the case run directory ourselves. As an example, we did this in Assignment #3.

RUN_REFDIR is set to the default value of cesm2_init. This is a preset directory of initial condition files for starting CESM2 simulations. The full path is: /glade/p/cesmdata/cseg/inputdata/cesm2_init/

RUN_REFCASE tells it which files in RUN_REFDIR to use. Let’s take a look:

$ ls /glade/p/cesmdata/cseg/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020*
0101-01-01  0161-01-01  0301-01-01

The RUN_REFDATE tells us which of these we are using (0301-01-01)

$ ls /glade/p/cesmdata/cseg/inputdata/cesm2_init/b.e20.B1850.f19_g17.release_cesm2_1_0.020/0301-01-01/     b.e20.B1850.f19_g17.release_cesm2_1_0.020.ww3.r.0301-01-01-00000     rpointer.atm    rpointer.drv    rpointer.glc    rpointer.lnd     rpointer.ocn.ovf  rpointer.ocn.restart     rpointer.ocn.tavg.5       rpointer.rof

These are all the files that the model needs to start this run. Notice that they begin with RUN_REFCASE

So what does RUN_STARTDATE do?

Even though the restarts we start from begin on 0003-01-01, we can tell the model to begin our experiment with whatever we want the startdate to be. This is because our simulation does not need to match any specific, real date. You can see in my experiment that the RUN_STARTDATE is set to 0001-01-01 and the output begins at that date:

$ cd /glade/scratch/kpegion/archive/test1/atm/hist
$ ls -lt

Important Note: You can specify a new startdate for your run if the RUN_TYPE=hybrid. You cannot do this if your RUN_TYPE=branch.

Initial Conditions in our Added Heating Experiments (Assignment #4)

In the previous example, all this initial condition information was set for us by default as part of the compset definition. We did not have to set any of this ourselves.

In our added heating experiments (Assignment #4), we set this up ourselves using Dr. Swenson’s scripts. Let’s take a look:

$ cd /glade/u/home/kpegion/cases/addheat3
Results in group run_begin_stop_restart
	RUN_TYPE: branch
	RUN_STARTDATE: 0005-01-01
	RUN_REFDATE: 0005-01-01
	RUN_REFDIR: cesm2_init

RUN_TYPE is branch, meaning that the model components are initialized from restart files generated by a user specified CESM.

RUN_REFCASE is set to test1 which is the name of my case for experiment we did for Assignment #2.

GET_REFCASE is set to FALSE, so we must stage the restart files in the run directory for this case.

RUN_REFDIR is not used since GET_REFCASE is set to FALSE.

RUN_STARTDATE must match RUN_REFDATE since this is a branch run.

Staging the restart files

One of the lines in our script for setting up the added heating runs is:

# Initial conditions for Branch run
cp $refdir/* $ptmp/$expname/run/

This resolves to:

cp /glade/scratch/kpegion/archive/test1/rest/0005-01-01-00000/* /glade/scratch/kpegion/addheat3/run/

We copied the restart files from the restart directory to the run directory for our new case.

ls /glade/scratch/kpegion/addheat3/run/
CASEROOT              rpointer.rof            
rpointer.ocn.tavg.5          test1.ww3.r.0005-01-01-00000

Now that we know better how initializing the model works, we will learn about initialized prediction experiments.

Key Points