Wednesday, October 26, 2011

Ex 6.3 - Snowpack-surface water model

1. Why do we model snowmelt as a constant rate rather than a proportion of the available snow? Make this modification to the model and analyze the difference in model performance. Which model seems to be more realistic? 

I don't know why snowmelt is modeled as a constant; perhaps because it's best to start with the simplest model possible and only add complexity when necessary. That said, if we want to make the snowmelt model more realistic, I would think that, in addition to total snowpack, temperature and incident radiation should be incorporated. Nevertheless, making snowmelt a function of the amount of snowpack, such that two percent of the snowpack melts on any day with temp > 0C (melt = 0.02 * snowice/dt) produces more realistic behavior than the constant snowpack model:

Melt as function of snowpack; note decay curve of "SnowIce."
2. Temperature in this model is presented as a random fluctuation over the sin function of time. What alternative methods could be used to generate temperature for this model? 

Weather station data could be used instead of a mathematical model. Incorporating not just average daily temperature, but also minimums and maximums, would likely improve the performance of the model.

6.2 - Evaporation model

1. As we have seen, our model of evaporation seems to produce less variability than the data (compare Evap_M and Hyd_evap_calc). Try to tweak the model parameters to increase the variability in model output.
All I did here was to augment the effect of cloudiness, and that seems to have brought the model's variability in line with the recorded data's. I changed SolRadGr from SolRad*(1-0.5*cloudy) to SolRad*(1-0.12*cloudy).

2. Check out the sensitivity of the model to changes in the parameter that describes the effect of cloudiness. What happens if the effect of clouds is increased quite dramatically (say, tripled)? How can we avoid some of the unrealistic behavior in the model that we observe in this case? 

By multiplying the parameter "cloudy" by three, we get hyper-dominance of cloudiness, such that on rather cloudy days, there's no evaporation:

We can avoid this behavior by not tripling the cloudy parameter. Just kidding. I think what he wants us to get at here is that by augmenting the effect of cloudiness within the SolRadGr function (as I did above), rather than augmenting the cloudy parameter itself, we can avoid the unrealistic behavior.

3. What is more important for the rate of evaporation: the latitude of the site, or the climatic conditions? What changes in climate can compensate the effect of the latitude and vice versa? 

Latitude has a relatively minor effect on evaopration:

