Skip to content

Commit

Permalink
Forcing feedback fork (#508)
Browse files Browse the repository at this point in the history
* create forcing_feedback.rst file

* add forcing_feedback html template

* add forcing_feedback.py driver script

* add forcing_feedback_kernelcalcs.py

* add forcing_feedback_plot.py

* add forcing_feedback_util.py

* add obs_processing_script.py

* add forcing_feedback POD settings file

* Update README.md
  • Loading branch information
wrongkindofdoctor authored Feb 5, 2024
1 parent 8778a3a commit d74af2e
Show file tree
Hide file tree
Showing 9 changed files with 1,782 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and a link to the full documentation for each currently-supported POD.
| [Diurnal Cycle of Precipitation](https://www.cgd.ucar.edu/cms/bundy/Projects/diagnostics/mdtf/mdtf_figures/MDTF_QBOi.EXP1.AMIP.001.save/precip_diurnal_cycle/precip_diurnal_cycle.html) | Rich Neale (NCAR) |
| [Eulerian Storm Track](https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/diagnostics/eulerian_storm_track/doc/eulerian_storm_track.rst) | James Booth (CUNY), Jeyavinoth Jeyaratnam |
| [Extratropical Variance (EOF 500hPa Height)](https://www.cgd.ucar.edu/cms/bundy/Projects/diagnostics/mdtf/mdtf_figures/MDTF_QBOi.EXP1.AMIP.001.save/EOF_500hPa/EOF_500hPa.html) | CESM/AMWG (NCAR) |
| [Forcing Feedback Diagnostic](https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/diagnostics/forcing_feedback/doc/forcing_feedback.rst) | Brian Soden (U. Miami), Ryan Kramer|
| [Mixed Layer Depth](https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/diagnostics/mixed_layer_depth/doc/mixed_layer_depth.rst) | Cecilia Bitz (U. Washington), Lettie Roach |
| [MJO Propagation and Amplitude ](https://www.cgd.ucar.edu/cms/bundy/Projects/diagnostics/mdtf/mdtf_figures/MDTF_GFDL.CM4.c96L32.am4g10r8/MJO_prop_amp/MJO_prop_amp.html)| Xianan Jiang (UCLA) |
| [MJO Spectra and Phasing](https://www.cgd.ucar.edu/cms/bundy/Projects/diagnostics/mdtf/mdtf_figures/MDTF_QBOi.EXP1.AMIP.001.save/MJO_suite/MJO_suite.html) | CESM/AMWG (NCAR) |
Expand Down
114 changes: 114 additions & 0 deletions diagnostics/forcing_feedback/doc/forcing_feedback.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Forcing Feedback Diagnostic Package
============================================================
Last update: 12/21/2023

The Forcing Feedback Diagnostic package evaluates a model's radiative forcing and radiative feedbacks. This is a commong framework for understanding the radiative constraints on a model's climate sensitivity and is outlined in detail by :ref:`Sherwood et al. (2015) <1>`, among many others. To compute radiative feedbacks, anomalies of temperature, specific humidity and surface albedo are translated into radiative anomalies by multiplying them by radiative kernels developed from the CloudSat/CALIPSO Fluxes and Heating Rates product (:ref:`Kramer et al. 2019 <2>`).These radiative anomalies are regressed against the model's global-mean surface temperature anomalies to estimate the radiative feedbacks. Cloud radiative feedbacks are computed as the change in cloud radiative effects from the model's TOA radiative flux variables, corrected for cloud masking using the kernel-derived non-cloud radiative feedbacks (:ref:`Soden et al. 2008 <3>`). The Instantaneous Radiative Forcing is computed first under clear-sky conditions by subtracting kernel-derivred clear-sky radiative feedbacks from the clear-sky TOA radiative imbalance diagnosed from the model's radiative flux variables. The all-sky Instantaneous Radiative Forcing is estimated by dividing the clear-sky Instantaneous Radiative Forcing by a cloud masking constant (:ref:`Kramer et al. 2021 <4>`). All radiative quantities in this package are defined at the TOA and positive represents an increase in net downwelling or a radiative heating of the planet.


Contact info
------------

- PI of the project: Brian Soden, University of Miami ([email protected]);
- Current developer: Ryan Kramer ([email protected])

Open source copyright agreement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This package is distributed under the LGPLv3 license (see LICENSE.txt).

Functionality
-------------

The currently package consists of:
- a Python script (forcing_feedback.py), which sets up the directories and calls\.\.\.
- \.\.\. an Python script (forcing_feedback_kernelcalcs.py) which reads the data, performs the calculations and
saves the results to temporary netcdfs./././.
- \.\.\. Finally, a Python script (forcing_feedback_plots.py) reads in the temporary results,
observational radiative forcing and feedbacks and creates plots. Throughout the package, the scripts use Python
functions defined in a third Python script (forcing_feedback_util.py)

As a module of the MDTF code package, all scripts of this package can be found
under ``mdtf/MDTF_$ver/var_code/forcing_feedback``
and pre-digested observational data and radiative kernels (in netcdf format) under
``mdtf/inputdata/obs_data/forcing_feedback``
Place your input data at: ``mdtf/inputdata/model/$model_name/mon/``

Required programming language and libraries
-------------------------------------------

Python is required to run the diagnostic.

The part of the package written in Python requires packages os, sys, numpy, xarray, scipy, matplotlib,
cartopy and dask. These Python packages are already included in the standard Anaconda installation

Required model output variables
-------------------------------

The following three 3-D (lat-lon-time), monthly model fields are required:
- surface skin temperature ("ts" in CMIP conventions)
- TOA incident shortwave radiation ("rsdt")
- TOA outgoing all-sky shortwave radiation ("rsut")
- TOA outgoing clear-sky shortwave radiation ("rsutcs")
- TOA outgoing all-sky longwave radiation ("rlut")
- TOA outgoing clear-sky longwave radiation ("rlutcs")
- Surface downwelling all-sky shortwave radiation ("rsds")
- Surface downwelling clear-sky shortwave radiation ("rsdscs")
- Surface upwelling all-sky shortwave radiation ("rsus")
- Surface upwelling clear-sky shortwave radiation ("rsuscs")

The following 4-D (lat-lon-level-time), monthly model fields are requied:
- Air temperature ("ta" in CMIP conventions)
- Specific humidity ("hus")

The observational estimates (see below) are for 2003-2014. The start date is based on data availability while the end
date was selected to match the end date of relevant CMIP6 simulations. For an ideal comparison,
the model data used in this POD should cover the same period and have realistic,
historical forcing boundary conditions. However, this package will still have value as a "gut check" for any simulation,
especially with respect to radiative feedbacks, which often exhibit similar characteristics regardless of the
forcing scenario.


More about the diagnostic
-------------------------

a) Choice of reference dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

While total TOA radiative changes are directly observed, the radiative feedback and radiative forcing components are
not. Therefore, in this package the observational estimates of radiative feedbacks and radiative forcing are derived
by multiplying data from ERA5 Reanalysis by the CloudSat/CALIPSO radiative kernels mentioned above.
Global-mean surface temperature anomalies from ERA5 are used to compute the radiative feedbacks from the kernel-derived
radiative anomalies as described above. To diagnose the instantaneous radiative forcing, the kernel-derived,
clear-sky estimates of radiative feedbacks are subtracted by a measure of the total radiative anomalies at the TOA.
For the observational dataset used here, that total radiative anomaly estimates is from CERES.
The methods for diagnosing these radiative changes in observations are outlined by :ref:`Kramer et al. 2021 <4>`
and :ref:`He et al. 2021 <5>`

References
----------

.. _1:

1. Sherwood, S. C., Bony, S., Boucher, O., Bretherton, C., Forster, P. M., Gregory, J. M., & Stevens, B. (2015).
Adjustments in the Forcing-Feedback Framework for Understanding Climate Change.
*Bulletin of the American Meteorological Society*, **96** (2), 217–228. https://doi.org/10.1175/BAMS-D-13-00167.1

.. _2:

2. Kramer, R. J., Matus, A. V., Soden, B. J., & L’Ecuyer, T. S. (2019).
Observation‐Based Radiative Kernels From CloudSat/CALIPSO. *Journal of Geophysical Research: Atmospheres*,
2018JD029021. https://doi.org/10.1029/2018JD029021

.. _3:

3. Soden, B. J., Held, I. M., Colman, R., Shell, K. M., Kiehl, J. T., & Shields, C. A. (2008).
Quantifying Climate Feedbacks Using Radiative Kernels. *Journal of Climate*, **21** (14), 3504–3520.
https://doi.org/10.1175/2007JCLI2110.1

.. _4:

4. Kramer, R.J, He, H., Soden, B.J., Oreopoulos, R.J., Myhre, G., Forster, P.F., & Smith, C.J.
(2021) Observational Evidence of Increasing Global Radiative Forcing. *Geophys. Res. Lett.*, **48** (7),
e2020GL091585. https://doi.org/10.1029/2020GL091585

.. _5:
67 changes: 67 additions & 0 deletions diagnostics/forcing_feedback/forcing_feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!-- This file is part of the html module of the MDTF code package (see mdtf/MDTF_v2.0/LICENSE.txt) -->

<IMG SRC="../mdtf_diag_banner.png" border=0 usemap="#logo">
<TITLE>Forcing and Feedbacks</TITLE>
<!-- <H3>Convective Transition Statistics</h3> -->
<P>
The Forcing and Feedback module uses radiative kernels to compute the model's Instantaneous Radiative Forcing and the
Planck, lapse rate, water vapor, surface albedo and cloud radiative feedbacks. The total radiative change
(in W/m2/K) is also computed. These quantities are defined at the top-of-the-atmosphere (TOA) and decomposed
into longwave (LW) and shortwave (SW) components when applicable. Radiative feedbacks are diagnosed by regressing
local radiative anomalies against global-mean surface temperature.

These results can be used to understand what is driving the a model's particular climate sensitivity and more broadly
provide insights on how changes in the model's atmospheric state alter the model's energy budget.

<p>
<!--<a href="MDTF_Documentation_convective_transition.pdf">Full Documentation and Contact Information</a> -->
<P>
<TABLE>
<TR>
<TH ALIGN=LEFT>< color=navy> Forcing and Feedbacks
<TH ALIGN=LEFT>{CASENAME} vs. Observations
<TR>
<TH ALIGN=LEFT>Global-Mean Total Radiation Change
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_globemean_Rad.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Global-Mean Instantaneous Radiative Forcing
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_globemean_IRF.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Global-Mean Longwave Feedbacks
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_globemean_LWFB.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Global-Mean Shortwave Feedbacks
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_globemean_SWFB.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Comparison with CMIP6 Models
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_CMIP6scatter.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Temperature Feedback
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_Temperature.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Water Vapor Feedback
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_WaterVapor.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Surface Albedo Feedback
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_SfcAlbedo.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Cloud Feedback
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_Cloud.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Total Radiation Change
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_Rad.png>plot</A>
<TR>
<TR>
<TH ALIGN=LEFT>Map of Instantaneous Radiative Forcing Trend
<TH ALIGN=CENTER><A HREF=model/forcing_feedback_maps_IRF.png>plot</A>
<TR>
</TABLE>
77 changes: 77 additions & 0 deletions diagnostics/forcing_feedback/forcing_feedback.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# This file is part of the forcing_feedback module of the MDTF code package (see mdtf/MDTF_v2.0/LICENSE.txt)

# ======================================================================
# forcing_feedback.py
#
# Forcing Feedback Diagnostic Package
#
# The forcing feedback diagnostic package uses radiative kernels to compute radiative forcing and radiative
# feedback terms.
#
# Version 1 05-Sept-2023 Ryan Kramer (NOAA/GFDL prev. NASA GSFC/UMBC)
# PI: Brian Soden (University of Miami; [email protected])
# Current developer: Ryan Kramer ([email protected])
#
# This package and the MDTF code package are distributed under the LGPLv3 license
# (see LICENSE.txt).
#
#
# As a module of the MDTF code package, all scripts of this package can be found under
# mdtf/MDTF_$ver/var_code/forcing_feedback**
# and pre-digested radiative kernels used in the calculations under
# mdtf/inputdata/obs_data/forcing_feedback
# (**$ver depends on the actual version of the MDTF code package
#
# This package is written in Python 3 and requires the following Python packages:
# os,sys,numpy,xarray,scipy,matplotlib,cartopy,dask
#
# The following 4-D (lon-lat-pressure levels-time) monthly-mean model fields
# are required:
# (1) air temperature (units: K)
# (2) specific humidity (units: kg/kg)
#
# The following 3-D (lon-lat-time) monthly-mean model fields are required:
# (1) surface temperature (units: K)
# (2) TOA longwave and shortwave radiative flux diagostics (TOA SW upwellling, TOA SW downwelling, etc.)
# for longwave and shortwave and for all-sky and clear-sky conditions when applicable
# (3) Surface shortwave radiative flux diagnostics (Surface SW Upwelling, Surface SW downwelling)
# for all-sky and clear-sky conditions
#
#
##################################
# forcing_feedback
#
# Created By: Ryan J. Kramer, Brian J. Soden
#
#
# This is the main script for the forcing_feedback Toolkit. With some user-specified details
# this Toolkit uses radiative kernels to compute instantaneous radiative forcing and radiative feedbacks
# for a single model. Further details are in the module's documentation at ../doc.
#
##################################

import os

if not os.path.isfile(os.environ["OBS_DATA"] + "/forcing_feedback_kernels.nc"):
print("Kernel file is missing. POD will not work!")

else:

try:
os.system("python " + os.environ["POD_HOME"] + "/" + "forcing_feedback_kernelcalcs.py")
print('Working Directory is ' + os.environ['WK_DIR'])
print('Forcing Feedback POD is executing')
except RuntimeError as e1:
print('WARNING', e1.errno, e1.strerror)
print("**************************************************")
print("Kernel calculations (forcing_feedback_kernelcalcs.py) are NOT Executing as Expected!")

try:
os.system("python " + os.environ["POD_HOME"] + "/" + "forcing_feedback_plot.py")
print('Generating Forcing Feedback POD plots')
except RuntimeError as e2:
print('WARNING', e2.errno, e2.strerror)
print("**************************************************")
print("Plotting functions (forcing_feedback_plots.py) are NOT Executing as Expected!")

print("Last log message by Forcing Feedback POD: finished executing")
Loading

0 comments on commit d74af2e

Please sign in to comment.