Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to prescribe an invariant solar constant #3112

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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