Subject: Miscellaneous changes in the FVS-ORGANON variants
Name: Gary Dixon
Date: 08/03/2017
Variants affected: OC and OP

Description: The OC variant should produce answers as close to the ORGANON-SWO version as possible, given the same
input data. Likewise, the OP variant should produce answers as close to the ORGANON-NWO and ORGANON-SMC versions when 
given the same input data.The following changes address these goals:

1) Crown ratios less than 10% were being reset in FVS, but not in ORGANON. Code was added to FVS (subroutine CROWN) to skip 
   the reset of crown ratios less than 10% for valid ORGANON trees.

2) FVS can be run using the ORGANON ".inp" files as input along with an appropriate keyword file. FIA tree species codes
   less than 100 in the .inp files do not have a leading zero and are not recognized by FVS. Code was added to FVS
   (subroutine ORG_INTREE) to zero-fill the first character in the incoming FIA code when the code is less than 100.

3) When starting from a ".inp" file, with no missing data, starting volumes were not the same in ORGANON and FVS-ORGANON.
   Code changes were made to correct these problems.

4) Two new keywords, OSUVOL and BLMVOL were created to allow users to enter ORGANON volume control parameters. Also,
   the ORGVOLS keyword was restructured to allow selection of either OSU or BLM volume equations, when getting ORGANON
   volume estimates. Also, the ORGVOLS keyword now gives users the ability to get FVS volume estimates rather than
   ORGANON volume estimates. Previous volume control parameters on the ORGVOLS keyword were moved to the OSUVOL and 
   BLMVOL keywords.

5) The ORGOFF keyword was created to allow users to turn off the ORGANON growth and mortality estimates, and get FVS
   estimates instead. Turning off the ORGANON growth and mortality estimates is independent of turning off the
   ORGANON volume estimates.

Impact on users: Projections will be different. Users of these two variants should obtain a new executable. 

Files:
/common/ORGANON.F77        Changed the date of revision line to the C COMMON $Id: format. Added ORGANON-related volume control
                           variables CFTD, CFTDHW, CFSH, LOGTD, LOGSH, BLMMIND, BLMRA, and ORGVEQ.

/bin/FVSoc_sourceList.txt  Changed subroutine vols.f to come from the /organon/src subdirectory instead of the /oc/src subdirectory.

/bin/FVSop_sourceList.txt  Changed subroutine vols.f to come from the /organon/src subdirectory instead of the /op/src subdirectory.

/oc/src/cratet.f           Changed the date of revision line to the C OC $Id: format. Added code to skip the ORGANON section is
                           ORGANON growth and mortality equations have been turned off. Moved the initialization of variables NVALID
                           and NBIG6.

/oc/src/crown.f            Changed the date of revision line to the C OC $Id: format. Added code in 2 places to skip the reset of  
                           crown ratios less than 10 percent for valid ORGANON trees. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/oc/src/dgdriv.f           Added code to skip ORGANON sections if ORGANON growth and mortality equations have been turned off.

/oc/src/grinit.f           Corrected some comment statements. Corrected the initialization of variables related to ORGANON 
                           OSU volume equation default values.Added initialization of variable CFTDHW to 0.0, BLMMIND TO 6.0,
                           BLMRA to 511, and ORGVEQ to 0. Changed the default for variable LORGVOLS from FALSE to TRUE. Added the
                           initialization of array IORG to zero.

/oc/src/htgf.f             Changed the date of revision line to the C OC $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/oc/src/morts.f            Changed the date of revision line to the C OC $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/oc/src/regent.f           Changed the date of revision line to the C OC $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/oc/src/sitset.f           Changed the date of revision line to the C OC $Id: format. Changed the loading of default FVS volume
                           equation merchantability specifications to apply to forest codes 6-10 instead of 6 and 10, to match
                           specifications for the CA variant.

/oc/src/vols.f             Deleted and removed from version control.

/op/src/cratet.f           Changed the date of revision line to the C OP $Id: format. Added code to skip the ORGANON section is
                           ORGANON growth and mortality equations have been turned off. Moved the initialization of variables NVALID
                           and NBIG6.

/op/src/crown.f            Changed the date of revision line to the C OP $Id: format. Added code in 2 places to skip the reset of  
                           crown ratios less than 10 percent for valid ORGANON trees. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/op/src/dgdriv.f           Added code to skip ORGANON sections if ORGANON growth and mortality equations have been turned off.

/op/src/grinit.f           Changed the C Op $Id: line. Corrected some comment statements. Corrected the initialization of variables 
                           related to ORGANON OSU volume equation default values. Added initialization of variable CFTDHW to 0.0,
                           BLMMIND to 6.0, BLMRA to 172, and ORGVEQ to 0. Changed the default for variable LORGVOLS from FALSE to TRUE.
                           Added initialization of array IORG to zero.

/op/src/htgf.f             Changed the date of revision line to the C OP $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/op/src/morts.f            Changed the date of revision line to the C OP $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/op/src/regent.f           Changed the date of revision line to the C OP $Id: format. Added code to skip ORGANON sections if ORGANON
                           growth and mortality equations have been turned off.

/op/src/vols.f             Deleted and removed from version control.

/organon/src/org_intree.f  Took the variable NTREES out of the argument list.Changed variable CSPI from a CHARACTER*8 to a 
                           CHARACTER*3. Added code to zero fill the first position in variable CSPI for incoming FIA species codes
                           less than 100 so they will translate to FVS species correctly. 

/organon/src/orin.f        Changed the date of revision line to the C ORGANON $Id: format. Removed fields 3 through 7 from the 
                           ORGVOLS keyword. Redefined field 1 to be the OSU or BLM equation switch when computing ORGANON volumes,
                           and field 2 to be the ORGANON or FVS volume method switch. Created 3 new keywords. 
                           OSUCFVOL has 3 fields: f1 = softwoods cubic foot DIB, f2 = softwoods cubic foot stump height, 
                           f3 = hardwoods cubic foot DIB.
                           OSUBFVOL has five fields: f1 = board foot top diameter, f2 = trim allowance, f3 = board foot stump ht,
                           f4 = target log length, f5 = minimum log length. 
                           BLMVOL has two fields: f1 = minimum tree diameter for which BLM volumes will be calculated, 
                           f2 = BLM Resource Area.
                           Removed all coding related to the FVS volume control variables BFSTMP, BFTOPD, STMP, and TOPD.
                           Added variable LKECHO to the subroutine call list.
                           created keyword ORGOFF to turn off the ORGANON growth and mortality equations.

/organon/src/varget.f      Added integer variables BLMRA and ORGVEQ. Added real variables CFTD, CFDHW, CFSH, LOGTD, LOGSH, and BLMMIND.

/organon/src/varput.f      Added integer variables BLMRA and ORGVEQ. Added real variables CFTD, CFDHW, CFSH, LOGTD, LOGSH, and BLMMIND.

/organon/src/vols.f        Created starting with /oc/src/vols.f and added to version control. Changed the date of revision line to 
                           the C ORGANON $Id: format. Removed the local declaration of variables CFTD, CFSH, LOGTD, and LOGSH.
                           Removed the assignment of FVS volume control variables to ORGANON volume control variables. Inserted
                           some debug write statements. Moved the ORGANON volume computation section to before the FVS cubic 
                           volume section and removed it from the FVS cubic and board volume sections. Added the economics extension
                           subroutine calls to the ORGANON section. Added a call to subroutine ORGSPC to return a valid ORGANON
                           FIA species code for the call to subroutine VOLCAL. Changed diameter argument in the call to subroutine
                           VOLCAL from beginning-of-cycle DBH to end-of-cycle. Changed height argument in the call to subroutine
                           VOLCAL from HT to H, where H is either HT or NORMHT depending on whether the tree is top-killed or not.

