Research Note No. 38
(revised) April 19, 1993

CPAVG User's Guide:

The CACTOS Compare Yield File Averager

Version 2.0
by
Lee C. Wensel and Eric C. Turnblom
Abstract

With version 4.5 CACTOS has the ability to compare individual tree projections 
with the subsequent remeasure of these same trees. The computer program CPAVG 
is designed to serve as a post-processor of CACTOS  yield compare summary 
files. The program  can be used to produce averaged compare files generated 
by the CACTOS cp (compare) option.  The program operates in the same manner 
as YDAVG, the yield averager, that is discussed in Research Note #18.  	

    

INTRODUCTION
	CACTOS, the California Conifer Timber Output Simulator (Wensel, 
Daugherty, and Meerschaert 1986) is used to make growth projections by 
5-year cycles specified.
        With versions 4.4 and later,  CACTOS has a new compare feature 
(Turnblom and Wensel 1992) that allows the user to read both an initial 
period and a remeasurement to prepare a report of the components of actual 
forest growth (survivor growth, ingrowth, mortality, and cut) and predicted 
growth (survivor growth and mortality).  These growth components are summarized 
in square feet of basal area.


HOW TO USE THE COMPARE AVERAGER

	CPAVG, which operates much like the yield file averaging program YDAVG 
(Daugherty, Wensel, Meerschaert  1987), processes the yield compare files 
produced by CACTOS to compute the average and standard deviations for these 
individual yield comparisons.  Because of their similarity, the user is 
referred to the YDAVG manual (ibid.) before proceeding.
	Earlier versions of YDAVG did not give the user convenient control over 
the order in which the species groups appeared in the reports.  Instead, they 
appeared in the order in which they occurred in the various yield files, 
potentially different in each application.  In the process of developing CPAVG 
an initialization file was added where in the user can specify the order of 
the species groups.

	The initialization file, with the name cpavg.ini, consists of a list 
of valid species group names in the first 10 columns of each line and an 
asterisk (*) in column 11 for each name to be used in the present application.  
An example of an initialization file is as follows:
Pond. Pine*
Sugar Pine*
Cedar misc*
DouglasFir*
White Fir
where only the first 4 species names are used since the last name doesnÕt have 
an asterisk in column 11.  The species group names used in any given report 
are specified in configuration option ÒspÓ in CACTOS.  The CACTOS species 
group options 0 to 5 are as follows (Wensel, Daugherty, and Meerschaert 1986, 
page 15):

 SPECIES GROUP CODES

   0 - totals only

   1 - 1) Pond. Pine    2) Sugar Pine    3) Cedar misc    4) DouglasFir
       5) White Fir     6) Red Fir       7) L.P. Pine     8) White Pine
       9) Jeff. Pine   10) Con. misc    11) Chinquapin   12) Black Oak 
      13) Tan Oak      14) H.W. misc 

   2 - 1) Conifers      2) Hardwoods 

   3 - 1) White Pine    2) YellowPine    3) DouglasFir    4) True Firs 
       5) Cedar Misc    6) Con. misc     7) Black Oak     8) Tan Oak   
       9) H.W. misc 

   4 - Not defined

   5 - User defined species grouping option


Option 1, the default, is to have no combining of species and the reports 
will be by individual species.  The initialization file cpavg.ini must have 
the species group names as they appear on the yield files but can be in 
whatever order the user prefers.
  Note here that option 5 allows the user to define species groups in any 
combination desired and to specify the names to be used for these groups.
	All species group names encountered that are not initialized in 
cpavg.ini are added to the summary in the order they are encountered.

EXAMPLE
	Consider the two concatenated stand description files demo85.sd and 
demo90.sd containing measurements on 3 plots from 1985 and 1990, respectively.  
These file names are specified in the CACTOS filenames file demo.fn shown in 
Appendix A.1.  Using CACTOS in batch mode with the command file demo.cm 
(Appendix A.2) we produce the compare file demo85.cp shown in Appendix A.3 
with individual comparisons for the three plots.  The sample run stream used 
to average these three plots is shown in Appendix A.4 with the resulting 
summary (file demo85.acp) shown in Appendix A.5.  The (optional) second part 
of this summary is the spreadsheet listing.  Here the same information is 
provided as in the formatted summary but without the labels that interfere 
with the process of importing the summaries into spreadsheet programs.

