Practice With Forest Models
Last update: 05 Feb 1997, 5 pm
This is an adapted version of lab guide by Prof. Miguel Acevedo. The complete version can be found at: http://www.geog.unt.edu/~acevedo/courses/5400/week9/lab09.htm.
Goals of this session:
- Learning ZELIG, DYNLAYER, MOSAIC, NHOOD and IDRISI
- Simulate vegetation dynamics (forest and grassland) and land use changes
- Theme: landscape dynamics, NPSP
- You have two options for the first three parts; the easiest is indicated in all cases

Getting ready
Warning: read this getting ready section before doing anything.
This session will rely on TIME-ZERO, NHOOD, DYNLAYER, MOSAIC, ZELIG and IDRISI
We will do a brief explanation/demo of NHOOD, MOSAIC in the lab
Remember to start the session by creating lab9 directory to store the files for this lab session
within lab9 make several subdirectories to keep all the forthcoming files sorted out
If you go for the easy option: at the h:\ prompt type
- md t0hubro
- md prairie
- md nhood
- md idrisi
If you go for the harder option: at the h:\ prompt type
- md zelig
- md dynlayer
- md mosaic
- md idrisi

Individual based models: ZELIG and/or TIME-ZERO
You will exercise one of these two (your choice):
- easy: a deterministic variant of JABOWA (does not explicitly include random establishment and mortality) and lumped (not based on individuals, but on averages) gap model using time zero and applies to the famous Hubbard Brook watershed; (in directory s:\5400\lab9\t0hubro or download\5400\lab9\t0hubro)
- harder: zelig using preliminary Ray Roberts Lake area upland forest data(in directory s:\zelig\ray_rob\5400 or download\zelig\ray_rob\5400)
Option 1: Deterministic and lumped JABOWA
- Copy all files *.* in s:\5400\t0hubro to your h:\lab9\t0hubro
- Note: if remote then download and unzip files from download\5400\lab9\t0hubro to c:\lab9\t0hubro
At the h:\lab9\t0hubro prompt, run gab menu, then select and run time-zero
- Select BUILD, use EDIT, select the clearcut.* model in your h: \lab9\t0hubro which you just copied from s:
- Examine the existing model, look at the equations and relate them to the lecture notes and the text book
- please note:
- State variables are basal areas per species, but they are not being calculated in the std diff eqn routine
- lines starting with rem are remarks or comments for documentation
- several subroutines have been implemented
- scenario: successional dynamics after clearcut (textbook p 162)
- the initial conditions 50, 30, 5, 5 for numbers of trees and 0.5 cm, and age 1 yr for all spp has been hard coded, due to limitations of time zero to handle more than a certain number of state variables
- List the parameters and their values, compare to Table 5.3 textbook page 129 (there are some small changes) and Table 6.2 page 160
- Run the default data set, wait for completion of run (100 yrs)
- plot, add, select time, bas(1), bas(2), bas(3) and bas(4) for the plot of simulation results
- this is similar to Fig 6.5 in page 161 textbook Swartzmann & Kaluzny; but note peak basal areas are not the same
- Examine the successional (sequential changes) dynamics among species in the simulation century
- cherry grows fast and decays before 40 yrs
- birch grows to a peak by year 40 and is gone by year 100
- maple grows at a slower rate and reaches max by year 100
- spruce is still growing slowly by the end of century, should eventually co-dominate with maple
- If following this option for the lab, then the following task will be part 1 of homework 9:
- generate a figure like the one in Fig. 6.6 page 162 of textbook
- for this use the other model: latesucc.* files
- the initial condition has been edited according to table 6.3 p 162 as
- 10, 5, 3, 3 for numbers
- 20, 15, 0.5, 0.5 for diameters
- 15, 15, 3, 3 for age
- run and get figure like Fig. 6.6
- explain successional sequence
Option 2: ZELIG
- Copy all files *.* in s:\zelig\ray_rob\5400 to h:\lab9\zelig
- Note: if remote then download and unzip files from download\zelig\ray_rob\5400 to c:\lab9\zelig
- the scenario is an upland forest around north texas (ray roberts area) growing on a 1 m deep sandy loam soil; stand dominated by short post oak and elm
- biological information on input file spp; site specific info on soil (sandy loam) and weather variables in site input file
- from dos or a dos window
- from h:\lab9\zelig type zelig to run
- answer cont, site and spp to questions about control, site and species file names
- after getting info on run, answer 0 for default of pseudo-random generator seed
- wait for run to complete (it may take a while depending on your machine; cont defines a 300 yr run; it should write to output file every 100 yrs, therefore you should see activity at yr 100, 200, 300)
- all of this is controlled by control cont input file
- zelig produces five output files: z.pri, z.log, z.tra,z.lai, z.pun
- it always write output to these file names, so you should rename after a run and before the next run to avoid overwriting
- use dos editor to look at one of the output files, say z.pri
- browse thru the file and briefly make sense of output
- in particular look at dbh distribution and stand aggregates for each simulation interval; this is an example of what you will see (this one is for year 100)
Simulation year: 100
Stand Structure by Species:
Species Dbh Distribution (#/ha, in 10-cm classes),
QUst 135.3 29.3 39.3 38.0 24.0 1.3 2.0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
QUmd 56.0 20.0 30.7 33.3 .0 .0 .0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
ULcr 153.3 38.7 28.7 8.0 2.0 .0 .0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
ULal 42.0 1.3 .7 .0 .0 .0 .0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
QUmp 94.7 2.7 .0 .0 .0 .0 .0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
CAil 80.7 2.0 .0 .0 .0 .0 .0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
All: 562.0 94.0 99.3 79.3 26.0 1.3 2.0 .0 .0 .0
.0 .0 .0 .0 .0 .0 .0 .0 .0 .0
Species Composition:
Species Density, Rel. D; BA, Rel. BA; IV200; Frequency:
QUst 269.3 31.2 10.9 56.0 43.60 .97
QUmd 140.0 16.2 4.9 25.0 20.61 .83
ULcr 230.7 26.7 3.4 17.2 21.93 .91
ULal 44.0 5.1 .1 .6 2.86 .34
QUmp 97.3 11.3 .1 .7 5.97 .64
CAil 82.7 9.6 .1 .5 5.02 .56
Stand Aggregates:
Total Density: 864.00/ha >10 cm: 302.00/ha
Basal Area: 19.524 sq.m/ha
Mean Dbh: 11.93 cm, with s.d. 12.07
Total woody biomass: 108.089 Mg/ha
Leaf-area index: 4.605
Average canopy height: 14.9 m
details on inpu and output files are given in zelig manual (reserve item in the library)
if following this option for the lab, then the following task will be part 1 of Homework 9
- plot a bar graph for the diameter distribution of QUst (Post oak) in the stand at the end of the simulation run
- plot a bar graph of stand composition according to relative basal area (should have six bars, one for each spp)
- is this roughly similar to what you see around ray roberts?
- plot basal area vs time for all species, for this you need to look at output file z.tra and then export to excel or other app
- this is what z.tra looks like
50 3042.67 25.38 18.63 9.12 2.84 8.56
3.33 2.38 1.50 .66 .72 .52
100 864.00 108.09 35.88 19.52 4.61 14.93
10.94 4.88 3.35 .12 .13 .09
150 2174.67 110.44 71.79 19.29 4.71 14.79
10.74 3.10 3.58 .47 .84 .56
200 1593.33 79.97 50.80 15.52 3.89 13.08
8.67 3.23 3.02 .31 .16 .15
250 1574.00 88.33 38.91 18.70 5.01 13.75
10.21 3.87 3.83 .35 .26 .17
300 1493.33 20.67 17.17 6.14 1.86 9.06
2.38 1.51 1.36 .32 .32 .25
the vars for each record are: time (yrs), stand aggregates (density, biomass, std of biomass, basal area, mean LAI, mean canopy height), then basal area per species (six in this case)
explain successional sequence if any

Successional Dynamics: SEEM and/or DYNLAYER
You will exercise one of these two (your choice):
- easy: a deterministic compartment model of old field succession in grassland (prairie) using SEEM and which applies to the Oklahoma/North Texas prairies;
- harder: dynlayer using the same data set for prairies (in directory s:\dynlayer\prairie or download\dynlayer\prairie)
Option 1: Grassland succession, SEEM
- Run SEEM
- Select ecosystem, succession ---> undisturbed
- default parameters, compare to textbook p 57
- note negative value in diagonal is computed internally by seem; you dont have to do it manually
- make a run
- plot all five successional states
- compare to plot in Fig 3.5 p 57
- explain successional sequence
- Select ecosystem, succession, ---> disturbed
- this is the same model, but with a periodic and sudden disturbance (e.g. harvest, grazing, fall season fire) of given periodicity (inverse of frequency) and intensity
- period (or 1/frequency) is the same for all stages, but intensity can be adjusted for each stage
- make a run
- plot all successional stages
- what is the effect of disturbance on cover type for stage 1? does stage completely disappear from the plot or is it preserved by the disturbance?
- if you are doing this option, do the following for part 2 of Homework 9:
- do sensitivity on disturbance period (2 to 10 years in steps of 2 yrs)
- look at the average (avg) metric of stage 5 ("climax" Andropogon bluestem grass) cover vs disturbance periodicity
- discuss the results, do you reduce bluestem cover by disturbing more often?
- how often is it possible to disturb the site and still maintain at least a 50% average of bluestem cover?
Option 2: Forest succession, DYNLAYER
- Program dynlayer.exe does semi-Markovian dynamics assuming gamma densities for the holding times
- It does semi-markov calculation of the means of fraction of a plot occupied by each cover type
- copy files from s:\dynlayer\prairie to h:\lab9\dynlayer
- if remote: then copy and unzip files from download\dynlayer\prairie
- run program dynlayer; to execute just type dynlayer
- answer prairie.in to question on input file
- answer prairie.out to question on output file
- look at data when the program is prompting you for confirm and always answer 1
- note that prairie.in will do a semi-Markov with exponential holding times, which makes it the same as a compartment model
- default parameters, compare to textbook p 57
- Use the editor to look at output file.
- variables are: time (in decades), fraction in each one of 6 states and the total ( 1.00)
- 5 decades (50 years) simulation
- To modify parameter value: edit prairie.in (be careful with the position of the data because is fixed format)
- Instructions on input file are contained in file readme
- This program is used at every cell of a landscape by model MOSAIC (as you will see in the next section under MOSAIC option)
- a similar program but more general to be used at each cell of a landscape by NHOOD (as you will see in the next section under NHOOD option)
- if you are doing this option, do the following for part 2 of Homework 9:
- export prairie.out to excel and plot all stages vs time
- compare to Fig. 3.5 p 57 of text book
- explore the effect of different transition probabilities at the bifurcation coming out of stage 1 and into either stage 2 or stage 3
- can you improve fit to Fig 3.5 of p 57 by tweaking these two probabilites and their corresponding rates?

Landscape dynamics: MOSAIC and NHOOD
You will exercise one of these two (your choice):
- easy: NHOOD a windows interface general impelmentation of semi-Markov landscpe dynamics(in directory s:\nhood or download\nhood)
- harder: mosaic using preliminary HJA forest data (in the Oregon Cascades) (in directory s:\mosaic or download\mosaic)
Option 1: NHOOD
- Directories s:\nhood or download\nhood contain simulation files developed to run under windows
- For remote: download and unzip from web site download\nhood
- If at the gab lab: copy the following files in this directory to h:\lab9\nhood
- mark1.exe
- default.int
- default.mrk
- nhoodmap.bat
- Before running windows: first run nhoodmap.bat to establish search path from dos
- Run windows
- From the file Manager select h:\lab9\nhood and then select mark1.exe
- double click to run
- click OK at use gently alert
- once at the nhood main menu
- famliarize yourself with program (there will be a hand out for guidance)
- there are several forms and objects:
- a button bar at the bottom
- a menu bar
- Model editor
- bring up another window with forms and objects
- defines the model for each cell
- forms
- Parameters form
- set landscape size , model, update time (use 10 yrs)
- Neighborhood form
- landscape map with model choice and initial condition at each cell
- Transients form
- to run and to select state cover map to display
- click thru layers to see different states as program runs
- Output form
- Management form
- to select period and intensity of harvest
- Influence form
- to select mode of neighborhood interaction
- For the lab exercise do the following
- in neighborhood win
- Parameters Form: Use DEFAULT as default model, use 25 cells, update 10 yrs
- Management Form, do not implement strategy
- Influence Form: no influence
- Output form: check *.BMP output and master file output *.out, type filename test1, press write header
- neighborhood form:
- press Rstate until you get 1,0,0,0,0 (clearcut),
- then press SetAll to put all cells in clearcut initial state
- select DEFAULT as default model
- transients form:
- press Reset in button bar to get time 0
- use Fix State control to
- check that state 1 is at value 1 for all cells (green color in bmp)
- and that all other states are at zero (black color in bmp)
- leave control at State 1
- press Step button to execute first ten years
- state 1 should have very little cover
- browse thru the other states using the Fix State control to see if you cover elsewhere
- result should be most cells are 90-100 % state 4 (shade intolerants)
- press step to go ten more years, no change
- press step again, until you get to year 60, start losing at state 4 goes into state 2
- most of the landscape covered with state 2 by year 90
- advance one more step to year 100, select state 4
- press Write to write results to BMP file
- Now go to File manager
- double check that test1.out and test1.bmp are there
- you can open this file in paintbrush (under accessories) or PaintShop Pro
- now press run to let it run continuoulsy and stop at year 200
- look at results
- State 3 should achieve a 70-80 % cover
- press Stop at simulation year ~500
- press Write button to write results to file
- If doing this option, then do the following for part 3 of homework 9:
- Change landscape size to 100 cells (10 x10 cells)
- Change the initial condition to be a map with state (0, 0.1, 0.7, 0.1, 0.1) everywhere in the landscape
- select four blocks of 4 cells (2x2 cells) to be clearcut at time zero, that is impose the init condition (1,0,0,0,0) in 4 x 4 = 16 cells across the landscape
- you could place them anywhere but assume that you them near the four corners, but separated from the edge
- repeat a 500 year simulation run under two different conditions, save bmp files at 200 and 300 yrs for state 3
- influence, reflection
- no influence
- discuss effect of dispersal in regeneration of clearcuts by showing the 200 , 300 yrs maps for state 3 for both conditions
- note a *.bmp file can be converted to *.gif using PaintshopPro
Option 2: MOSAIC
Files for this part are contained in s:\mosaic\roles\idrisi or in download\mosaic\roles\idrisi
Copy the following files to your h:\lab9\mosaic
- *.env
- *.par
- testmo.con
- *.pin
- *.ter
- mosaic.exe
If remote: download and unzip files in download\mosaic\roles\idrisi
The input files are:
- testmo.con is the simulation control file
- including landscape size,
- file names for
- *.env, environmental conditions,
- *.ter, species response
- *.par, semi-markov paarmeters
- *.pin, the initial conditions
- integration time and time to print
- *.env contain the info for maps of environmental conditions (soil moisture, temperature, nutrients) of landscape (complete name declared above in testmo.con) These maps are in format GRASS (a GIS)
- *.pin contain the info for maps of initial conditions of landscape (complete name declared above in testmo.con) These maps are in format GRASS (a GIS)
- *.par contains the semi-Markov parameter values (complete name declared above in testmo.con)
- *.ter contain the response of the species or roles to the environmental conditions (complete name declared above in testmo.con)
The pc version of the model will produce output in IDRISI *.img format; the file name convention is Sxx-Tyy.img, where xx is state number (01, 02, 03, 04 or 05 in this case) and yy is the time (00,10,20,30 in this case). Current version of mosaic does not write the *.doc file
To run just type mosaic
The program will inform you of run status with short message to screen every time it writes output maps
At the end of the run type dir *.img and make sure all the output maps are there (you should have 5 states x 4 time intervals = 20 *.img files)
Open one of these files in the editor or the notepad, say s01-t00.img
Should look like this
25
25
0
0
50
50
25
25
100
75
50
50
100
100
75
50
Which is an ascii idrisi *.img file, the numbers correspond to the cell values by row, that is to say: the map is really like this
25 25 0 0
50 50 25 25
100 75 50 50
100 100 75 50
In the next section we will learn idrisi and then you will understand how to display the maps
If you are following this option, then do this for part 3 of homework 9:
- What is the 300 yrs (30 decades) cover map of the landscape for state 4 (large shade tolerant trees)?
- Explain why you have more of this role on a band running north-south and centered on the landscape
- Hints:
- look at the *.env conditions, temperature (the), and soil fertility (fer) and soil moisture (moi), that should tell you about what is different in that center band
- look at spp (roles) response to env conditions in file *.ter, you should notice that all roles have the same response to fertility (parameters C1,C2,C3) and moisture (parameter D) stress, but that role 4 is better adapted to lower temperatures (parameters thmax, thmin)

GIS and remote sensing: IDRISI
Copy the following files from s:\idriexer to h:\lab9\idrisi
- massland.*
- dec88c.*
- drelief.*
- affaosol.*
- brazil4.*
Brief intro to IDRISI
- From h:\lab9\idrisi, run gab menu, select Graphics, select Idrisi
- Select Project Management
- select Environ on right hand side menu, enter
- select option 1 as h:
- select option 2 as \lab9\idrisi\
- return
- select list on right hand side menu
- you should see the massland, dec88c, etc files
- return
- now select describe on right hand side menu
- type massland
- you should get the *.doc file
- note 350 x 579 cells, 15 categories of land use
- return
- now select describe again, type drelief
- note 510 x 406 cells , 30 m resolution 16 categories of elevation
- Press Esc to exit righthand side menu and go back to main menu
- Select display, select color on right hand side
- type drelief
- select all defaults 1,, 1 , enter
- now you should have the image on the screen
- press c, cross hair on screen, coord by cell on lower left, move cursor, look at coord
- press right hand side mouse button, get rid of coord
- for a lot more detail, please follow hand out from IDRISI manual

Miguel F. Acevedo
Copyright © 1996 Miguel F. Acevedo