Skip to content

Commit

Permalink
Merge pull request #3112 from bogensch/add_fixed_solar_constant
Browse files Browse the repository at this point in the history
Automatically merged using mergify
PR title: Add option to prescribe an invariant solar constant
PR author: bogensch
PR labels: ['BFB', 'radiation', 'DP-SCREAM', 'CI: automerge']
  • Loading branch information
mergify[bot] authored Nov 20, 2024
2 parents f7a7ad6 + 86abc7a commit 69a3d39
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/eamxx/cime_config/namelist_defaults_scream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,11 @@ be lost if SCREAM_HACK_XML is not enabled.
<orbital_obliquity COMPSET=".*SCREAM%AQUA.*">0.0</orbital_obliquity>
<orbital_mvelp type="real">-9999.0</orbital_mvelp>
<orbital_mvelp COMPSET=".*SCREAM%AQUA.*">0.0</orbital_mvelp>

<!-- Option for prescribing an invariant solar constant -->
<fixed_total_solar_irradiance>-9999.0</fixed_total_solar_irradiance>
<fixed_total_solar_irradiance COMPSET=".*SCREAM%RCE.*">551.58</fixed_total_solar_irradiance>

<rad_frequency hgrid="ne4np4">1</rad_frequency>
<rad_frequency hgrid="ne30np4">2</rad_frequency>
<rad_frequency hgrid="ne120np4">4</rad_frequency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ void RRTMGPRadiation::initialize_impl(const RunType /* run_type */) {
m_orbital_obliq = m_params.get<double>("orbital_obliquity" ,-9999);
m_orbital_mvelp = m_params.get<double>("orbital_mvelp" ,-9999);

// Value for prescribing an invariant solar constant (i.e. total solar irradiance at
// TOA). Used for idealized experiments such as RCE. Disabled when value is less than 0.
m_fixed_total_solar_irradiance = m_params.get<double>("fixed_total_solar_irradiance", -9999);

// Determine whether or not we are using a fixed solar zenith angle (positive value)
m_fixed_solar_zenith_angle = m_params.get<double>("Fixed Solar Zenith Angle", -9999);

Expand Down Expand Up @@ -840,6 +844,12 @@ void RRTMGPRadiation::run_impl (const double dt) {
shr_orb_decl_c2f(calday, eccen, mvelpp, lambm0,
obliqr, &delta, &eccf);

// Overwrite eccf if using a fixed solar constant.
auto fixed_total_solar_irradiance = m_fixed_total_solar_irradiance;
if (fixed_total_solar_irradiance >= 0){
eccf = fixed_total_solar_irradiance/1360.9;
}

// Precompute VMR for all gases, on all cols, before starting the chunks loop
//
// h2o is taken from qv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class RRTMGPRadiation : public AtmosphereProcess {
Real m_orbital_obliq; // Obliquity
Real m_orbital_mvelp; // Vernal Equinox Mean Longitude of Perihelion

// Value for prescribing an invariant solar constant (i.e. total solar irradiance
// at TOA). Used for idealized experiments such as RCE. This is only used when a
// positive value is supplied.
Real m_fixed_total_solar_irradiance;

// Fixed solar zenith angle to use for shortwave calculations
// This is only used if a positive value is supplied
Real m_fixed_solar_zenith_angle;
Expand Down

0 comments on commit 69a3d39

Please sign in to comment.