INTERPRETATION OF CPAVG SUMMARY
	CPAVG will list the stand labels for the plots compared using the 
stand labels given on the first line of each of the stand descriptions (Wensel, 
Daugherty, and Meerschaert, 1986, page 10).  CACTOS copies this information 
to the compare file (demo85.cp) and CPAVG copies it to the summary file 
(demo85.acp).  Thus, one must ensure that meaningful labels appear on the 
stand description files if they are to properly define the plots and 
measurements compared.
	The option to specify the number of empty plots is provided to make 
the CPAVG results on the same base as results from the yield averager YDAVG 
(Daugherty, Wensel, and Meerschaert 1987).
	The sites are averaged over all of the plots on which each species 
site index appears.  Only the site index information from the first 
measurement is considered.  For a given species the site index may not apply 
to all of the plots sampled.  Thus, care must be exercised in interpreting 
these average site index values.
	The average growth components and their sample standard errors are 
straight-forward computations using the number data entries and the number 
of zero plots specified, if any. 


LITERATURE CITED

 Daugherty, Peter J., Lee C. Wensel, and Walter J. Meerschaert.  1987.
	YDAVG UserÕs Guide:  The CACTOS Yield File Averager (version 2.0), 
Research Note No. 18, Northern California Forest Yield Cooperative, University 
of California, Berkeley, CA.

Turnblom, Eric C., and Lee C. Wensel. 1992.
	Computing the components of forest growth and other revisions for 
CACTOS version 4.4,  Research Note No. 36, Northern California Forest Yield 
Cooperative, University of California, Berkeley, CA.

Wensel, Lee C., Peter J. Daugherty, and Walter J. Meerschaert.  1986.  
	CACTOS User's Guide: The California Conifer Timber Output Simulator.  
Version 3.3  Bull. 1920. Ag. Exp. Sta., Univ. of Ca. Div. of Ag. and Nat. Res.

		


APPENDIX A.1   Contents of filenames file demo.fn

demo85.sd                      demo90.sd



APPENDIX A.2  Contents of CACTOS batch command file demo.cm

      Batch run demonstration of the "cp" command
cp
   1	one 5-year growth period to reach remeasurement
y	individual tree summaries
0	no individual trees
2	species group option
y	write to report file
ex	exit

APPENDIX A.3  Example of yield comparison file demo85.cp produced by CACTOS 
using data from 1985 and 1990.


COMPARISON SUMMARY
------------------
Cofile version 4.11   10/16/89   Revised mortality equations (Table 1)

init. stand label= OO-0015     07-08-85  in: c:\data\perm\mc\mc85.sdm
final stand label= OO-0015     08-21-90  in: c:\data\perm\mc\mc90s.sdm


                  min. DBH    merch top
        cubic ft.     .0         6
        board ft.    8.0         6

   species     site   init. age
   DouglasFir    60.       0.
   White Fir     73.       0.
   Con. misc     68.       0.

---------------------------------------------------------------------------
            initial          ----- Observed BA diff. -----   Pred. BA diff.
 species      BA       et    surv.   ingr.   mort.     cut   surv.    mort.
---------------------------------------------------------------------------
 Cedar misc    .00    5.00     .00     .80     .00     .00     .00     .00
 DouglasFir  27.41    5.00    9.92     .00     .00     .00    5.48     .29
 White Fir   41.26    5.00    5.71     .00     .00     .00    4.14     .62
 Con. misc     .98    5.00     .51     .00     .00     .00     .59     .09
 Totals      69.65    5.00   16.14     .80     .00     .00   10.21    1.00 B M
---------------------------------------------------------------------------
*

COMPARISON SUMMARY
------------------
Cofile version 4.11   10/16/89   Revised mortality equations (Table 1)

