Subject: Root Disease Model and FVS Stop/Restart
Name: Lance R. David
Date: 08/24/2015
Variants affected: All variants

Description: Western Root Disease model modified to function with FVS 
             FVS stop/restart capabilities. During this process a few errors
             and oversites in the base system were addressed as well. Those
             modifications involved activities, reports and database output
             that did not continue upon restart of a FVS run. One new file
             associated with the stop/restart that a user will notice in the
             working directory at a FVS stop point will include _RegenRpt.txt
             in the name. This is a temporary file for the Establishment Model
             reports and will be deleted upon successful execution of a
             restart.
             Updated the Western Root Disease model to use the General Report
             Writer facility and to send output disease summary and reports
             (summary, detailed, and bark beetle mortality) to a output
             database. A correction was made to the bark beetle mortality
             report where stand level TPA mortality was not properly weighted
             to represent diseased stand area and uninfected stand area as a
             total stand area mortality TPA value.
             
             This update includes the addition of three new Database Extension
             keywords: RDSum, RDBBMort, RDDetail.

             Root disease summary and bark beetle mortality reports used to
             have options to generate seperate external text files. The option
             to send these reports directly to the output database has replaced
             capability.

Impact on users: Users may notice that the oder of some reports in the main
                 output file has changed. This is due to the implementation of
                 the General Report Writer facility assigning a sequence ID to
                 reports based on the point in time that the first record is 
                 written to individual reports.

Files:

base/src/fvs.f - Added call to DBCHK for debug.
base/src/exmist.f - Added stub entries for mschget and mschput.
pg/src/putstd.f - Added logical variables LWRD and LZ for Root Disease model variables storage control.
                  LZ used only to satisfy parameter needs on call.
                - Added common SCREEN.F77 and logical variable LSCRN for screen summary display control,
                  which enables summary to continue on restart.
pg/src/getstd.f - Added logical variables LWRD and LZ for Root Disease model variables retrieval control.
                  LZ used only to satisfy parameter needs on call.
                - Added code to re-open establishment model reporting temp file
                 (filename ..._RegenRpt.txt, unit JOREGT) and defined local variables
                 CNAME and KODE for this.
                - Added common SCREEN.F77 and logical variable LSCRN for screen summary display control,
                  which enables summary to continue on restart.
dbs/src/dbsppget.f - in subroutine DBSCHGET:
                     . corrected index on condition variable LENSTRINGS 2 AND 3
                     . Added retrieval of CASEID
dbs/src/dbsppput.f - in subroutine DBSCHPUT:
                     . Added storage of CASEID
dbs/src/chput      - Added storage of characte variable ALLSUB for continuation of debuging after restart.
                   - Corrected index range of NAMGRP from 10 to 30.
                   - Added storage of character variable ITITLE, used in report headings.
                   - Added storage of array PTGNAME, point group names.
                   - Added call to MSCHPUT, DM model character storage.
                   - Added dummy character as last stored character for finalize process.
dbs/src/chget      - Added retrieval of characte variable ALLSUB for continuation of debuging after restart.
                   - Corrected index range of NAMGRP from 10 to 30.
                   - Added retrieval of character variable ITITLE, used in report headings.
                   - Added retrieval of array PTGNAME, point group names.
                   - Added call to MSCHGET, DM model character retrieval.
                   - Added dummy character as last read of stored characters.
dbs/src/dbscase.f  - Added code to strip extension, if present, from the keyword filename (KEYFNAME variable)
                   - Added OUTCOM.F77 common block.
dbs/src/dbsmis.f  - Corrected insert SQL for Dwarf Mistletoe Species Summary Table.
estb/src/esinit.f  - Changed reporting temp file (JOREGT) status from scratch to unknown.
                     Named file is keyword file name with _RegenRpt.txt appended.
                   - Added common CONTRL.F77 for access to keyword filename (KWDFIL).
                   - Renamed locally defined varaible in conflict with CONTRL.F77, JOSTND to JSTND.
estb/src/esout.f  - Changed rewind of file JOREGT to close with STATUS=DELETE.
strp/src/esinit.f  - Changed reporting temp file (JOREGT) status from scratch to unknown.
                     Named file is keyword file name with _RegenRpt.txt appended.
                   - Added common CONTRL.F77 for access to keyword filename (KWDFIL).
                   - Renamed locally defined varaible in conflict with CONTRL.F77, JOSTND to JSTND.
strp/src/esout.f  - Changed rewind of file JOREGT to close with STATUS=DELETE.
ci/src/esinit.f    - Changed reporting temp file (JOREGT) status from scratch to unknown.
                     Named file is keyword file name with _RegenRpt.txt appended.
                   - Added common CONTRL.F77 for access to keyword filename (KWDFIL).
                   - Renamed locally defined varaible in conflict with CONTRL.F77, JOSTND to JSTND.
mistoe/src/misprt.f - Removed condition so that species character lables are reloaded each entry.
mistoe/src/msppgt.f - Corrected storage of arrays MISCYC and MAXCYC
                    - Added subroutine MSCHGET for storage of DM model character variables.
mistoe/src/mspppt.f - Corrected storage of arrays MISCYC and MAXCYC
                    - Added subroutine MSCHPUT for storage of DM model character variables.
fire/base/src/fmssum.f - Added first header line '******  FIRE MODEL VERSION 1.0 ******' to Snag Summary.