ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_TwoStreamRadiation.cpp File Reference

TwoStreamRadiation: the two-stream radiation model and its surface state. More...

#include <ERF_TwoStreamRadiation.H>
#include <ERF_RadStruct.H>
#include <AMReX_VisMF.H>
#include <AMReX_PlotFileUtil.H>
#include <AMReX_Utility.H>
#include <AMReX_Math.H>
#include <ERF_RadiationDiagnostics.H>
#include <ERF_TwoStreamColumn.H>
#include <ERF_PrognosticCloudFraction.H>
#include <ERF_AerosolOpticalDepth.H>
#include <ERF_SimplifiedSEB.H>
#include <ERF_OrbCosZenith.H>
#include <AMReX_Print.H>
#include <AMReX_ParallelDescriptor.H>
#include <AMReX_Gpu.H>
#include <ERF_IndexDefines.H>
#include <ERF_EOS.H>
#include <algorithm>
#include <cmath>
#include <ctime>
#include <limits>
Include dependency graph for ERF_TwoStreamRadiation.cpp:

Detailed Description

TwoStreamRadiation: the two-stream radiation model and its surface state.

Computes SW/LW fluxes and per-level heating rates using real per-column vertical sweeps over the atmospheric grid. Reads temperature and density from the state and properly accumulates optical depth through all vertical levels.

Capabilities include:

  • Height-varying optical depth: optional "cloud_layer" tau_profile_type adds cloud_tau_per_layer on top of the clear-sky background within [cloud_base_height_m, cloud_top_height_m].
  • Cloud fraction masking: blends clear-sky and cloudy-column fluxes via F = (1 - cloud_fraction) * F_clear + cloud_fraction) * F_cloudy.
  • Diffuse (scattered) SW flux: two-stream reflectance/transmittance per layer combined with the surface albedo by the adding method, giving upward and downward diffuse streams (see ERF_TwoStreamSW.H).
  • Per-level heating rate output: writes the SW/LW radiative tendencies of potential temperature, (dT/dt)/pi, to a 2-component MultiFab (component 0 = SW, component 1 = LW), mirroring the RRTMGP convention expected by the RhoTheta source term.

Includes support for:

  • Height-varying surface properties (albedo, emissivity, temperature)
  • Dynamic cloud fraction from relative humidity and cloud water
  • Prescribed bulk aerosol optical depth
  • Dynamic solar geometry (time-varying solar position)
  • Surface energy balance diagnostics and prognostic updates

Vertical orientation follows ERF: k = kmin is the surface layer and k = kmax the top layer. SW sweeps downward from kmax to kmin; LW sweeps downward (TOA -> surface) and then upward (surface -> TOA). Layer temperature is obtained from rho*theta through the Exner function.

CSV diagnostics (domain means unless noted): SW_surface is the SW absorbed by the surface, SW_TOA the incident SW at the top of the atmosphere, SW_up_TOA the reflected SW leaving the top, LW_net_surface the net (up - down) LW at the surface, LW_up_TOA the outgoing LW at the top, and heating_rate_max the max(|Q_sw|+|Q_lw|) over the column evaluations.