init. stand label= OP-0016     07-08-85  in: c:\data\perm\mc\mc85.sdm
final stand label= OP-0016     08-21-90  in: c:\data\perm\mc\mc90s.sdm


                  min. DBH    merch top
        cubic ft.     .0         6
        board ft.    8.0         6

   species     site   init. age
   Sugar Pine    75.       0.
   Cedar misc    47.       0.
   DouglasFir    62.       0.
   White Fir     62.       0.

---------------------------------------------------------------------------
            initial          ----- Observed BA diff. -----   Pred. BA diff.
 species      BA       et    surv.   ingr.   mort.     cut   surv.    mort.
---------------------------------------------------------------------------
 Sugar Pine  40.52    5.00    5.76     .63    3.67   16.62    3.86     .53
 Cedar misc  75.61    5.00    3.57     .74     .00     .00    3.16     .62
 DouglasFir  21.19    5.00    4.75     .00     .00     .00    4.05     .25
 White Fir  155.80    5.00    4.72     .00   26.60   80.20    5.10    1.58
 Totals     293.12    5.00   18.79    1.37   30.27   96.82   16.16    2.98 B M
---------------------------------------------------------------------------
*
	(continued on next page)	

	Appendix A.3  (continued)

COMPARISON SUMMARY
------------------
Cofile version 4.11   10/16/89   Revised mortality equations (Table 1)

init. stand label= OQ-0017     07-11-85  in: c:\data\perm\mc\mc85.sdm
final stand label= OQ-0017     08-20-90  in: c:\data\perm\mc\mc90s.sdm


                  min. DBH    merch top
        cubic ft.     .0         6
        board ft.    8.0         6

   species     site   init. age
   Pond. Pine    74.       0.
   Cedar misc    70.       0.
   White Fir    110.       0.

---------------------------------------------------------------------------
            initial          ----- Observed BA diff. -----   Pred. BA diff.
 species      BA       et    surv.   ingr.   mort.     cut   surv.    mort.
---------------------------------------------------------------------------
 Pond. Pine  29.52    5.00    5.33     .00     .00     .00    5.99     .61
 Cedar misc  22.34    5.00    3.82     .00     .00     .00    4.28     .42
 White Fir    4.82    5.00     .99     .00     .00     .00    1.69     .11
 Totals      56.68    5.00   10.14     .00     .00     .00   11.97    1.13 B M
---------------------------------------------------------------------------



APPENDIX A.4  Sample run stream for yield comparison.

Pond. Pine*
Sugar Pine*	CPAVG lists the contents of the
Cedar misc*	initialization file, cpavg.ini
DouglasFir*
White Fir  


 CPAVG - The CACTOS/CRYPTOS Yield Compare Averager
 (c) Copyright 1993, The Regents of the University of California
 v 2.0



 Open the input filenames file
 Enter a file name here:  demo.fn
 Open the averaged yield file for output
 Enter a file name here:  demo85.acp
 Enter 5 character prescription code,  for none:  
 Enter the number of non-stocked plots: 0
 Output in spreadsheet format also? (y = yes): y 

 Reading compare file: demo85.cp
    plots: OO-0015     07-08-85 and OO-0015     08-21-90

    plots: OP-0016     07-08-85 and OP-0016     08-21-90

    plots: OQ-0017     07-11-85 and OQ-0017     08-20-90

 Calculating averages and standard deviations.

 Writing formatted summary to output file.

 Writing spreadsheet summary to output file.
Normal stop




APPENDIX A.5  Example of an averaged yield comparison demo85.acp.

    The following   3 stand comparisons were used as input, as well as  
0 empty plots:
     OO-0015     07-08-85    |    OO-0015     08-21-90
     OP-0016     07-08-85    |    OP-0016     08-21-90
     OQ-0017     07-11-85    |    OQ-0017     08-20-90
                   min. DBH    merch top
         cubic ft.     .0         6
         board ft.    8.0         6

    species     avg site / s.e.   avg age / s.e.  n
    Pond. Pine   74.0      .0        .0      .0    1.	site information 
    Sugar Pine   75.0      .0        .0      .0    1.summarized from demo85.cp
    Cedar misc   58.5    11.5        .0      .0    2.
    DouglasFir   61.0     1.0        .0      .0    2.
    White Fir    81.7    14.5        .0      .0    3.
    Con. misc    68.0      .0        .0      .0    1.
    Totals                                         3

 --------------------------------------------------------------------------
             initial  time    ----- Observed BA diff. -----   Pred. BA diff.
  species      BA      (n)    surv.   ingr.   mort.     cut   surv.    mort.
 --------------------------------------------------------------------------
  Pond. Pine  29.52    5.00    5.33     .00     .00     .00    5.99     .61
     s.e.:      .00   (  1)     .00     .00     .00     .00     .00     .00

  Sugar Pine  40.52    5.00    5.76     .63    3.67   16.62    3.86     .53
     s.e.:      .00   (  1)     .00     .00     .00     .00     .00     .00

  Cedar misc  32.65    5.00    2.46     .51     .00     .00    2.48     .35
     s.e.:    22.43   (  3)    1.23     .26     .00     .00     .25     .18

  DouglasFir  24.30    5.00    7.34     .00     .00     .00    4.77     .27
     s.e.:     3.11   (  2)    2.59     .00     .00     .00    1.87     .02

  White Fir   67.29    5.00    3.81     .00    8.87   26.73    3.64     .77
     s.e.:    45.49   (  3)    1.44     .00    8.87   26.73     .71    8.46

  Con. misc     .98    5.00     .51     .00     .00     .00     .59     .09
     s.e.:      .00   (  1)     .00     .00     .00     .00     .00     .00

  Totals     139.82    5.00   15.02     .72   10.09   32.27   12.78    1.70
     s.e.:    76.74   (  3)    2.56     .40   10.09   32.27    2.25    9.45

 --------------------------------------------------------------------------
 (1) s.e. is standard error of obs.-pred. for predicted surv. and mort.
 (2) averages computed using the number of plots in species table

       3      0     3.			(optional spreadsheet version of above table)
    74.0     .0     .0     .0     1.
    75.0     .0     .0     .0     1.
    58.5   11.5     .0     .0     2.
    61.0    1.0     .0     .0     2.	(site index summary)
    81.7   14.5     .0     .0     3.
    68.0     .0     .0     .0     1.
					(elapsed time, average growth components and standard deviations)

    5.00  29.52   5.33    .00    .00    .00   5.99    .61    .00    .00    .00    .00    .00    .00    .00
    5.00  40.52   5.76    .63   3.67  16.62   3.86    .53    .00    .00    .00    .00    .00    .00    .00
    5.00  32.65   2.46    .51    .00    .00   2.48    .35  22.43   1.23    .26    .00    .00    .25    .18
    5.00  24.30   7.34    .00    .00    .00   4.77    .27   3.11   2.59    .00    .00    .00   1.87    .02
    5.00  67.29   3.81    .00   8.87  26.73   3.64    .77  45.49   1.44    .00   8.87  26.73    .71   8.46
    5.00    .98    .51    .00    .00    .00    .59    .09    .00    .00    .00    .00    .00    .00    .00
    5.00 139.82  15.02    .72  10.09  32.27  12.78   1.70  76.74   2.56    .40  10.09  32.27   2.25   9.45




	The first period may be specified to be a fractional period between 5
 and 10 years.

	This feature has since been added to YDAVG with instructions on read 
me files for both YDAVG and CPAVG.

	This description of the specification of species group names applies 
to both CPAVG and YDAVG.

	Specifying ÒyÓ here causes the entire report to be reprinted without 
the labels and with means and standard deviations for each species group on 
the same line.  This option, requested by John LeBlanc and added also to YDAVG, 
facilitates importing the data to a spreadsheet program for plotting or other 
analysis.  An example of the spreadsheet output is given in the file demo.acp 
on the program disk.

This option is only useful when the number of occurances that make up the 
average basal area are the same for all speices, i.e., when site index is 
given for all species on each plot.  Otherwise, the number of empty plots 
should be set to zero.lots and measurements compared

HOME |FEEDBACK