clShortOutput Class Reference

Creates a tab-delimited text output file. More...

#include <OutputShort.h>

Inheritance diagram for clShortOutput:

clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clShortOutput (clSimManager *p_oSimManager)
 Constructor.
 ~clShortOutput ()
 Destructor.
void Action ()
 Collects data and writes the output file.

Protected Member Functions

void GetData (xercesc::DOMDocument *p_oDoc)
 Reads the desired options out of the parameter file.
void WriteFileHeader ()
 Writes output file header.
void ExtractLiveTreeInfo (xercesc::DOMDocument *p_oDoc)
 Extracts the output data relating to tree saving from the parameter file.
void ExtractDeadTreeInfo (xercesc::DOMDocument *p_oDoc)
 Extracts the output data relating to tree saving from the parameter file.
void ExtractSubplotInfo (xercesc::DOMDocument *p_oDoc)
 Extracts the subplot data from the parameter file.
bool TestForSave (DOMElement *p_oParentElement, char *cNodeName)
 Tests to see if a given node exists and has an attribute called "save" equal to true.
void GetDeadTreeStats ()
 For a time step, collects all basal area and density information for dead trees.
void GetLiveTreeStats ()
 For a time step, collects all basal area and density information for live trees.
void DeclareDataArrays ()
 Allocates memory for all of our arrays.
void DeclareDataArraysForSubplots ()
 Allocates memory for those arrays pertaining to subplots.
void WriteTimestepData ()
 Write the data for a single time step.

Protected Attributes

char m_cFileName [MAX_FILENAME_SIZE]
 Output file name.
float ** mp_fLiveRBA
 Array for one timestep's relative basal area - # types by # species.
float ** mp_fLiveABA
 Array for one timestep's absolute basal area - # types by # species.
float ** mp_fLiveRDN
 Array for one timestep's relative density - # types by # species.
float ** mp_fLiveADN
 Array for one timestep's absolute density - # types by # species.
float *** mp_fSubRBA
 Array for one timestep's relative basal area by subplot - # subplots by # types by # species.
float *** mp_fSubABA
 Array for one timestep's absolute basal area by subplot - # subplots by # types by # species.
float *** mp_fSubRDN
 Array for one timestep's relative density by subplot - # subplots by # types by # species.
float *** mp_fSubADN
 Array for one timestep's absolute density by subplot - # subplots by # types by # species.
float *** mp_fDeadABA
 Array for one timestep's dead absolute basal area - # types by # species by # dead reason codes.
float *** mp_fDeadADN
 Array for one timestep's dead absolute density - # types by # species by # dead reason codes.
bool * mp_bSaveLiveRBA
 Whether to save relative basal area.
bool * mp_bSaveLiveABA
 Whether to save absolute basal area.
bool * mp_bSaveLiveRDN
 Whether to save relative density.
bool * mp_bSaveLiveADN
 Whether to save absolute density.
bool ** mp_bSaveDeadABA
 Whether to save absolute basal area.
bool ** mp_bSaveDeadADN
 Whether to save absolute density.
bool * mp_bSaveAnyLive
 Shortcut flag for whether to save any information, by type.
bool * mp_bSaveAnyLiveBA
 Shortcut flag for whether to save basal area information, by type.
bool m_bUseLive
 Shortcut flag for whether any live trees are to be saved all.
bool m_bUseDead
 Shortcut flag for whether any dead trees are to be saved all.
struct
clShortOutput::stcSubplotInfo
mp_subplots
 Data structure for saving subplot data.
short int m_iNumSubplotsToSave
 Number of subplots we're saving data for.
short int m_iNumXCells
 Number of plot cells in the X direction - for subplots.
short int m_iNumYCells
 Number of plot cells in the Y direction - for subplots.
short int m_iNumTypes
 Number of types.
short int m_iNumSpecies
 Number of species.
float m_fXCellLength
 Length of subplot cells in X direction - defaults to match tree population.
float m_fYCellLength
 Length of subplot cells in Y direction - defaults to match tree population.

Classes

struct  stcCoords
 Structure for holding coordinates. More...
struct  stcSubplotInfo
 Data structure for saving subplot data. More...


Detailed Description

Creates a tab-delimited text output file.

It's a shortcut if a detailed output file isn't what you need. It supports subplots - as many as you want.

This will save absolute and relative basal area and density for snags, adults, and saplings, and absolute density for seedlings. This will also save absolute basal area and density for dead trees.

The namestring of this behavior, and the name which it is called in the behavior list of the parameter file, is "short output".

Copyright 2004 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 28, 2004 - Submitted as beta (LEM)
June 24, 2004 - Added snag support (LEM)
October 25, 2005 - Changed the way we search for trees (LEM)
January 2, 2007 - Support for user-defined subplot resolution and made version 1.1 (LEM)
January 11, 2011 - Added dead trees (LEM)

Constructor & Destructor Documentation

clShortOutput::clShortOutput ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clShortOutput::~clShortOutput (  ) 

Destructor.


Member Function Documentation

void clShortOutput::Action (  )  [virtual]

Collects data and writes the output file.

