Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | List of all members
pism::TSFluxDiagnostic Class Reference

Scalar diagnostic reporting a "flux". More...

#include <Diagnostic.hh>

+ Inheritance diagram for pism::TSFluxDiagnostic:

Public Member Functions

 TSFluxDiagnostic (std::shared_ptr< const Grid > g, const std::string &name)
 
- Public Member Functions inherited from pism::TSRateDiagnostic
 TSRateDiagnostic (std::shared_ptr< const Grid > g, const std::string &name)
 
- Public Member Functions inherited from pism::TSDiagnostic
 TSDiagnostic (std::shared_ptr< const Grid > g, const std::string &name)
 
virtual ~TSDiagnostic ()
 
void update (double t0, double t1)
 
void flush ()
 
void init (const File &output_file, std::shared_ptr< std::vector< double > > requested_times)
 
const VariableMetadatametadata () const
 

Private Member Functions

void update_impl (double t0, double t1)
 

Additional Inherited Members

- Public Types inherited from pism::TSDiagnostic
typedef std::shared_ptr< TSDiagnosticPtr
 
- Protected Member Functions inherited from pism::TSRateDiagnostic
void evaluate (double t0, double t1, double change)
 
- Protected Member Functions inherited from pism::TSDiagnostic
virtual double compute ()=0
 
void set_units (const std::string &units, const std::string &output_units)
 
- Protected Attributes inherited from pism::TSRateDiagnostic
double m_accumulator
 accumulator of changes (used to compute rates of change)
 
- Protected Attributes inherited from pism::TSDiagnostic
std::shared_ptr< const Gridm_grid
 the grid
 
const Config::ConstPtr m_config
 Configuration flags and parameters.
 
const units::System::Ptr m_sys
 the unit system
 
std::string m_time_name
 time series object used to store computed values and metadata
 
VariableMetadata m_variable
 
VariableMetadata m_dimension
 
VariableMetadata m_time_bounds
 
std::vector< doublem_time
 
std::vector< doublem_bounds
 
std::vector< doublem_values
 
std::shared_ptr< std::vector< double > > m_requested_times
 requested times
 
unsigned int m_current_time
 index into m_times
 
std::string m_output_filename
 
unsigned int m_start
 starting index used when flushing the buffer
 
size_t m_buffer_size
 size of the buffer used to store data
 

Detailed Description

Scalar diagnostic reporting a "flux".

The flux is averaged over reporting intervals.

The method compute() should return the change due to a flux over a time step.

Fluxes can be computed using TSRateDiagnostic, but that would require keeping track of the total change due to a flux. It is possible for the magnitude of the total change to grow indefinitely, leading to the loss of precision; this is why we use changes over individual time steps instead.

(The total change due to a flux can grow in magnitude even it the amount does not change. For example: if calving removes as much ice as we have added due to the SMB, the total mass is constant, but total SMB will grow.)

Definition at line 395 of file Diagnostic.hh.


The documentation for this class was generated from the following files: