Added Heating Experiments
Overview
Teaching: min
Exercises: minQuestions
How to do the added heating experiments?
Objectives
Added Heating
The version of CESM that we are using (CESM 2.1.3) has code and a namelist configuration in the atmosphere that performs atmospheric nudging (also sometimes called relaxation) for zonal wind (U), meridional wind (V), temperature (T), specific humidity (Q), and pressure (PS). We will use this functionality, modified by Dr. Swenson, to add a constant, 3D, idealized heating to temperature (T).
Create, Setup and Configure Using a Script
We will setup our case using a Unix c-shell script. This script will execute all the same commands that we typically perform by hand.
A script is a good method to keep track of what we did to setup our experiment and make sure we can reproduce it.
First, we will make a place in our home directory for experiment scripts and then copy the script to that location.
From your home directory:
$ mkdir cases_scripts
$ cd cases_scripts
$ cp ~cstan/clim670/nudging/addheat.csh .
Next we will take a look at the script and see what it does.
$ vi addheat.csh
The set commands
At the top, the set
set variables for the script to use. You will need to set these correctly for your run, specifically, set the following:
refcase
: set this to the case you used for Assignment #3. This is a B1850 Pre-industrial control simulation and we will branch from this case for this experiment.
expname
: set this to the case name you want to use for your added heating experiment
The following are already set correctly, but I want you to know what they mean in case you wish to use this script for something else and need to change it in the future:
project
: make sure the project number is set to the correct one.
model
: Make sure this is set to the version of the model you wish to use, it should be your /glade/work/USERNAME/cesm2.1.3
. The variables $USER will resolve to your username.
caseroot
: The path to your case
The rm
commands
This deletes the CASEROOT, so you are guaranteed to be starting fresh with your new case.
The second rm
command deletes your /glade/scratch/USERNAME/CASENAME
.
Remember the rm
command deletes without question, so be careful here not to delete a case you want to keep.
Create and setup the newcase
The next few lines run the create_newcase
and case.setup
scripts.
Modify Source code
Remember to modify source code, you need to put it in your SourceMods
directory.
The next line copies the new source code for the added heating experiment to the SourceMods
directory fo your new case.
xmlchange
commands
All the xmlchange commands to setup and configure your case
Modify the namelist
The next set of lines labelled # Variables to output
modifies the user_nl_cam
namelist to change the output frequency for the atmosphere and set the namelist to configure the options for the added heating (all the Nudge
options)
Setup your initial conditions
Since GET_REFCASE
is set to false
, the user needs to copy the initial conditions to the run directory. The next line labelled # Initial conditions for Branch run
does that for you.
Build and Submit your run
The last few lines of the code execute the build and submit scripts.
How to run the script
Make the script executable.
$ chmod +x addheat.csh
Run the script
$ ./addheat.csh
It will take a few minutes to run since it has to go through all the steps we normally do by hand, including the build step. Once it is complete, your job will be submitted to the queue and you can take a look using
$ qstat -u USERNAME
Key Points
Assignment #5
Overview
Teaching: min
Exercises: minQuestions
Added Heating Experiment
Objectives
What am I expected to do?
Perform the added heating experiment
The instructions are here
Perform the control experiment
Following a similar procedure as the added heating experiment, perform the control experiment.
A control expeirment means that everything is exactly the same except the thing you changed, in this case, the added heating. This means the two can be cleanly compared to see the impact of added heating.
Use the script called addheat.control.csh
located in ~cstan/scripts
.
Make a plot showing the impact of the added heating
The plot should show the same information as the one Dr. Swenson showed us.
Handling the output
You will nead to use the history files, not postprocessed time series files for this. The postprocessing only handles monthly data and requires full years to be complete. The heating output is 6 hourly located in the h2
history files and the dynamical variables (e.g. U,V,Z) are daily and are located in the h1
history files.
As an example, I provide code for reading the h1
history files from my added heating experiment below:
path='/glade/scratch/cstan/archive/'
exp_ah='addheat4'
fstub_h1='.cam.h1.*.nc'
ds_ah_h1=xr.open_mfdataset(path+exp_ah+'/atm/hist/'+exp_ah+fstub_h1,
combine='nested',concat_dim='time')
What to plot
Make a plot consistent with Dr. Swenson plot. His plot shows the difference between added heating and control averaged over the 3-months of the run for total heating (filled contours), added heating (black contours) and 200 hPa geopotential height as a representation of the changes in the storm track (blue and red contours). Below are some hints on how to get and calculate these 3 quanitites from the model output.
Heating Differences
To calculate the total heating averaged from 850hPa to 50hPa for the added heating experiment.
- Get the total heating by adding the heating variables together. These variables are
QRS
,QRL
,DTCOND
,DTV
, andNudge_T
. - Select the 850hPa to 50hPa levels and average over those levels.
- Calculate the mean over the 3-months of the experiment by averaging the data in time.
Do the same for the control experiment, noting that Nudge_T
(the added heating) does not exist in the control experiment.
Now, calculate the difference between the two experiments as Added Heating minus control.
Check your units and convert them to K/day
200 hPa Geopotential Height Differences
To calculate the differences in the 200 hPa geopotential height between the two experiments,
- Use the
Z3
variable for Geopotential Height - Select the lev=200
- Take the average over the 3-months
- Difference the two experiments as added heating minus control
Added heating
From the added heating experiment only, calculate the 850hPa-50hPa average of the Nudge_T
variable and average over the 3-months of the experiment.
How to turn it in?
Upload your figure to BB.
Make sure it is properly labelled (units, lats/lons, contours, title) and is a single
figure (this will involve using contourf
once and contour
twice (maybe more times if you are matching Dr. Swenson’s colors exactly).
When is it Due?
April 24
Key Points