@@ -144,6 +144,7 @@ void ForcingComponent::init(Core *coreptr) {
144144 core->registerDependency (D_EMISSIONS_BC, getComponentName ());
145145 core->registerDependency (D_EMISSIONS_OC, getComponentName ());
146146 core->registerDependency (D_EMISSIONS_NH3, getComponentName ());
147+ core->registerDependency (D_EMISSIONS_H2, getComponentName ());
147148 core->registerDependency (D_N2O_CONC, getComponentName ());
148149 core->registerDependency (D_RF_CF4, getComponentName ());
149150 core->registerDependency (D_RF_C2F6, getComponentName ());
@@ -372,7 +373,25 @@ void ForcingComponent::run(const double runToDate) {
372373 1831 ; // 2014 CH4 concentration ppb from the cmip6 historical scenario
373374 const double stratH2O_base =
374375 0.0485 ; // W m-2 Strat H2O RF (1850 to 2014) from 7.3.2.6 IPCC AR6
375- const double fh2o_strat = stratH2O_base * ((Ma - M0) / (Ma_base - M0)); //
376+ // unitval current_h2 = H2_emissions.get(runToDate);
377+
378+ // H2_emissions.get(H2_emissions.firstdate()).value(U_TG_H2);
379+
380+
381+ double current_h2 = core->sendMessage (M_GETDATA, D_EMISSIONS_H2,
382+ message_data (runToDate))
383+ .value (U_TG_H2);
384+ // TODO this needs to actually be the first date should not be hard codded in
385+ double inital_h2 = core->sendMessage (M_GETDATA, D_EMISSIONS_H2,
386+ message_data (1750 ))
387+ .value (U_TG_H2);
388+ // TODO this is shoudl not be hard coded in ither!
389+ const double fh2o_strat = stratH2O_base * ((Ma - M0) / (Ma_base - M0)) + 0.001 * 0.19 * (current_h2 - inital_h2); //
390+
391+
392+
393+
394+
376395 forcings[D_RF_H2O_STRAT].set (fh2o_strat, U_W_M2);
377396 }
378397
0 commit comments