LatDeg = 20 (model's minimum, in the tropics)

LatDeg = 64 (model's maximum, in the arctic)

On the other hand, we can see from the inter-dial and inter-seasonal variation that climatic conditions  exert a strong effect on evaporation. Although the following graph is crowded, it shows that air temperature is the primary driver of evaporation:

Ex 6.1 - Simple Surface Water Model

1. In Stella you can clamp your state variables to make sure that they never become negative. For example in this model the Surface_Water is non-negative. Note that the "non-negative" option is checked in the variable definition box. Since by default the variables get clamped in Stella this may be sometimes somewhat confusing and may hide some of the errors, when the variable is actually negative, but you do not see it. It is good practice to make sure that your processes (flows) are described properly, and do not deplete state variables beyond levels that are intended. Uncheck the non-negativity in this model and see what realy happens to the Surface_Water. Redefine the flows in the model to make sure that Surface_Water does not go negative. 

Obviously soil saturation is going to be a major determinant of the rate of surface water infiltration, but since we don't have a soil component in our model (yet, I hope), I just made infiltration a function of surface water: infiltration = .5 * surface_water
2. Let us supposed that the whole area got paved. How do we describe this in the model? What happens to Surface_Water? Does the result look plausible? Are there any other processes that we may be missing?

Assuming that the pavement is totally impermeable, surface water simply accumulates as the integral of rainfall. Obviously this is unrealistic, surface water will leave the site by flowing to lower elevations.

Wednesday, October 19, 2011

Ex. 5.3 - Trophic Chains

How does the model dynamics change if we consider the mortality process in the last model with the uptake of resource limited by the biomass in the first trophic level (N = u0T1)? Consider even and odd trophic chains and try to make some generaliztions. 

Well, the models' behaviors are interesting and quite divergent. Generalizations are going to be tough. Let's look at the three-trophic-levels model first. With death coefficient (d) = .05, the top predator dies off rapidly and the other two assume a periodicity that is reminiscent of the earlier predator-pray model.

Three levels, d = 0.05

If we decrease the mortality to d = .001, we get very different behavior. The first and third tropic levels decline, while the middle level enters a stable oscillation. I was curious how the system would collapse as levels 1 and 3 became extinct, so I extended the model to run to t = 1000, but the dynamics are unchanged. Levels 1 and 3 continue to decline, but are never eliminated, so level 1 continues to act as a conduit of "N" for level two.

Three levels, d = 0.001

Turning now to the four-level model, with d = .05, the overall behavior of the system is rather similar to the three-level model with d = .05 (the first set of graphs). There are some quantitative differences, but we see the same oscillations for the two lowest trophic levels (blue and red), and the highest (green) rapidly collapses.
4-levels, d = 0.05
In contrast, the four-level system with d = 0.001 exhibits very different behavior than the three-level system with d = 0.001. Whereas levels 1 and 3 declined in the three-level system, all four levels are stable in this system. Levels 1 and 3 oscillate roughly in-phase (lower-left scatter plot, note roughly direct proportionality), while levels 2 and 4 oscillate together, out-of-phase relative to levels 1 and 3.

4-levels, d = 0.001
Generalizations here are tough, but I'll try. One is that alternate trophic levels seem to move together, regardless of other details of the system, and adjacent trophic levels often move opposite each other. These are intuitive when we think in terms of top-down control: If there's a boom in coyotes, the will be a crash in rabbits, which will cause a boom in lettuce. In contrast, if we think in terms of bottom-up control, we wouldn't expect such behavior: a boom in lettuce will yield a boom in rabbits which will yield a boom in coyotes. Perhaps we can conclude that, at least for the system as we've formulated it, predator-based population controls dominate resource-based population controls. I wonder if I can turn down predation and turn up T1's resource use to make it not so... Indeed, just turning up u0, the first trophic level's source breaks the T1-T3 correlation. It also makes the system much flashier. Compare the above lower-left scatter plot, where when T1 is large, T3 is large and vise-versa, with the following lower-left scatter plot, where T1 and T3 appear to be inversely related. The only difference between them is the increased flow to the first trophic level (from 0.1 to 0.5).

And indeed, turning u0 up even further (to 1.0) strengthens the inverse relationship between T1 and T3. So perhaps we can conclude that when reourses at the bottom of the trophic web are abundant, they tend to govern the system, and when they are scarce, predation governs the system. That seems intuitive enough.

Ex. 5.2 - Predator-prey model sensitivity analysis

Run sensitivity analysis for this model with respect to the Half-saturation parameter SS. What do you observe when SS varies in the [0.5, 1.5] interval? How can you explain that?

Run 1 in red is SS = 0.5; run 5 in purple is SS = 1.5

As SS increases, the system converges toward the stable, non-trivial equilibrium more rapidly; that is, increasing SS dampens the extremes of rabbit and wolf populations as they approach their equilibrium values. The equilibrium populations are unaffected. This can be explained on several levels.

Mathematically, since SS is in the denominator of the predation function, as SS increases, predation slows, which effectively stabilizes the system.

Thinking about the system ecologically, if wolves consume rabbits very rapidly—that is, the slope of V vs. x is steep, which is a consequence of lower values of SS—then an increase in rabbit populations will produce a rapid upward swing in wolf population, because predation will increase their numbers before wolf mortality stabilizes their population. As a result of the increased number of wolves, the rabbit population will plummet, which will lead to a wolf die-off, and the cycle will repeat. On the other hand, when SS is large, predation is slow, so the wolf population reacts more gradually to fluctuations in the rabbit population, which effectively stabilizes both populations.

Monday, October 17, 2011

Exercise 5.1 - Modeling preditor-prey populations

1. Can you think of any examples of other systems that demonstrate the kind of behavior that we found in the predator-prey model?

Parasite-host dynamics are likely similar, where parasite population increases until the host’s capacity is reduced, at which point the parasite population declines until it finds a new host or the original host recovers to the point where the parasite can again expand.

2. In some predator-prey systems the prey can take refuge to hide from predators and avoid being consumed. Usually there is only a certain fixed number of individuals that the refuge can house. When the population of prey is large there is not enough refuge for all and the prey that could not find a place to hide gets consumed like in the standard predator-prey formalism. However when there are just a few preys their consumption slows down because they can find enough refuge places to hide. Build a predator-prey model with refuge and describe the dynamics that you observe. What equations did you modify and how? How can you explain the effect of refuge on the overall system dynamics?

To accomplish this, I made predation an exponential function:

V = y*a*eb*x

Where V is predation, y is # wolves, x is # rabbits, and a and b are parameters that represent, respectively, the magnitude of the refuge available to the rabbits and how easily rabbits beyond the refuge are taken by wolves.

In general, this has the effect of stabilizing the system’s equilibrium. Effectively, the rabbit population is limited to the size of the refuge and the wolf population consequently limited by the size of the rabbit population. This causality can be seen reflected in the fact that the wolves’ curve reaches its asymptote slightly later than the rabbits’ curve.