netxsimdg
Loading...
Searching...
No Matches
Nextsim::IDiagnosticOutput Class Referenceabstract
Inheritance diagram for Nextsim::IDiagnosticOutput:
Inheritance graph
Collaboration diagram for Nextsim::IDiagnosticOutput:
Collaboration graph

Public Member Functions

virtual void setFilenamePrefix (const std::string &filePrefix)=0
 Sets the output file name.
 
virtual void outputState (const ModelMetadata &meta)=0
 Outputs the passed ModelState.
 
void setData (const ModelState::DataMap &state)
 Set the initial data of the component from the passed ModelState.
 
- Public Member Functions inherited from Nextsim::ModelComponent
virtual std::string getName () const =0
 Returns the name of the component.
 
virtual ModelState getState () const =0
 Returns a ModelState from this component.
 
virtual ModelState getState (const OutputLevel &) const =0
 Returns a ModelState from this component at a specified level.
 
virtual ModelState getStateRecursive (const OutputSpec &os) const
 Returns the state of the ModelComponent and any ModelComponents it depends on.
 
virtual std::unordered_set< std::string > hFields () const
 Returns the names of all Type::H ModelArrays defined in this component.
 
virtual std::unordered_set< std::string > uFields () const
 Returns the names of all Type::U ModelArrays defined in this component.
 
virtual std::unordered_set< std::string > vFields () const
 Returns the names of all Type::V ModelArrays defined in this component.
 
virtual std::unordered_set< std::string > zFields () const
 Returns the names of all Type::Z ModelArrays defined in this component.
 

Protected Attributes

const std::map< std::string, ProtectedArray > protectedArrayNames
 
const std::map< std::string, SharedArray > sharedArrayNames
 
const std::map< std::string, std::string > protectedExternalNames
 
const std::map< std::string, std::string > sharedExternalNames
 

Additional Inherited Members

- Public Types inherited from Nextsim::ModelComponent
enum class  ProtectedArray {
  H_ICE , C_ICE , H_SNOW , T_ICE ,
  T_AIR , DEW_2M , P_AIR , MIXRAT ,
  SW_IN , LW_IN , MLD , SNOW ,
  SSS , SST , EXT_SSS , EXT_SST ,
  EVAP_MINUS_PRECIP , ML_BULK_CP , TF , WIND_SPEED ,
  WIND_U , WIND_V , HTRUE_ICE , HTRUE_SNOW ,
  OCEAN_U , OCEAN_V , ICE_U , ICE_V ,
  SLAB_SST , SLAB_SSS , SLAB_QDW , SLAB_FDW ,
  COUNT
}
 
enum class  SharedArray {
  H_ICE = SharedArrayOffset , C_ICE , H_SNOW , T_ICE ,
  Q_IA , Q_IC , Q_IO , Q_OW ,
  DQIA_DT , Q_PEN_SW , HSNOW_MELT , SUBLIM ,
  DELTA_HICE , DELTA_CICE , NEW_ICE , COUNT
}
 
typedef Logged::level OutputLevel
 
typedef std::function< void(size_t, const TimestepTime &)> IteratedFn
 
- Static Public Member Functions inherited from Nextsim::ModelComponent
static void setAllModuleData (const ModelState &stateIn)
 
static ModelState getAllModuleState ()
 
static void unregisterAllModules ()
 
static void getAllFieldNames (std::unordered_set< std::string > &uF, std::unordered_set< std::string > &vF, std::unordered_set< std::string > &zF)
 
static void registerExternalSharedArray (SharedArray type, ModelArray *addr)
 Registers a ModelArray into a SharedArray slot from outside any ModelComponent object. Intended for testing and debugging.
 
static void registerExternalProtectedArray (ProtectedArray type, ModelArray *addr)
 Registers a ModelArray into a ProtectedArray slot from outside any ModelComponent object. Intended for testing and debugging.
 
static const MARBackingStore & getSharedArray ()
 Returns a const reference to the store for SharedArray fields.
 
static const MARConstBackingStore & getProtectedArray ()
 Returns a const reference to the store for ProtectedArray fields.
 
- Static Public Attributes inherited from Nextsim::ModelComponent
static const size_t SharedArrayOffset = 0
 
- Protected Member Functions inherited from Nextsim::ModelComponent
void registerModule ()
 
- Static Protected Member Functions inherited from Nextsim::ModelComponent
static void registerSharedArray (SharedArray type, ModelArray *addr)
 
static void registerProtectedArray (ProtectedArray type, const ModelArray *addr)
 
static void overElements (IteratedFn fn, const TimestepTime &tst)
 
static void setOceanMask (const ModelArray &mask)
 Sets the model-wide land-ocean mask (for HField arrays).
 
static void noLandMask ()
 
static ModelArray mask (const ModelArray &data)
 Returns a copy of the provided ModelArray, masked according to the land-ocean mask.
 
static const ModelArrayoceanMask ()
 Returns the ocean mask.
 
- Static Protected Attributes inherited from Nextsim::ModelComponent
static ModelArrayp_oceanMaskH = nullptr
 

Detailed Description

Definition at line 18 of file IDiagnosticOutput.hpp.

Constructor & Destructor Documentation

◆ IDiagnosticOutput()

Nextsim::IDiagnosticOutput::IDiagnosticOutput ( )
inline

Definition at line 20 of file IDiagnosticOutput.hpp.

Member Function Documentation

◆ outputState()

virtual void Nextsim::IDiagnosticOutput::outputState ( const ModelMetadata & meta)
pure virtual

Outputs the passed ModelState.

Parameters
stateThe model state to be written out.
metaThe model metadata for the the given state.

Implemented in Nextsim::ConfigOutput, and Nextsim::SimpleOutput.

◆ setData()

void Nextsim::IDiagnosticOutput::setData ( const ModelState::DataMap & state)
inlinevirtual

Set the initial data of the component from the passed ModelState.

Parameters
stateThe ModelState containing the data to be set.

Implements Nextsim::ModelComponent.

Definition at line 46 of file IDiagnosticOutput.hpp.

◆ setFilenamePrefix()

virtual void Nextsim::IDiagnosticOutput::setFilenamePrefix ( const std::string & filePrefix)
pure virtual

Sets the output file name.

Parameters
fileNameThe file name to be set.

Implemented in Nextsim::ConfigOutput, and Nextsim::SimpleOutput.

Here is the caller graph for this function:

Member Data Documentation

◆ protectedArrayNames

const std::map<std::string, ProtectedArray> Nextsim::IDiagnosticOutput::protectedArrayNames
protected

Definition at line 48 of file IDiagnosticOutput.hpp.

◆ protectedExternalNames

const std::map<std::string, std::string> Nextsim::IDiagnosticOutput::protectedExternalNames
protected

Definition at line 50 of file IDiagnosticOutput.hpp.

◆ sharedArrayNames

const std::map<std::string, SharedArray> Nextsim::IDiagnosticOutput::sharedArrayNames
protected

Definition at line 49 of file IDiagnosticOutput.hpp.

◆ sharedExternalNames

const std::map<std::string, std::string> Nextsim::IDiagnosticOutput::sharedExternalNames
protected

Definition at line 51 of file IDiagnosticOutput.hpp.


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