src/simpleNbox.cpp
// Set the preindustrial carbon value and adjust total mass to reflect the new
// value (unless it hasn't yet been set).  Note that after doing this,
// attempting to run without first doing a reset will cause an exception due to
// failure to conserve mass.
Set the preindustrial carbon value and adjust total mass to reflect the new
value (unless it hasn't yet been set).  Note that after doing this,
attempting to run without first doing a reset will cause an exception due to
failure to conserve mass.
Set the preindustrial carbon value and adjust total mass to reflect the new value ( unless it hasn ' t yet been set ) . Note that after doing this attempting to run without first doing a reset will cause an exception due to failure to conserve mass .
void SimpleNbox::set_c0(double newc0)
{
    if(masstot > 0.0) {
        double massdiff = (newc0 - C0) * PPMVCO2_TO_PGC;
        masstot += massdiff;
        H_LOG(logger, Logger::DEBUG) << "massdiff= " << massdiff << "  new masstot= " << masstot
                                     << "\n";
    }
    C0.set(newc0, U_PPMV_CO2);
}
void SimpleNbox :: set_c0 ( double newc0 ) { if ( masstot > 0.0 ) { double massdiff = ( newc0 - C0 ) * PPMVCO2_TO_PGC ; masstot += massdiff ; H_LOG ( logger , Logger :: DEBUG ) << " " << massdiff << " " << masstot << " \n " ; } C0 . set ( newc0 , U_PPMV_CO2 ) ; }
Set the preindustrial carbon value and adjust total mass to reflect the new
value (unless it hasn't yet been set).
Set the preindustrial carbon value and adjust total mass to reflect the new value ( unless it hasn ' t yet been set ) .