# **********************************************************************************************
# **********************************************************************************************
# **
# **                                       SMART Control Fo;e
# **                                       File -- SMARTCntrl
# **                                Must be located in the SMARTHOME directory,
# **                                the same directory where getBLod.pl and clSmart.pl
# **                                are located.
# ** 
# **********************************************************************************************
# **********************************************************************************************
# ** 
# ** The SMART application is designed to process streamflow records at a station between
# ** site visits.  There are two PERL scripts that drive the process, getBlob.pl and clsmart.pl.
# ** The script getBLob.pl is run every minute using cron.  The clsmart.pl is a command line
# ** script used to process streamflow records.
# **
# ** The script getBlob.pl retrieves looks at the NWIS data base on the minute and retrieves any
# ** original data file used to enter data corrections or discharge measurements into NWIS and 
# ** writes that file t oa subdirectory where the smart script will read that file and process
# ** the record between that site visit and the previous discharge measurement.  The clsmart.pl
# ** uses the command line arguments, station number, beginning date, ending date, apply gage 
# ** height corrections, apply shift corrections, and test mode to process the streamflow recore
# ** at the station between the beginning and ending dates.  If no beginning or ending date are
# ** supplied the period is asumed to end with the most recent discharge measurement and end
# ** with the discharge measurement immediately preceeding the most recent discharge measurement.
# **
# ** Ajusting the following for the location of the SMART code on your server,
# ** Add the following to a crontab file to start the GetBlob script every minute.
# ** on your system and to run cleanLog at 3 AM
# **     
*       *       *       *       *     /users3/project/jkiesler/installSMARTTest/getblob.sh>>/dev/null
0	3	*	*	*     /users3/project/jkiesler/installSMARTTest/cleanLogs.pl>>dev/null
# **
# ** 
# **********************************************************************************************
# **********************************************************************************************

# ** MINBETWEENRUN --- The number of minutes between times the cron job is run.  Default if 1 minute
MINBETWEENRUN: 1

# ** MIN2LOOKBACK -- The number of minutes SMART should look back when retrieving sites visit that
# **                 will be examined to determine if an electronic data file was used to enter the
# **                 site visit information.  Must be greater than MINBETWEENRUN
MIN2LOOKBACK: 20

# DAYLIMIT -- Number of days prior to the current date that SMART will process a discharge measurement.
DAYLIMIT: 120

# NORPTLIMIT -- Number of days pior to the current date that SMART will not only not process the
#               discharge measurement but will also not produce a report.  Used for entering historical
#               data.
NORPTLIMIT: 365

# MAXLOGAGE -- The number of days after which the log file is deleted from the server
MAXLOGAGE: 183

# ** STATUSLINES -- number of messages that are maintained in the SMART status file, smartStatus.txt
STATUSLINES: 10

# ** SMART HOME -- where the Smart directories and code are housed
SMARTHOME: /users3/project/jkiesler/code/SMART/smartdev

# ** SMARTSUB -- location of the subroutines used by SMART
SMARTSUBS: thesubroutines

# ** SMARTLOGS -- location where the log files created by each script are stored
SMARTLOGS: smartLogs

# ** SMARTORIGFILES -- location where getBlobs writes the original data file
SMARTORIGFILES: origFiles

# ** REPORT TEMPLATE -- location of the summary report template
SMARTRPTTEM: smartSumReports

# ** SMARTQUEUES -- location where getBlobs and clsmart write the queues of
# **                stations and site visits to be processed
SMARTQUEUES: smartQueues

# ** EXPECT -- location where smart writes the EXPECT scripts
# **                stations and site visits to be processedused to enter
# **                gage height and shift corrections
EXPECTDIR: expectScripts

# ** SMARTQUARANTINE -- location where logs and queue entires for measurement
# **                    that experience problems that cause the system to crash
# **                    are placed to prevent the scripts from not functioning
# **                    properly
SMARTQUARANTINE: smartQuarantine

# ** SMART support, members identified in the list receive the e-mails 
# ** when smart moves a file to the quarantine direcotry, seperate 
# ** entries by commans
SMARTSUPPORT: GS-W_HELP_SMART@usgs.gov

