Demos and tools for radiative feedback kernels from CESM-CAM5
Download (and cite) the data associated with these scripts: Angeline G. Pendergrass (2017) , and this software
Scientific reference for the data associated with these scripts:
Pendergrass, A.G., Andrew Conley and Francis Vitt: Surface and top-of-atmosphere radiative feedback kernels for CESM-CAM5. Earth System Science Data. doi:10.5194/essd-2017-108.
You'll need to have NCL and Matlab.
- Download the kernels, forcing, and demo data here: https://zenodo.org/record/997902
- Unzip them.
tar -xvf cam5-kernels.tar
Organize the files as follows:
mv *.kernel.nc kernels/
mv PS.nc kernels/
mkdir forcing
mv *.forcing.nc forcing/
mkdir demodata
mv *fields.nc demodata/
mkdir scripts
mv *.ncl scripts/
- Get the code here into the
cam5-kernels
directory.
a. Download the latest release as a.tar.gz
and then:
tar -xvvzf cam5-kernels-0.0.tar.gz -C cam5-kernels/ --strip-components=1
b. An alternative if you havegit
installed:
cd cam5-kernels/
rm -fr scripts/
git init
git remote add origin https://github.com/apendergrass/cam5-kernels.git
git pull origin master
Either way, you should havetools/
sitting alongsidekernels/
,forcing/
, anddemodata/
; andscripts/
will be replaced with the up-to-date version. - Then you are ready for a test run! Try the things below - they use the included demo data. Expected results are included; if you get a different result, something might have gone wrong with your installation.
- After the test run, you can go through and replace everything from
demodata/
with your own data.
Calculate the necessary components and calculate the temperature, water vapor, and surface albedo feedbacks on CESM hybrid sigma-pressure levels.
ncl scripts/calcp.ncl
ncl scripts/calcdq1k.ncl
matlab -nosplash -nodesktop -r "addpath ./scripts; kernel_demo"
Expected result:
Temperature feedback: -3.7261 W m^-2 K^-1
Surface albedo feedback: 0.53264 W m^-2 K^-1
Water vapor feedback: Water vapor feedback: 2.0881 W m^-2 K^-1
Standard CMIP tropospheric pressure levels are the script's default. Stratospheric extension is also included.
ncl scripts/calcp.ncl
ncl tools/convert_base_to_plevs.ncl
ncl tools/calcdp_plev.ncl
ncl tools/convert_change_to_plevs.ncl
ncl tools/t_kernel_to_plev.ncl
ncl tools/q_kernel_to_plev.ncl
matlab -nosplash -nodesktop -r "addpath ./tools; kernel_demo_pressure"
Expected result:
Temperature feedback: -3.7424 W m^-2 K^-1
Surface albedo feedback: 0.53264 W m^-2 K^-1
Water vapor feedback: 1.5897 W m^-2 K^-1
For the water vapor kernel, use the logarithm of mositure instead of moisture itself as the independent variable. This is more accurate because the radiative effects of water vapor scale with its logarithm.
ncl scripts/calcp.ncl
matlab -nosplash -nodesktop -r "addpath ./tools; logq_demo"
Expected result:
Water vapor feedback: 1.6158 W m^-2 K^-1
Calculate the Planck and lapse rate feedbacks
matlab -nosplash -nodesktop -r "addpath ./tools; planck_lapserate_demo"
Expected result:
Planck feedback: -3.1844 W m^-2 K^-1
Lapse rate feedback: -0.54166 W m^-2 K^-1
Temperature feedback: -3.7261 W m^-2 K^-1
Planck+lapse rate components: -3.7261 W m^-2 K^-1
Calculate LW and SW cloud feedbacks
matlab -nosplash -nodesktop -r "addpath ./tools; cloud_feedback_demo"
Expected result:
LW Cloud Feedback: -0.055163 W m^-2 K^-1
SW Cloud Feedback: 0.57637 W m^-2 K^-1
Andrew Conley and Francis Vitt (NCAR): help setting up the PORT calculation to make the kernels.
Thanks to Ryan Kramer (University of Miami), William Frey (University of Colorado), Paulo Ceppi (University of Reading), and Hanjun Kim (Pusan University) for feedback, testing, and bug identification.
Questions/comments? Post in the issues tab, or email me at apgrass at ucar dot edu