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

Leeyabot reboot #746

Closed
wants to merge 7 commits into from
Closed
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
4 changes: 2 additions & 2 deletions inst/include/component_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
#define D_RHO_OC "rho_oc" // BC radiative efficiency
#define D_RHO_SO2 "rho_so2" // SO2 radiative efficiency
#define D_RHO_NH3 "rho_nh3" // NH3 radiative efficiency
#define D_AERO_SCALE "alpha"
#define D_VOLCANIC_SCALE "volscl"

// halocarbon components
#define D_RF_CF4 D_RF_PREFIX CF4_COMPONENT_BASE
Expand Down Expand Up @@ -397,8 +399,6 @@
#define D_GMST "gmst"
#define D_LO_WARMING_RATIO "lo_warming_ratio"
#define D_DIFFUSIVITY "diff"
#define D_AERO_SCALE "alpha"
#define D_VOLCANIC_SCALE "volscl"
#define D_FLUX_MIXED "heatflux_mixed"
#define D_FLUX_INTERIOR "heatflux_interior"
#define D_HEAT_FLUX "heatflux"
Expand Down
5 changes: 4 additions & 1 deletion inst/include/forcing_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ class ForcingComponent : public IModelComponent {
unitval
rho_nh3; // (W yr m–2 Tg–1) IPCC AR6 radiative efficiency SO2 7.SM.1.3.1

// Aerosol parameters for aerosol-cloud interactions (RFaci) see equation
// Aerosol parameters
unitval alpha; // aerosol forcing factor, unitless
unitval volscl; // volcanic forcing scaling factor, unitless
// Parameters for aerosol-cloud interactions (RFaci) see equation
// Equation 7.SM.1.2 of IPCC AR6
double const aci_beta = 2.279759; // Dorheim et al. 2024
double const s_BCOC = 111.05064063; // (Tg C yr-1) IPCC AR6 7.SM.1.3.1
Expand Down
2 changes: 0 additions & 2 deletions inst/include/temperature_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ class TemperatureComponent : public IModelComponent {
// Model parameters
unitval S; //!< climate sensitivity for 2xCO2, deg C
unitval diff; //!< ocean heat diffusivity, cm2/s
unitval alpha; //!< aerosol forcing factor, unitless
unitval volscl; //!< volcanic forcing scaling factor, unitless

// Model outputs
unitval tas; //!< global average air temperature anomaly, deg C
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp119.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; (unitless) uncertainty scaling factor for volcanic forcing
volscl=1.0 ; (unitless) uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp126.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp245.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; (unitless) uncertainty scaling factor for volcanic forcing
volscl=1.0 ; (unitless) uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp370.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp434.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp460.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp534-over.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
4 changes: 2 additions & 2 deletions inst/input/hector_ssp585.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ baseyear=1750 ; when to start reporting; by definition, all F=0 in this year

; Optional radiative forcing constraint
;RF_tot_constrain=csv:tables/CONSTRAINT.csv
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
delta_co2=0.05 ; (unitless) forcing tropospheric adjustments for CO2 (7.3.2.1 of IPCC AR6)
delta_ch4=-.14 ; (unitless) forcing tropospheric adjustments for CH4 (7.3.2.2 of IPCC AR6)
delta_n2o=0.07 ; (unitless) forcing tropospheric adjustments for N2O (7.3.2.3 of IPCC AR6)
Expand All @@ -179,8 +181,6 @@ RF_misc[1750]=0
[temperature]
S=3.0 ; equilibrium climate sensitivity for 2xCO2 degC (A.4.4 of IPCC AR6)
diff=2.38 ; ocean heat diffusivity, cm2/s calibrated to historical observations Dorheim et al. 2024 for details
alpha=1.0 ; uncertainty scaling factor for aerosol forcing
volscl=1.0 ; uncertainty scaling factor for volcanic forcing
qco2=3.75 ; 2×CO2 RF (7.3.2 of IPCC AR6)

; Optional global temperature constraint
Expand Down
10 changes: 6 additions & 4 deletions project_files/Xcode/hector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
27B2C270261511C8005DE26D /* spline_forsythe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27B2C24D261511C8005DE26D /* spline_forsythe.cpp */; };
27B2C271261511C8005DE26D /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27B2C24E261511C8005DE26D /* main.cpp */; };
27F2613726B55617004BDD47 /* csv_tracking_visitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27962904268F237200333AA3 /* csv_tracking_visitor.cpp */; };
354045FC2913D50A00CA297D /* test_dependency_finder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 273FC38F26A3570B00D5303E /* test_dependency_finder.cpp */; };
354045FB2913CF6600CA297D /* test_csv_file_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 273FC39126A3570B00D5303E /* test_csv_file_reader.cpp */; };
354045FA2913C0F300CA297D /* test_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 273FC38D26A3570B00D5303E /* test_core.cpp */; };
354045FB2913CF6600CA297D /* test_csv_file_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 273FC39126A3570B00D5303E /* test_csv_file_reader.cpp */; };
354045FC2913D50A00CA297D /* test_dependency_finder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 273FC38F26A3570B00D5303E /* test_dependency_finder.cpp */; };
35ACB833285E4F4E0025928F /* h_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 275CBFF127AC7CC0009E2AF5 /* h_util.cpp */; };
954D62AE278E005500840656 /* nh3_component.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 954D62AD278E005500840656 /* nh3_component.cpp */; };
954D62AF278E005500840656 /* nh3_component.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 954D62AD278E005500840656 /* nh3_component.cpp */; };
Expand Down Expand Up @@ -607,7 +607,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "${BOOSTROOT}";
HEADER_SEARCH_PATHS = "${BOOSTINC}";
"HEADER_SEARCH_PATHS[arch=*]" = "${BOOSTROOT}";
LIBRARY_SEARCH_PATHS = "${BOOSTLIB}";
MACOSX_DEPLOYMENT_TARGET = 10.15;
Expand Down Expand Up @@ -664,7 +664,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "${BOOSTROOT}";
HEADER_SEARCH_PATHS = "${BOOSTINC}";
LIBRARY_SEARCH_PATHS = "${BOOSTLIB}";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
Expand All @@ -681,6 +681,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
HEADER_SEARCH_PATHS = "${BOOSTINC}";
LIBRARY_SEARCH_PATHS = "${BOOSTLIB}";
"OTHER_LDFLAGS[arch=*]" = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -692,6 +693,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
HEADER_SEARCH_PATHS = "${BOOSTINC}";
LIBRARY_SEARCH_PATHS = "${BOOSTLIB}";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "/Users/dorh012/Documents/Hector-WD/hector"
launchStyle = "0"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "${HECTORDIR}"
customWorkingDirectory = "/Users/dorh012/Documents/Hector-WD/hector"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
Expand Down
10 changes: 8 additions & 2 deletions scripts/OutputDifferences.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
knitr::opts_chunk$set(echo = TRUE)
```

## Differences in Hector outputs

Hello, this is `leeyabot`!

## Differences from last commit

``` {r differences, echo = FALSE, message = FALSE, include = FALSE}
# Load packages
library(dplyr)
Expand Down Expand Up @@ -163,3 +163,9 @@ if(!SAME) {
ggsave("comp_plot.png", plot = comp_plot, height = 6, width = 9)
}
```


## Differences from last release

TODO ADD here

Empty file.
33 changes: 26 additions & 7 deletions src/forcing_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ void ForcingComponent::init(Core *coreptr) {
core->registerCapability(D_RHO_SO2, getComponentName());
core->registerCapability(D_RF_SO2, getComponentName());
core->registerCapability(D_RF_ACI, getComponentName());
core->registerCapability(D_AERO_SCALE, getComponentName());
core->registerCapability(D_VOLCANIC_SCALE, getComponentName());

for (int i = 0; i < N_HALO_FORCINGS; ++i) {
core->registerCapability(adjusted_halo_forcings[i], getComponentName());
forcing_name_map[adjusted_halo_forcings[i]] = halo_forcing_names[i];
Expand Down Expand Up @@ -183,6 +186,9 @@ void ForcingComponent::init(Core *coreptr) {
core->registerInput(D_RHO_NH3, getComponentName());
core->registerInput(D_RF_MISC, getComponentName());
core->registerInput(D_FTOT_CONSTRAIN, getComponentName());
core->registerInput(D_AERO_SCALE, getComponentName());
core->registerInput(D_VOLCANIC_SCALE, getComponentName());

}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -237,6 +243,12 @@ void ForcingComponent::setData(const string &varName,
} else if (varName == D_RHO_SO2) {
H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed");
rho_so2 = data.getUnitval(U_W_M2_GG);
} else if (varName == D_AERO_SCALE) {
H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed");
alpha = data.getUnitval(U_UNITLESS);
} else if (varName == D_VOLCANIC_SCALE) {
H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed");
volscl = data.getUnitval(U_UNITLESS);
} else if (varName == D_FTOT_CONSTRAIN) {
H_ASSERT(data.date != Core::undefinedIndex(), "date required");
Ftot_constrain.set(data.date, data.getUnitval(U_W_M2));
Expand Down Expand Up @@ -422,35 +434,37 @@ void ForcingComponent::run(const double runToDate) {
double E_BC =
core->sendMessage(M_GETDATA, D_EMISSIONS_BC, message_data(runToDate))
.value(U_TG);
double fbc = rho_bc * E_BC;
double fbc = alpha.value(U_UNITLESS) * rho_bc * E_BC;
forcings[D_RF_BC].set(fbc, U_W_M2);

// ---------- Organic carbon ----------
double E_OC =
core->sendMessage(M_GETDATA, D_EMISSIONS_OC, message_data(runToDate))
.value(U_TG);
double foc = rho_oc * E_OC;
double foc = alpha.value(U_UNITLESS) * rho_oc * E_OC;
forcings[D_RF_OC].set(foc, U_W_M2);

// ---------- Sulphate Aerosols ----------
unitval SO2_emission = core->sendMessage(M_GETDATA, D_EMISSIONS_SO2,
message_data(runToDate));
double fso2 = rho_so2 * SO2_emission.value(U_GG_S);
double fso2 = alpha.value(U_UNITLESS) * rho_so2 * SO2_emission.value(U_GG_S);
forcings[D_RF_SO2].set(fso2, U_W_M2);

// ---------- NH3 ----------
double E_NH3 =
core->sendMessage(M_GETDATA, D_EMISSIONS_NH3, message_data(runToDate))
.value(U_TG);
double fnh3 = rho_nh3 * E_NH3;
double fnh3 = alpha.value(U_UNITLESS) * rho_nh3 * E_NH3;
forcings[D_RF_NH3].set(fnh3, U_W_M2);

// ---------- RFaci ----------
// ERF from aerosol-cloud interactions (RFaci)
// Based on Equation 7.SM.1.2 from IPCC AR6 where
double aci_rf =
-1 * aci_beta *
log(1 + (SO2_emission / s_SO2) + ((E_BC + E_OC) / s_BCOC));
// The 0.2 value comes from equally distributing the alpha scalar to all 5
// aerosol RF types.
double aci_rf =
alpha.value(U_UNITLESS) * (-1 * aci_beta *
log(1 + (SO2_emission / s_SO2) + ((E_BC + E_OC) / s_BCOC)));
forcings[D_RF_ACI].set(aci_rf, U_W_M2);
}

Expand All @@ -464,6 +478,7 @@ void ForcingComponent::run(const double runToDate) {
if (core->checkCapability(D_VOLCANIC_SO2)) {
// The volcanic forcings are read in from an ini file.
forcings[D_RF_VOL] =
volscl.value(U_UNITLESS) *
core->sendMessage(M_GETDATA, D_VOLCANIC_SO2, message_data(runToDate));
}

Expand Down Expand Up @@ -540,6 +555,10 @@ unitval ForcingComponent::getData(const std::string &varName,
returnval = rho_so2;
} else if (varName == D_RHO_NH3) {
returnval = rho_nh3;
} else if (varName == D_AERO_SCALE) {
returnval = alpha;
} else if (varName == D_VOLCANIC_SCALE) {
returnval = volscl;
} else if (varName == D_RF_BASEYEAR) {
returnval.set(baseyear, U_UNITLESS);
} else {
Expand Down
Loading
Loading