# ** SITESPECIFIC -- tab delimited file of site specific data.
# ** The columns are Station Number, Data base Number, apply gage height corrections,
# ** apply shift corrections, peak definition, maximum shift, use optimum shift
# ** only, and product summary report only.  IF a column is left bland the
# ** SMART default value is used.
SITESPECIFIC: stationSpecificData

# ** It is recommended that you use only one of the following options,
# INCLUDE FILE or the EXEMPT FILE.  Place a pound sign (#) in front
# of the option you DO NOT want to use.  If the file is empty then 
# no action will be taken.

# ** INCLUDE FILE -- contains a list of staion numbers and agency codes
# ** that SMART should process.  If this file exisits, then only 
# ** sites in this file will be processed.  Tne enteries are in the form of 
# ** staiton number space agency code.  If the agency code is not
# ** entered USGS is assumed.  The include file takes precedence over
# ** the exempt file.
INCLUDE: includeSites

# ** EXEMPTION FILE -- contains a list of staion numbers and agency codes
# ** that SMART should not process.  Tne enteries are in the form of 
# ** staiton number space agency code.  If the agency code is not
# ** entered USGS is assumed.
EXEMPT: exemptSites

# ** Use the loocal go2 filters to people getting e-mails
USEGO2: Y

# ** GO2 directory -- Fully qualiified pathname to the directory containing
# **                  the go2 filters directory.  The filters directory 
# **                  contains file that are list of stations.  The 
# **                  SENDTO.control identifies who gets the information
# **                  in each file.  If there is a value for this variable
# **                  then the go2 filtes will be used to send the 
# **                  summary report.
GO2DIR: /users/datas/scripts/go2

# ** Use the SIMS go2 filters to people getting e-mails
USEGO2SIMS: Y

# ** SIMS web form to use
GO2SIMSURL: http://wwwdkslwr.cr.usgs.gov/~bloving/go2/urls/RMS.txt

# ** NWISWEBSTATUS, tells nwis web the flow condition for DD's
NWISWEBSTATUS: /usr/opt/nwis/data/nwisweb/nwis_host/srv1dinind/local/support/srv1dinind.dd_status.rdb

# ** NWIS WEB File, tells NWIS web which DD's to discplay
NWISWEB: /usr/opt/nwis/data/nwisweb/nwis_host/srv1dinind/local/support/srv1dinind.dd_list.uv.01.rdb

# ** NWISBD -- Name of the NWIS database for this office
NWISDB: srv1dinind::nwisin

# ** DBNUM -- data base number for the primary NWIS database to be used by SMART
DBNUM: 01

# ** PEAKDEF -- Peak definition, the value used to identify when a reversal has occured 
# **           to identify the beginning of a rise.  Can be change on a site by site
# **           basis
PEAKDEF: 0.33

# ** MAXSHIFT -- The maximum shift allowed in feet, can be change on a site by site basis
MAXSHIFT: 2.0

# ** E-mail list, members identified in the list receive the summary report
# ** regardless of the use of GO2.  Seperate internet e-mail names by commas
NOTUSERS: jkiesler

# ** Generate a summary report for all site types
# ** Y -- Yes, produce a summary report for all site types
# ** N -- No, produce a summary report for only stream sites
SUMRPTALLSITETYPES: N

# ** APPLYGHCOR -- apply gage height corrections, yes (y) or no (n), for SMART 
# **               always Y, can be over ridden on site by site bases.
APPLYGHCOR: Y

# ** APPLYSHIFTCOR -- apply shift corrections, yes (y) or no (n), for SMART
# **                  always Y, can be over ridden on a site by site bases.
APPLYSHIFTCOR: Y

# SWRDIR -- Fully qualified pathname to the surface-water review parent directory
SWRDIR: /SWR

# STOREINSWR -- Flag telling SMART to store the report in the surface-water review 
#              directory structure.  The summary reprot directory still must be 
#              identified.  It will be used to maintain temporary files as the
#              report is created.
STOREINSWR: N
