#include <TestSubstrate.h>
Public Member Functions | |
void | TestSubstrate () |
Groups the other substrate tests. | |
Protected Member Functions | |
void | TestTreeFall (clSimManager *p_oSimManager) |
Tests tree fall. | |
void | TestSubstrateGridSetup (clSimManager *p_oSimManager) |
Tests aspects of substrate grid setup. | |
void | TestHarvestSubstrate (clSimManager *p_oSimManager) |
Verifies that harvest substrate is calculated correctly. | |
void | TestSubstrateRun1 (clSimManager *p_oSimManager) |
Substrate normal processing run 1. | |
void | TestSubstrateRun2 (clSimManager *p_oSimManager) |
Substrate normal processing, run 2. | |
void | TestSubstrateRun3 (clSimManager *p_oSimManager) |
Substrate normal processing run 3. | |
void | TestSubstrateRun4 (clSimManager *p_oSimManager) |
Substrate normal processing run 4. | |
void | VerifyRun1TS1Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS2Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 2 of TestSubstrateRun1(). | |
void | VerifyRun1TS3Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 3 of TestSubstrateRun1(). | |
void | VerifyRun1TS4Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 4 of TestSubstrateRun1(). | |
void | VerifyRun1TS1Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS2Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 2 of TestSubstrateRun1(). | |
void | VerifyRun1TS3Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 3 of TestSubstrateRun1(). | |
void | VerifyRun1TS4Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 4 of TestSubstrateRun1(). | |
void | VerifyRun1TS1Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS2Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 2 of TestSubstrateRun1(). | |
void | VerifyRun1TS3Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 3 of TestSubstrateRun1(). | |
void | VerifyRun1TS4Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 4 of TestSubstrateRun1(). | |
void | VerifyRun1TS1SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS2SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS3SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun1TS4SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun1(). | |
void | VerifyRun2TS1Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS2Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 2 of TestSubstrateRun2(). | |
void | VerifyRun2TS3Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 3 of TestSubstrateRun2(). | |
void | VerifyRun2TS4Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 4 of TestSubstrateRun2(). | |
void | VerifyRun2TS1Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS2Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 2 of TestSubstrateRun2(). | |
void | VerifyRun2TS3Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 3 of TestSubstrateRun2(). | |
void | VerifyRun2TS4Cohorts (clGridBase *p_oSubstrateGrid) |
Verifies the cohort structure for timestep 4 of TestSubstrateRun2(). | |
void | VerifyRun2TS1Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS2Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 2 of TestSubstrateRun2(). | |
void | VerifyRun2TS3Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 3 of TestSubstrateRun2(). | |
void | VerifyRun2TS4Tipup (clGridBase *p_oCalcsGrid) |
Verifies new tipup for timestep 4 of TestSubstrateRun2(). | |
void | VerifyRun2TS1SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS2SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS3SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun2TS4SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun2(). | |
void | VerifyRun4TS1Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 1 of TestSubstrateRun4(). | |
void | VerifyRun4TS2Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 2 of TestSubstrateRun4(). | |
void | VerifyRun4TS3Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 3 of TestSubstrateRun4(). | |
void | VerifyRun4TS4Proportions (clGridBase *p_oSubstrateGrid) |
Verifies the substrate proportions for timestep 4 of TestSubstrateRun4(). | |
void | VerifyRun4TS1SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun4(). | |
void | VerifyRun4TS2SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun4(). | |
void | VerifyRun4TS3SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun4(). | |
void | VerifyRun4TS4SubstrateArrays (clGridBase *p_oCalcsGrid) |
Verifies the fresh and decayed logs arrays for timestep 1 of TestSubstrateRun4(). | |
char * | WriteXMLFile1 () |
Writes a parameter file for harvest and mortality testing. | |
char * | WriteXMLFile2 () |
Writes a file for testing normal processing run 1. | |
char * | WriteXMLFile3 () |
Writes a file for testing normal processing run 3. | |
char * | WriteXMLFile4 () |
Writes a parameter file for testing tree tipup. | |
char * | WriteXMLFile5 () |
Writes a parameter file for testing tree fall. | |
char * | WriteXMLFile6 () |
Writes a file for testing normal processing run 4. | |
void | WriteCommonTreeStuff (std::fstream &oOut) |
Writes tree species information for runs of 1 species. |
|
Verifies that harvest substrate is calculated correctly. WriteXMLFile1() produces all cut types in various grid cells; in those cells, the substrate proportions should match the harvest conditions, and there should be only one cohort with the harvest's conditions. |
|
Tests aspects of substrate grid setup. This will enter three parameter files:
|
|
Substrate normal processing run 1. Verifies substrate calculations. This run has no harvest and non-directional tree fall. This function tests that new fresh log area and new tip-up area are added correctly when trees die, that cohorts are managed correctly, and that the final substrate numbers are calculated correctly. WriteXMLFile2() is used to set up with tip-up probabilities of 1. This executes the timesteps and provides mortality (killing known trees at certain times), and then verifies grid values. |
|
Substrate normal processing, run 2. This run has harvest and has non- directional tree fall. This tests that new fresh log area and new tip-up area are added correctly when trees die, that cohorts are managed correctly, and that the final substrate numbers are calculated correctly. WriteXMLFile1() is used to set up with tip-up probabilities of 1. This also has harvests occuring in three grid cells so harvest cohorts can be tested. This executes the timesteps and provides mortality (killing known trees at certain times), and then verifies grid values. |
|
Substrate normal processing run 3. Verifies substrate calculations. This run has no harvest and directional tree fall. This function tests that new fresh log area and new tip-up area are added correctly when trees die, that cohorts are managed correctly, and that the final substrate numbers are calculated correctly. WriteXMLFile3() is used to set up with tip-up probabilities of 1. This executes the timesteps and provides mortality (killing known trees at certain times), and then verifies grid values. |
|
Substrate normal processing run 4. Verifies substrate calculations with a multi-year timestep. This run has no harvest and non-directional tree fall. WriteXMLFile6() is used to set up with tip-up probabilities of 1. This executes the timesteps and provides mortality (killing known trees at certain times), and then verifies grid values. |
|
Tests tree fall. This makes sure that fallen trees are removed, and standing trees have the opportunity to become snags; and that all snags fall. This uses WriteXMLFile5() to do setup. It has three species. For live trees: for species 1, 20% of dead trees fall; for species 2, 50%; and for species 3, 0%. There is a behavior which is applied to snags, to ensure standing dead trees produce snags. 1000 trees and 1000 snags are created for each species, and all are set to dead. Then one timestep is run, and the snags counted to make sure there is the proper proportion of each. Then another timestep is run to make sure the snags created from dead adults aren't "disappeared". This process is repeated for WriteXMLFile4(), but this time we're concentrating on tipup area. In this case, the whole plot is divided into six grid cells. In each one go either 1000 live trees or 1000 snags of a species. We check to make sure the right amount of organic matter is in both. |
|
Writes tree species information for runs of 1 species. Starts with <trees> and ends with </allometry>. |
|
Writes a parameter file for harvest and mortality testing.
|
|
Writes a file for testing normal processing run 1.
|
|
Writes a file for testing normal processing run 3.
|
|
Writes a parameter file for testing tree tipup. There are three species. There is a behavior which is applied to snags. The timestep length is 1 year. The substrate grid cell size is set to 45 X 45 meters.
|
|
Writes a parameter file for testing tree fall. There are three species. For species 1, 20% of dead trees fall; for species 2, 50%; and for species 3, 0%. There is a behavior which is applied to snags. The timestep length is 1 year. In order to test grid stuff, this also has no harvest defined but has Substrate and substratecalcs grid maps.
|
|
Writes a file for testing normal processing run 4.
|