Friday, June 20, 2008

Progress on NetLogo so far

After going through the equations used in NetLogo and comparing them to those used in SimForest, I saw that for the most part these equations are functioning and being used correctly in combination with other equations. Currently, I am going through the values generated by these equations to see if the values being generated are actually correct.

I’ve found a few issues with the equations after going through them, mostly related to the recruitment equation, one of the three major equations used to drive the model (the other two being birth and death). Recruitment determines the number of new saplings planted depending on a particular species’ tolerance to light/shade (represented in the program on a scale of 1 – shade-intolerant, 2 – shade intermediate, or 3 – shade-tolerant). Two parts of the main recruitment equation involve the variable sitequality, which is itself an equation involving three other variables: wiltfactor, nitrogenfactor and tempfactor.

One problem that arose involves the wiltfactor equation, which incorporates the variable “waterstress”. This variable is defined in the SimForest equation editor as “[returning] the water stress at the site in the current year, computed based on the site's properties using a complex equation”. However, no other information is given on how to actually calculate the value. This creates a problem as the value we are currently using for waterstress in the wiltfactor equation (arbitrarily chosen to be 0.4) results in the equation producing a value of zero. This occurs because the wiltfactor equation is designed to return the higher of two values, either 0 or a value produced by list ((1.0 - ((waterstress / wlMax) ^ 2))) (0) In this case, the value that comes from this equation is negative, so 0 is always chosen. This in turn leads to the entire sitequality equation to be zero, as sitequality is defined as

tempfactor * nitrogenfactor nitrogen * wiltfactor

Some value needs to be found for waterstress that allows wiltfactor to return a non-zero value, so that it can in turn be used in sitequality

Another second problem that arises is with the variable representing available light. This calculation represents the amount of light available at the current tree's height, and the creators of SimForest admit that they have not included the actual equations for inspection in either their Glass Box or Black Box versions, which makes it difficult to determine if the value chosen is correct. In this case, we have again chosen an arbitrary value, 0.74, for available light.

This is a problem when we get to the recruitment equation. When light = 1, the formula availLight >= 0.989999 and sitequality > 0.0 is used to determine whether or not to perform the recruitment equation or just set recruitment to zero. Since 0.74 is always <>

A similar problem arises when light = 2. The equation used is minSaplingLight > availLight and availLight < light =" 2.

The two values for available light needed for light = 1 and light = 2 are not compatible, but the available light must be calculated so that one of these equations does not keep constantly returning 0 for tree recruitment.

NOTE: light = 3 has not been discussed yet because it relies upon the sitequality equation, which is currently returning 0.

Resolving these two issues is important in allowing development of the model to continue. In the meantime, I am working on adding the rest of the equations that the model uses (Growth, Age, etc), particularly those pertaining to the growth of the tree itself, which I am planning on incorporating into the NetLogo model if possible.

No comments: