Research Note No. 19
Feburary 13.1987

SDAVG Users' Guide: The CACTOS STand Description Averager

Version 2.0 by W.J.Meerschaert and Lee C. Wensel Abstract

The computer program SDAVG is designed to serve as apreprocesser of CACTOS 
stand description files. The program was written for the sole purpose of 
obtaining diameter distributions, stand profiles, and stand and stock tables
for a composite stand description. The comosite stand description produced
should not be used for projection growth. This program is written in standard 
Fortran 77 code. The current version is running on the University's Vax 11/780
computer system, the Apple Macintosh, and the IBM PC and compatibles.

INTRODUCTION

        SDAVG, the stand description averager, was developed as a tool for using 
CACTOS(Wensel, Daugherty, and Meerschaert, 1986) to express the characteristic
of stands of timber represented by multiple stand descriptions on a single file.
The composite plot can be analyzed by CACTOS to produce average stand level 
estimates pf diameter distributions, stand profiles, and stand and stock tables. 
Such stand level estimated can be produced before and after CACTOS simulations 
using the stand averager. CACTOS growth estimates can be averaged using the 
yield averager (Daugherty and Wensel, 19886).

        SDAVG creates a composite file of up to 500 tree records. The number of 
files used as input is determined by the number of tree records in each file, 
SDAVG will proceed through the lost of files until the 500 tree-record limit
is reached. The output file created by the program consists the tree records in 
the input files, with the tree weights divided by the number of seperate stand
descriptions used for input. Since averaging the site indices and/ or initial 
ages may have little meaning, they are not averaged and are not put into the 
compsite file. SDAVG is not intended to produce input files for CACTOS, rather,
it is intended for comparing. SDAVG should be used only for the report utilities 
of CACTOS listed above, it should not be used for growth projections due to the
nature of the competition models used in CACTOS.

        The SDAVG program is minimally interactive and requires only two keyboard
entries from the user: (1) the name of the input file containing yeild filenames
(termed the filenemes input file) and (2) a filenames for the output file (i.e.
the composite CACTOS stand description file). The program reads the seperate
stand descriptions from the filename file.

Input File Specifications:

        SDAVG operates from the filename file that contains the names of the 
seperate stand descriptions to be ibcluded in the composite stand description.
The program expects that the filename file has one stand description filename 
(up to 15 characters long) on each line with the filename starting in column 1.
This allows SDAVG to use the same file that was used as the input /output 
filenames in CACTOS batch mode. When this file is used for SDAVG, the program
ignores the other filenames included on each line (e.g. the report filename or
externally saved file). CACTOS version 3.0 has the abilitily to read 
concatenated stand descriptions when operating in batch mode. SDAVG can also
read these concatenated stand description files and utilize the input/output 
filenames file used to produce them. The filenames starting with a minus sign
in the input/ output filenames file, which are used as a signal to cause 
concatenation in batch mode, are essentially ignored by the stand averager as 
they are automatically included in the composite file and there is no way to 
specify otherwise.

        While SDAVG can utilize the input. output filenames file used in batch 
mode, any file with the stand description filenames in  the format described 
above (i.e. format a15) can be used as the filenames input file. This 
distinction is important as the user nay wish to select he stand descriptions
from a set of files that contain more than SDAVG's limit of 500 tree records.
An example of a filenames input file is shown below:

        columns:        123...
                        \cactos\comp3\stand1.sd 
                        \cactos\comp3\stand2.sd
                        \cactos\comp3\stand3.sd
                        \cactos\comp3\stand4.sd
                        \cactos\comp3\stand5.sd
                        \cactos\comp3\stand6.sd  

        See the CACTOS Users Guide (Wensel, Daugherty, and Meerschaert, 1986)
for further discussion of CACTOS stand description files.



Output File Specification:

        The composite file produced by SDAVG is a single stand description file 
similar to that described in the CACTOS Users Guide. The first line of the file 
has the stand identifier of "Avg. Stand Description", followed by the number of 
records in the file. The next two lines are blank, and the remainder of the file
consists of up to 500 tree records as they appeared in the individual stand 
descriptions, with the per acre tree weights divided by the number of plots used.


Use of SDAVG:

        To use SDAVG, the user would load the utilities disk and enter the 
command "SDAVG". The program will welcome the user to the program and request
that the user enter [return] to continue. The program will then ask the for the 
name of the filenames filr. After this file is successfully opened the user is 
asked for a name for the composite stand description file. THe program will
check with the user before overwriting a file that already exists. Once these 
two user entries are completed the program begins processing the stand 
description files, printing the filename of the file currently begin processed 
to the screen. When all of the stand descriptions have been read, the program
divides the tree weights by the number of stand descriptions used and writes 
the composite stand description file. If the any input file file contains enough 
tree records to go beyond the limit of 500, that file is not processed, and the
user is given the the choice of stopping the program or creating a composite file 
with the tree records read in thus far.

Literature Cited:

Wensel, Lee C., Peter J. Daugherty, and Walter J. Meerschaert. 1986.
        CACTOS User's Guide: The California Conifer Timber Output Simulator.
        Bulletin 1920, Agricultural Experiment Station, University of \
        California, Berkeley, CA.

HOME |FEEDBACK