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

fix for double counting halocarbons #201

Merged
merged 2 commits into from
Oct 18, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions source/components/forcing_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,11 @@ void ForcingComponent::run( const double runToDate ) throw ( h_exception ) {
};

// Halocarbons can be disabled individually via the input file, so we run through all possible ones
forcings[ D_RF_halocarbons ].set( 0.0, U_W_M2 );
for (unsigned hc=0; hc<halos.size(); ++hc) {
for (unsigned hc=0; hc<halos.size(); ++hc) {
if( core->checkCapability( halos[hc] ) ) {
// Forcing values are actually computed by the halocarbon itself
forcings[ halos[hc] ] = core->sendMessage( M_GETDATA, halos[hc], message_data( runToDate ) );
forcings[ D_RF_halocarbons ] = forcings[ D_RF_halocarbons ] + forcings[ halos[hc] ];
}
}
}

// ---------- Black carbon ----------
Expand Down