src/oceanbox.cpp
//------------------------------------------------------------------------------
/*! \brief Log the current box state
 *
 *  Writes a variety of information (carbon, temperature, DIC, etc.),
 *  as well as connection summaries, to the active log.
 */
\brief Log the current box state
Writes a variety of information (carbon, temperature, DIC, etc.),
as well as connection summaries, to the active log.
\ brief Log the current box state Writes a variety of information ( carbon temperature DIC etc . ) as well as connection summaries to the active log .
void oceanbox::log_state() {
	OB_LOG( logger, Logger::DEBUG) << "----- State of " << Name << " box -----" << endl;
    unitval futurec = carbon + CarbonToAdd + atmosphere_flux;
	OB_LOG( logger, Logger::DEBUG) << "   carbon = " << carbon << " -> " << futurec << endl;
	OB_LOG( logger, Logger::DEBUG) << "   T=" << Tbox << ", surfacebox=" << surfacebox << ", active_chemistry=" << active_chemistry << endl;
	OB_LOG( logger, Logger::DEBUG) << "   CarbonToAdd = " << CarbonToAdd << " ("
        << ( CarbonToAdd/carbon*100 ) << "%)" << endl;
    if( surfacebox ) {
        OB_LOG( logger, Logger::DEBUG) << "   FPgC = " << atmosphere_flux << " ("
            << ( atmosphere_flux/carbon*100 ) << "%)" << endl;
    }
    unitval K0 = mychemistry.get_K0();
    unitval Tr = mychemistry.get_Tr();
	OB_LOG( logger, Logger::DEBUG) << "   K0 = " << K0 << " " << "Tr = " << Tr << endl;
	if( active_chemistry ) {
        unitval dic = mychemistry.convertToDIC( carbon );
		OB_LOG( logger, Logger::DEBUG) << "   Surface DIC = " << dic << endl;
    }
	for( unsigned i=0; i<connection_list.size(); i++ ) {
		OB_LOG( logger, Logger::DEBUG) << "   Connection #" << i << " to " << connection_list[ i ]->Name << ", k=" << connection_k[ i ] << ", window=" << connection_window[ i ] << endl;
	}
}
void oceanbox :: log_state ( ) { OB_LOG ( logger , Logger :: DEBUG ) << " " << Name << " " << endl ; unitval futurec = carbon + CarbonToAdd + atmosphere_flux ; OB_LOG ( logger , Logger :: DEBUG ) << " " << carbon << " " << futurec << endl ; OB_LOG ( logger , Logger :: DEBUG ) << " " << Tbox << " " << surfacebox << " " << active_chemistry << endl ; OB_LOG ( logger , Logger :: DEBUG ) << " " << CarbonToAdd << " " << ( CarbonToAdd / carbon * 100 ) << " " << endl ; if ( surfacebox ) { OB_LOG ( logger , Logger :: DEBUG ) << " " << atmosphere_flux << " " << ( atmosphere_flux / carbon * 100 ) << " " << endl ; } unitval K0 = mychemistry . get_K0 ( ) ; unitval Tr = mychemistry . get_Tr ( ) ; OB_LOG ( logger , Logger :: DEBUG ) << " " << K0 << " " << " " << Tr << endl ; if ( active_chemistry ) { unitval dic = mychemistry . convertToDIC ( carbon ) ; OB_LOG ( logger , Logger :: DEBUG ) << " " << dic << endl ; } for ( unsigned i = 0 ; i < connection_list . size ( ) ; i ++ ) { OB_LOG ( logger , Logger :: DEBUG ) << " " << i << " " << connection_list [ i ] -> Name << " " << connection_k [ i ] << " " << connection_window [ i ] << endl ; } }
\brief Log the current box state
  Writes a variety of information (carbon, temperature, DIC, etc.
\ brief Log the current box state Writes a variety of information ( carbon temperature DIC etc .