Forest+Initialization

The tree size information available in the Trails Forward system is obtained via a two-step process. First, a single value is produced for each tile using an algorithm which randomly assigns a mean tree diameter value based on data obtained from the Forest Inventory and Analysis program (FIA). This value is then used to seed an algorithm that builds a diameter distribution of tree sizes on the tile, following either a normal distribution (representing an even-aged forest stand) or a negative exponential distribution (an uneven-aged stand). The form of the distribution of stem sizes within a stand is selected at random. = =

=Mean Diameter Generation=

Initializing the algorithm
These settings represent the initial values for the generation of the mean tree size for each tile in the Trails Forward world. Information is only provided for the four forest types currently classified in the area (coniferous, deciduous, mixed, and forested wetland). Mean tree sizes and frequency were derived from FIA data (source?). Values for forested wetland are currently a duplicate of the parameters for the mixed forest type.

Ruby Code
code # TODO: revisit forested_wetland weights, since the values here are simply # copied from mixed. 12/30/11

DefaultTreeSizes = [10, 8, 5] DefaultTreeSizeWeights = { coniferous: [0.556035896, 0.258728096, 0.185236008], deciduous: [0.43, 0.37, 0.2], forested_wetland: [0.424745355, 0.350450241, 0.224804403], mixed: [0.424745355, 0.350450241, 0.224804403] }

LessFrequentTreeSizes = [0,2,4,6,8,10,15,20] LessFrequentTreeSizeWeights = { coniferous: [0.372470808,0.216336587,0.104601339,0.107220868,0.063811891,0.053101396,0.079521954,0.002935158], deciduous: [0.473433437,0.271229523,0.127051152,0.068338135,0.029715297,0.011826016,0.01840644,0], forested_wetland: [0.369033307,0.232593812,0.114078886,0.10555826,0.061401365,0.046739204,0.068313732,0.002281434], mixed: [0.369033307,0.232593812,0.114078886,0.10555826,0.061401365,0.046739204,0.068313732,0.002281434], }

code

Assigning Mean Tree Size Value
The algorithm generates a random number from a uniform distribution on the interval [0,1]. This number is used to select the corresponding mean size value from a multinomial distribution of three potential mean tree sizes, which each have their own probability (weight) of occurring. If the largest tree size (10) is chosen, the algorithm drops into a subroutine designed to select from a less frequent space of potential tree sizes. In this subroutine, a new random number from a uniform distribution on the interval [0,1] is generated and used to select between a different set of 8 potential mean tree diameter values (0, 2, 4, 6, 8, 10, 15, or 20) and assign that value to the tile.

Ruby Code
code def self.calculate_tree_size cover_type_symbol if cover_type_symbol.present? tree_size = random_element(DefaultTreeSizes, DefaultTreeSizeWeights[cover_type_symbol])

if tree_size == 10 tree_size += random_element(LessFrequentTreeSizes, LessFrequentTreeSizeWeights[cover_type_symbol]) end else tree_size = nil end tree_size end code

=Determine Diameter Distribution=

Representation within the database
The distribution of tree sizes within a tile is represented by a series of tree size 'bins' that represent the number of trees on a tile that fall into a particular size class. This is represented in the Trails Forward database as 12 different columns, each representing what is essentially a 2" size class, ranging from 2 inches to 24 inches. The size class represents the number of trees on the tile that fall in the appropriate size range. The size classes are typically named using their midpoint; i.e. the 12" size class represents the number of trees between 11 and 13 inches in diameter. The range of diameters within the smallest and largest size classes is not as strictly defined as the others; the 2" class represents the count of trees on the tile with diameters between zero and three, while the 24" size class represents the number of trees on the tile with diameters greater than 23".

Generating the distribution
The algoritm that determines the distribution of diameters uses one of two different subroutines; the specific subroutine is randomly selected for each individual tile. First, the target basal area is randomly generated for each tile on the interval [60, 110]. A random number is then generated to select either an uneven-aged distribution method or an even-aged distribution method to fill the bins.

Normal diameter distribution
The normal distribution is used to represent a forest stand that is comprised of trees that all germinated at relatively the same time (within a few years of each other). As all trees within the stand are roughly the same age, these diameter distribution in these stands tends to follow a normal distribution, and represents a certain type of forest structure and management potential. The information required to define the distribution includes the mean tree size (which is obtained from the mean diameter generation detailed above) and the standard deviation of the distribution, which is calculated by randomly generating a coefficient of variation (cv) from a beta distribution where alpha = 2 and beta = 5. The resulting value of cv is then multiplied by the mean tree size to obtain the standard deviation of the distribution.

The mean and standard deviation are then used to define the normal distribution from which tree sizes are randomly drawn. Trees are randomly generated from this distribution; if the tree size falls between 0 and 29 inches, the tree is incorporated into the stand. Trees outside of this range are considered outliers and are thrown away. If the tree size is deemed acceptable, the basal area of that individual tree is calculated using math BA_{tree} = 0.005454 * \(d^2\) math

The bin representing the corresponding size class of the generated tree is incremented by one, and the basal area of the individual tree is then added to a running basal area total for the tile. This process is repeated until the target basal area of the stand is exceeded.

Negative exponential diameter distribution
The negative exponential distribution is intended to recreate the more complex forest structure that is typical of stand that is comprised of trees of many different ages. The inverse of the mean of the distribution (provided by the mean diameter generation algorithm above) provides the rate parameter (lambda) for the exponential function math f(d) = \lambda e^{\lambda d} math which is then used to solve for //f(d)// for the midpoint of each diameter class (//d//). The values of //f(d)// for each size class are then normalized by calculating the sum of //f(d)// for all values of d, and then dividing each individual value of //f(d)// by that sum. This provides the proportion of individuals (and by extension, the probability) in each size class. These probabilities then define the multinomial distribution of individuals in the size classes for the negative exponential distribution of tree sizes. The bins filled by generating a random number on the interval [0,1], and choosing a diameter class that corresponds to that probability. The corresponding size class is then incremented by one, and the tile-level basal area total incremented by the appropriate amount (described above). This process continues until the tile-level basal area exceeds the target basal area for the tile.