Skip to content

Indirect effects of H2 on trop O3 #780

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

Draft
wants to merge 1 commit into
base: dev-h2
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions inst/include/component_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@

// o3 component
#define D_PREINDUSTRIAL_O3 "PO3"
#define D_COEFF_O3_H2 "CO3_H2"
#define D_ATMOSPHERIC_O3 "O3" CONCENTRATION_EXTENSION
#define D_ATMOSPHERIC_EM_CH4 "CH4"
#define D_EMISSIONS_NOX "NOX_emissions"
Expand Down
2 changes: 2 additions & 0 deletions inst/include/o3_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ class OzoneComponent : public IModelComponent {

//! Current ozone concentration, relative to preindustrial, Dobson units
unitval PO3;
unitval CO3_H2;
tseries<unitval> O3;
tseries<unitval> CO_emissions;
tseries<unitval> NMVOC_emissions;
tseries<unitval> NOX_emissions;
tseries<unitval> H2_emissions;

//! logger
Logger logger;
Expand Down
1 change: 1 addition & 0 deletions inst/include/unitval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ enum unit_types {
U_TG_NMVOC,
U_TG_H2,
U_DU_O3,
U_DU_O3_TG,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the unit here, exactly? Might be worth an explanatory comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it O3 Dobson Units per Tg emissions (in this case it is H2 emissions)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty esoteric :) -- anyway, my suggestion is just to make sure an explanation is easily findable by readers

U_GG_S, // SO2 emissions in Gg-S/yr

U_TG_PPBV, // Conversion for CH4 and N2O emission to concentrations
Expand Down
3 changes: 3 additions & 0 deletions inst/input/hector_ssp245.ini
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,12 @@ CH2=-0.00044625 ; coefficient for H2 TODO-H2
;------------------------------------------------------------------------
[ozone]
PO3=30.0 ; preindustrial O3 concentration
CO3_H2=4.09e-3 ; coefficient for H2 TODO-H2
NOX_emissions=csv:tables/ssp245_emiss-constraints_rf.csv ; emissions time series
CO_emissions=csv:tables/ssp245_emiss-constraints_rf.csv ; emissions time series
NMVOC_emissions=csv:tables/ssp245_emiss-constraints_rf.csv ; emissions time series
H2_emissions=csv:tables/ssp119_emiss-constraints_rf.csv ; emissions time series


;------------------------------------------------------------------------
[N2O]
Expand Down
16 changes: 14 additions & 2 deletions src/o3_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ void OzoneComponent::init(Core *coreptr) {
core->registerInput(D_EMISSIONS_CO, getComponentName());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpbond before I wrap up the changes for this PR I do have a question, looking at the src/o3_component.cpp

  // Register the emissions we accept (note that OH component also
  // accepts these.  That's ok
  core->registerInput(D_EMISSIONS_CO, getComponentName());
  core->registerInput(D_EMISSIONS_NMVOC, getComponentName());
  core->registerInput(D_EMISSIONS_NOX, getComponentName());
  core->registerInput(D_EMISSIONS_H2, getComponentName());

which makes me think that we can also read in the H2 emissions a second time here? Is that how we want to do this? Or should these emissions be passed as a dependency from the OH component?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kdorheim No, I agree, it seems cleanest to have it as a direct input here too.

That surprises me a little! I didn't realize (or forgot) the model could route inputs to multiple components.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So leave it as is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my vote, yes

core->registerInput(D_EMISSIONS_NMVOC, getComponentName());
core->registerInput(D_EMISSIONS_NOX, getComponentName());
core->registerInput(D_EMISSIONS_H2, getComponentName());
// Parameters read in from the ini
core->registerInput(D_COEFF_O3_H2, getComponentName());
core->registerInput(D_PREINDUSTRIAL_O3, getComponentName());

}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -94,6 +99,9 @@ void OzoneComponent::setData(const string &varName, const message_data &data) {
if (varName == D_PREINDUSTRIAL_O3) {
H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed");
PO3 = data.getUnitval(U_DU_O3);
} else if (varName == D_COEFF_O3_H2) {
H_ASSERT(data.date == Core::undefinedIndex(), "date not allowed");
CO3_H2 = data.getUnitval(U_DU_O3_TG);
} else if (varName == D_EMISSIONS_NOX) {
H_ASSERT(data.date != Core::undefinedIndex(), "date required");
NOX_emissions.set(data.date, data.getUnitval(U_TG_N));
Expand All @@ -103,6 +111,9 @@ void OzoneComponent::setData(const string &varName, const message_data &data) {
} else if (varName == D_EMISSIONS_NMVOC) {
H_ASSERT(data.date != Core::undefinedIndex(), "date required");
NMVOC_emissions.set(data.date, data.getUnitval(U_TG_NMVOC));
} else if (varName == D_EMISSIONS_H2) {
H_ASSERT(data.date != Core::undefinedIndex(), "date required");
H2_emissions.set(data.date, data.getUnitval(U_TG_H2));
} else {
H_THROW("Unknown variable name while parsing " + getComponentName() +
": " + varName);
Expand Down Expand Up @@ -131,12 +142,13 @@ void OzoneComponent::run(const double runToDate) {
unitval current_nox = NOX_emissions.get(runToDate);
unitval current_co = CO_emissions.get(runToDate);
unitval current_nmvoc = NMVOC_emissions.get(runToDate);
unitval current_h2 = H2_emissions.get(runToDate);
unitval current_ch4 = core->sendMessage(M_GETDATA, D_CH4_CONC, runToDate);

O3.set(runToDate,
unitval((5 * log(current_ch4)) + (0.125 * current_nox) +
(0.0011 * current_co) + (0.0033 * current_nmvoc),
U_DU_O3));
(0.0011 * current_co) + (0.0033 * current_nmvoc) +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there documentation on the source of these coefficients?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you talking about the 0.0011, 0.0033, 0.125, and 5?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gah! sorry I forgot to finish my reply! So those coefficients came from our implementation of Tanaka 2007 from Wigley 2002. But long story is that there is an implementation problem (similar to what happened with the methane lifetime wrt OH equation) so these coefficients might need to be changed

Tanaka, K., Kriegler, E., Bruckner, T., Hooss, G., Knorr, W., & Raddatz, T. (2007). Aggregated carbon cycle, atmospheric chemistry, and climate model (ACC2). Reports on Earth Systems Science, 40. https://www.semanticscholar.org/paper/Aggregated-Carbon-cycle%2C-atmospheric-chemistry-and-Tanaka-Kriegler/78a873db5b1d1410a68165f1fdf1873beba4e6db

Wigley, T. M. L., Smith, S. J., & Prather, M. J. (2002). Radiative Forcing Due to Reactive Gas Emissions. Journal of Climate, 15, 2690–2696. https://doi.org/10.1175/1520-0442(2002)015&#60;2690:RFDTRG&#62;2.0.CO;2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra detail @kdorheim

(CO3_H2.value(U_DU_O3_TG) * current_h2), U_DU_O3));

oldDate = runToDate;

Expand Down
3 changes: 3 additions & 0 deletions src/unitval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ string unitval::unitsName(const unit_types u) {
case U_DU_O3:
return "DU O3";
break;
case U_DU_O3_TG:
return "DU O3/Tg";
break;
case U_TG_N:
return "Tg N";
break;
Expand Down