2: mid-Holocene case#
The Holocene Epoch started ~11,700 before present (11.7 ka BP) and is the current geological epoch.
The term Anthropocene is used by many scientists to describe the current period, characterized by profound and lasting human influences on Earth’s geological formations and ecosystems. However, the Anthropocene has not yet been officially formalized as a distinct epoch by the International Commission on Stratigraphy.
The Holocene is an interglacial period, marked by receding ice sheets and rising greenhouse gases that were accompanied by changes in the Earth’s orbit around the Sun.
Today, we will use CESM to investigate influence of mid-Holocene orbital forcing on climate.
Create, configure, build and run a fully coupled mid-Holocene (~6 ka BP) case called b.e21.B1850.f19_g17.midHolocene.001
following CESM naming conventions.
Run for 1 year.
Click here for hints
What is the compset for fully coupled mid-Holocene run?
Use
B1850
and modify preindustrial orbital configuration (no mid-Holocene compset available)
What is the resolution for B1850?
Use resolution
f19_g17
for fast throughput
What was the orbital configuration 6 ka BP?
According to Table 1 of Otto-Bliesner et al., (2017), Eccentricity = 0.018682, Obliquity (degrees) = 24.105, Perihelion = 0.87 (for simplicity, we don’t consider the other forcings here, i.e., CO2)
How to modify orbital configuration in CESM world?
Edit
user_nl_cpl
orb_mode = 'fixed_parameters'
orb_eccen = 0.018682
orb_obliq = 24.105
orb_mvelp = 0.87
Click here for the solution
# Set environment variables
Set environment variables with the commands:
For tcsh users
set CASENAME=b.e21.B1850.f19_g17.midHolocene.001
set CASEDIR=/glade/u/home/$USER/cases/$CASENAME
set RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
set COMPSET=B1850
set RESOLUTION=f19_g17
For bash users
export CASENAME=b.e21.B1850.f19_g17.midHolocene.001
export CASEDIR=/glade/u/home/$USER/cases/$CASENAME
export RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
export COMPSET=B1850
export RESOLUTION=f19_g17
Make sure you have $PROJECT
set to the project number given for this tutorial.
# Make a case directory
If needed create a directory cases
into your home directory:
mkdir /glade/u/home/$USER/cases/
# Create a new case
Create a new case with the command create_newcase
:
cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts/
./create_newcase --case $CASEDIR --res $RESOLUTION --compset $COMPSET
# Change the job queue
If needed, change job queue
.
For instance, to run in the queue main
.
cd $CASEDIR
./xmlchange JOB_QUEUE=main
This step can be redone at anytime in the process.
# Setup
Invoke case.setup
with the command:
cd $CASEDIR
./case.setup
You build the namelists with the command:
./preview_namelists
This step is optional as the script preview_namelists
is automatically called by case.build
and case.submit
. But it is nice to check that your changes made their way into:
$CASEDIR/CaseDocs/atm_in
# Set run length
./xmlchange STOP_N=1,STOP_OPTION=nyears
# Add the following to user_nl_cpl
orb_mode = 'fixed_parameters'
orb_eccen = 0.018682
orb_obliq = 24.105
orb_mvelp = 0.87
# Build and submit
qcmd -- ./case.build
./case.submit
# Validate your simulation setup
(1) If you want to check the log file, cpl.log.xxx
, in the Run Directory (when model is still running) or in your Storage Directory (when the simulation and archiving have finished).
Note: The less
command in Linux is a terminal pager program used to view (but not change) the contents of a text file one screen at a time. It is particularly useful for large files, as it does not need to read the entire file before starting, hence it loads large files faster than editors like vi or emacs.
To skip to the bottom of the file, press <shift> + g
To stop viewing the contents of the file with less
, press q
.
less /glade/derecho/scratch/$USER/$CASENAME/run/cpl.log.*
less /glade/derecho/scratch/$USER/archive/$CASENAME/logs/cpl.log.*.gz
Alternatively, use the real-time monitoring mode with less
that you can activate with the +F
(forward) option. Now, new lines will be continuously displayed as they are added to the file during the run.
To exit forward mode and revert to the standard interactive mode of less, press <ctrl> + C
.
less +F /glade/derecho/scratch/$USER/$CASENAME/run/cpl.log.*
(2) Type /orb_params
to search, you should see the following
(shr_orb_params) Calculate characteristics of the orbit:
(shr_orb_params) Calculate orbit for year: -4050
(shr_orb_params) ------ Computed Orbital Parameters ------
(shr_orb_params) Eccentricity = 1.868182E-02
(shr_orb_params) Obliquity (deg) = 2.410538E+01
(shr_orb_params) Obliquity (rad) = 4.207183E-01
(shr_orb_params) Long of perh(deg) = 8.696128E-01
(shr_orb_params) Long of perh(rad) = 3.156770E+00
(shr_orb_params) Long at v.e.(rad) = -5.751115E-04
# Check your solution
When the run is completed, look at the history files into the archive directory.
(1) Check that your archive directory on derecho (The path will be different on other machines):
cd /glade/derecho/scratch/$USER/archive/$CASENAME/atm/hist
ls
As your run is one-year, there should be 12 monthly files (h0
) for each model component.
There are two ways of defining months or seasons:
(1) a “fixed-length” method in which months are defined by a fixed number of days (e.g., January in CESM history files is the first 31 days of a 365-day year)
(2) a “fixed-angular” method in which months are defined by a fixed number of degrees of the Earth’s orbit (e.g., January is 31.0 days × (360° / 365-day year = 30.6° of orbit))
Due to changes in Earth’s orbital eccentricity and precession, the portion of Earth’s orbit covered by each fixed-length month varies over time. According to Kepler’s second law (1609), Earth moves faster along its elliptical orbit near perihelion and more slowly near aphelion. Because the calendar days of perihelion and aphelion shift over time, the number of days it takes Earth to traverse a fixed orbital arc (e.g., 30.6°) also changes. This leads to misalignment between fixed-length months relative to solstices/equinoxes when comparing simulations with different orbital configurations. The impact of this misalignment is known as the paleo calendar effect.
In this exercise, the issue is that CESM history output defines months using the fixed-length method. When comparing simulations of the mid-Holocene with the preindustrial control, a given month (e.g., January) corresponds to different positions in Earth’s orbit. Thus, apparent climate differences reflect both:
changes in insolation from orbital forcing (paleoclimate forcing), and
mismatches in calendar definition (paleo calendar effect)
Note: If you have daily-average output from CESM, the calendar effect must still be considered when summarizing those data by months. In this case, you would average daily data using the appropriate (paleo) month starting and ending days, thereby explicitly incorporating the changing month lengths.
Fortunately, post-processing tools exist to adjust CESM output and account for the paleo calendar effect. Your tasks are:
Convert monthly surface temperature and solar insolation fields from the mid-Holocene CAM history files to a calendar-adjusted monthly format by aggregating pseudo-daily data on fixed-angular calendar appropriate for 6 ka.
Use NCO and Ncview to compare and visualize differences between the mid-Holocene and preindustrial simulations after calendar adjustment.
Click here for hints
What tools exist to adjust the calendar of monthly average CESM history files?
One convenient Fortran-based tool for calendar-adjustment of climate model output is the PaleoCalAdjust tool from Bartlein & Shafer et al. (2019).
The key program
cal_adjust
can provide the paleo calendar-effect adjustment for CESM output. Note that CESM monthly-average history files (i.e., netCDF containing all variables with one month of output) must be converted to timeseries format (i.e., netCDF with one variable and all months) to be compatible with cal_adjust.Here is a path to a cal_adjust makefile that is locally configured for Derecho:
/glade/work/macarew/cesm_tutorial_paleo/makefile
How do I convert monthly-average history files into timeseries format?
To convert all variables in monthly-average CESM history files to timeseries format, the CESM_postprocessing tool is recommended. However, in this exercise we only need to convert 12 months of
TS
andSOLIN
into timeseries files, so NCO is suitable.
How do I format the information file needed to run the cal_adjust
program?
The information file is a CSV file that you will create with details about the location of input/output files, variables of interest, output frequency and length of simulation, calendar type used in CESM, paleo time period of interest, and the mean-preserving interpolation method used to convert monthly average values into a daily time step.
An example information file is available here in PaleoCalAdjust:
PaleoCalAdjust/data/info_files/cal_adj_info_test01.csv
Click here for the solution
# Download PaleoCalAdjust Github repository to your work directory
cd /glade/work/$USER
git clone https://github.com/pjbartlein/PaleoCalAdjust.git PaleoCalAdjust
# Make a directory for tutorial files in PaleoCalAdjust
mkdir /glade/work/$USER/PaleoCalAdjust/tutorial
# Use NCO to convert CAM history files into TS
and SOLIN
timeseries files
cd /glade/work/$USER/PaleoCalAdjust/tutorial
module load nco
ncrcat -v TS /glade/derecho/scratch/$USER/archive/b.e21.B1850.f19_g17.midHolocene.001/atm/hist/b.e21.B1850.f19_g17.midHolocene.001.cam.h0.*.nc b.e21.B1850.f19_g17.midHolocene.001.cam.h0.TS.0001.nc
ncrcat -v SOLIN /glade/derecho/scratch/$USER/archive/b.e21.B1850.f19_g17.midHolocene.001/atm/hist/b.e21.B1850.f19_g17.midHolocene.001.cam.h0.*.nc b.e21.B1850.f19_g17.midHolocene.001.cam.h0.SOLIN.0001.nc
Let’s also do this for the preindustrial control so that output files are in the same format:
ncrcat -v TS /glade/derecho/scratch/$USER/archive/b.e21.B1850.f19_g17.piControl.001/atm/hist/b.e21.B1850.f19_g17.piControl.001.cam.h0.*.nc b.e21.B1850.f19_g17.piControl.001.cam.h0.TS.0001.nc
ncrcat -v SOLIN /glade/derecho/scratch/$USER/archive/b.e21.B1850.f19_g17.piControl.001/atm/hist/b.e21.B1850.f19_g17.piControl.001.cam.h0.*.nc b.e21.B1850.f19_g17.piControl.001.cam.h0.SOLIN.0001.nc
# Copy makefile into tutorial directory and compile executable
cp /glade/work/macarew/cesm_tutorial_paleo/makefile .
make
# Copy and modify CSV information file with correct formatting for mid-Holocene simulation
cp ../data/info_files/cal_adj_info_test01.csv cal_adj_info.csv
This is what your final CSV file should look like: /glade/work/macarew/cesm_tutorial_paleo/cal_adj_info.csv
# Run executable to calendar adjust monthly CAM output
./cal_adjust cal_adj_info.csv
The calendar-adjusted files should be in your current directory!
Click here to visualize results
# Use Ncview to visualize solar insolation and temperature
Earth’s orbital configuration and the paleo calendar effect will influence monthly-average incoming solar insolation.
Take a look at the SOLIN
and TS
CAM variables for each month in the pre-industrial and calendar-adjusted mid-Holocene output.
module load ncview
ncview b.e21.B1850.f19_g17.piControl.001.cam.h0.SOLIN.0001.nc &
ncview b.e21.B1850.f19_g17.midHolocene.001.cam.h0.SOLIN.0001_cal_adj.nc &
ncview b.e21.B1850.f19_g17.piControl.001.cam.h0.TS.0001.nc &
ncview b.e21.B1850.f19_g17.midHolocene.001.cam.h0.TS.0001_cal_adj.nc &
Adding the & symbol allows you to open two Ncview windows and compare the files side by side.
Using the right arrow button in the Ncview windows, you can toggle between all months of the pre-industrial and mid-Holocene SOLIN
values.
Now, let’s take a look at the differences between the pre-industrial and mid-Holocene cases more clearly using NCO. The first comparison is the difference in SOLIN and TS induced by correcting for the paleo calendar effect.
ncdiff b.e21.B1850.f19_g17.midHolocene.001.cam.h0.SOLIN.0001_cal_adj.nc b.e21.B1850.f19_g17.midHolocene.001.cam.h0.SOLIN.0001.nc MH_adj-orig_SOLIN.nc
ncdiff b.e21.B1850.f19_g17.midHolocene.001.cam.h0.TS.0001_cal_adj.nc b.e21.B1850.f19_g17.midHolocene.001.cam.h0.TS.0001.nc MH_adj-orig_TS.nc
ncview MH_adj-orig_SOLIN.nc &
ncview MH_adj-orig_TS.nc &
# Questions for reflection:
Where are the largest differences in solar insolation?
Do the regional differences in solar insolation due to the paleo calendar effect translate to similar changes in surface temperature? Why or why not?
Now that we have a better understanding of the influence of the paleo calendar effect and have adjusted for it, let’s take a look at the impact of orbital variations on insolation between the preindustrial and mid-Holocene.
ncdiff b.e21.B1850.f19_g17.midHolocene.001.cam.h0.SOLIN.0001_cal_adj.nc b.e21.B1850.f19_g17.piControl.001.cam.h0.SOLIN.0001.nc MH-PI_SOLIN.nc
ncdiff b.e21.B1850.f19_g17.midHolocene.001.cam.h0.TS.0001_cal_adj.nc b.e21.B1850.f19_g17.piControl.001.cam.h0.TS.0001.nc MH-PI_TS.nc
ncview MH-PI_SOLIN.nc &
ncview MH-PI_TS.nc &
# Questions for reflection:
Which orbital parameters are different at the middle Holocene (6 ka BP)?
How does the orbital parameter impact the top-of-atmosphere shortwave radiation (solar insolation) during summertime in the Northern Hemisphere?
Do the results look correct? You can compare your results with Figure 3b of Otto-Bliesner et al., (2017)
What other aspects of climate are different between the mid-Holocene and pre-industrial runs?