Reimplemented from clBehaviorBase.

void clShortOutput::GetData ( xercesc::DOMDocument *  p_oDoc  )  [protected, virtual]

Reads the desired options out of the parameter file.

Parameters:
p_oDoc DOM tree of the parsed input file.

Implements clWorkerBase.

void clShortOutput::WriteFileHeader (  )  [protected]

Writes output file header.

void clShortOutput::ExtractLiveTreeInfo ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts the output data relating to tree saving from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.

void clShortOutput::ExtractDeadTreeInfo ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts the output data relating to tree saving from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.

void clShortOutput::ExtractSubplotInfo ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts the subplot data from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.

bool clShortOutput::TestForSave ( DOMElement *  p_oParentElement,
char *  cNodeName 
) [protected]

Tests to see if a given node exists and has an attribute called "save" equal to true.

Parameters:
p_oParentElement Pointer to the parent element of the node in question.
cNodeName Tag name of the node.
Returns:
True if the save attribute is true; if the node does not exist or is equal to false, false is returned.

void clShortOutput::GetDeadTreeStats (  )  [protected]

For a time step, collects all basal area and density information for dead trees.

void clShortOutput::GetLiveTreeStats (  )  [protected]

For a time step, collects all basal area and density information for live trees.

void clShortOutput::DeclareDataArrays (  )  [protected]

Allocates memory for all of our arrays.

void clShortOutput::DeclareDataArraysForSubplots (  )  [protected]

Allocates memory for those arrays pertaining to subplots.

This must occur after the information has been extracted from the parameter file because we need to know how many subplots there are.

void clShortOutput::WriteTimestepData (  )  [protected]

Write the data for a single time step.


Member Data Documentation

Output file name.

If it already exists, new data is appended at the end

float** clShortOutput::mp_fLiveRBA [protected]

Array for one timestep's relative basal area - # types by # species.

float** clShortOutput::mp_fLiveABA [protected]

Array for one timestep's absolute basal area - # types by # species.

float** clShortOutput::mp_fLiveRDN [protected]

Array for one timestep's relative density - # types by # species.

float** clShortOutput::mp_fLiveADN [protected]

Array for one timestep's absolute density - # types by # species.

float*** clShortOutput::mp_fSubRBA [protected]

Array for one timestep's relative basal area by subplot - # subplots by # types by # species.

float*** clShortOutput::mp_fSubABA [protected]

Array for one timestep's absolute basal area by subplot - # subplots by # types by # species.

float*** clShortOutput::mp_fSubRDN [protected]

Array for one timestep's relative density by subplot - # subplots by # types by # species.

float*** clShortOutput::mp_fSubADN [protected]

Array for one timestep's absolute density by subplot - # subplots by # types by # species.

float*** clShortOutput::mp_fDeadABA [protected]

Array for one timestep's dead absolute basal area - # types by # species by # dead reason codes.

float*** clShortOutput::mp_fDeadADN [protected]

Array for one timestep's dead absolute density - # types by # species by # dead reason codes.

bool* clShortOutput::mp_bSaveLiveRBA [protected]

Whether to save relative basal area.

Ignored for seedlings. Array size # types.

bool* clShortOutput::mp_bSaveLiveABA [protected]

Whether to save absolute basal area.

Ignored for seedlings. Array size # types.

bool* clShortOutput::mp_bSaveLiveRDN [protected]

Whether to save relative density.

Array size # types.

bool* clShortOutput::mp_bSaveLiveADN [protected]

Whether to save absolute density.

Array size # types.

bool** clShortOutput::mp_bSaveDeadABA [protected]

Whether to save absolute basal area.

Ignored for seedlings. Array size # types by # dead reason codes.

bool** clShortOutput::mp_bSaveDeadADN [protected]

Whether to save absolute density.

Array size # types by # dead reason codes.

bool* clShortOutput::mp_bSaveAnyLive [protected]

Shortcut flag for whether to save any information, by type.

Shortcut flag for whether to save basal area information, by type.

bool clShortOutput::m_bUseLive [protected]

Shortcut flag for whether any live trees are to be saved all.

bool clShortOutput::m_bUseDead [protected]

Shortcut flag for whether any dead trees are to be saved all.

Data structure for saving subplot data.

They get the same data saved as the plot as a whole.An array of stcSubplotInfos, one for each subplot to save

short int clShortOutput::m_iNumSubplotsToSave [protected]

Number of subplots we're saving data for.

short int clShortOutput::m_iNumXCells [protected]

Number of plot cells in the X direction - for subplots.

short int clShortOutput::m_iNumYCells [protected]

Number of plot cells in the Y direction - for subplots.

short int clShortOutput::m_iNumTypes [protected]

Number of types.

short int clShortOutput::m_iNumSpecies [protected]

Number of species.

float clShortOutput::m_fXCellLength [protected]

Length of subplot cells in X direction - defaults to match tree population.

float clShortOutput::m_fYCellLength [protected]

Length of subplot cells in Y direction - defaults to match tree population.


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

Generated on Tue Apr 19 13:56:16 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6