****************************************************************************
*
*  IHABBS linux installation for version 3.12+
*
*  History:
*  Anders Nilsson, VV,  06/18/04, Created
*
****************************************************************************


1) Get the following and put them into the same directory:

   Download tarred nohrsc_docs.tar.gz
   Download tarred nohrsc_executables.tar.gz
   Download tarred nohrsc_static_layers.tar.gz
   Download tarred XXrfc/XXrfc_layers.tar.gz

2) Uncompress the files by using the following:

   tar xvzf nohrsc_docs.tar.gz
   tar xvzf nohrsc_executables.tar.gz
   tar xvzf nohrsc_static_layers.tar.gz
   tar xvzf XXrfc_layers.tar.gz

These will create an "install" directory, and fill it with files.


3) Next, some environment variables have to be set for the rest of the
   installation process. These variables will also need to be set in the shell
   before a NOHRSC application can be run. Some RFCs define these variables in
   the user's profiles (files such as .profile, .appsdefaults, or .bashrc),
   while others place these in a script which then calls the nohrsc launcher.
   The general PATH environment variable will also need to have the directory
   containing the executables in it (described below).

"export" the following variables:

File path info:

   GISRS_HOME=a parent master directory into which IHABBS-related
              subdirectories will be placed.
   GISRS_COMMON_DATA=parent directory into which static "common" data will be
                     placed. (State outlines, county boundaries, etc...)
                     (This is often the same as $GISRS_HOME)
   GISRS_BASIN_DATA=parent directory into which IHABBS static data (flow
                    accumulation grids) and more dynamic data (basin vectors)
                    will be placed.
                    (This is often the same as $GISRS_COMMON_DATA)
   GISRS_ARCHIVE=a directory to contain archived and shared layers (and often
                 installation packages)
                 (This is often $GISRS_HOME/archive)
   GISRS_SCRATCH_PATH=a directory to contain scratch files. Preferably located
                      on a local disk.
   IHABBS=a directory to contain all the binary executables
          (This is often $GISRS_HOME/bin)
   PATH=$PATH:$IHABBS


Database info:

   INFORMIXDIR=/opt/informix
   INFORMIXSERVER=<SERVER> (i.e. the name of the database server as listed
                  in /opt/informix/etc/sqlhosts)
   GISRS_DATABASE=<the name of the database that you wish to use>
                  (This is often gisrs)

Misc. Preferences:

   GISRS_DATABASE_WAIT_SECONDS=60 (duration in seconds for an overly long
                               database transaction)
   GISRS_FILE_SIZE_PAUSE_SECONDS=1 (duration after which, if a file size has
                                 not changed, it is assumedly finished copying)
   GISRS_MINIMUM_RASTER_COMPRESSION_LEVEL=100 (Maximum percentage size of a
                                          compressed raster. A value of 100
                                          means that the programs will compress
                                          a raster file if the compressed file
                                          is smaller than the original file)
   GISRS_USER=`whoami`
   GISRS_MAIL=`whoami`

4) Once these are set, the database needs to be created on the database server.
   The Informix administrator can create the Informix database used by NOHRSC
   applications.

   [type the following on the database server]

   dbaccess [enter]
   Database -> Create -> [name of database specified in $GISRS_DATABASE]
      (This is often "gisrs".)
   Dbspace -> [select dbspace]
   Log -> Buffered_log
   Exit -> Create-new-database
   Exit
   Query-language -> New

      grant connect to public;
      grant resource to public;
   [Escape]
   Run
   Exit
   Exit



5) Once the database has been created, run the following three scripts:

   ./make_directories.sh

   (This will create the directories specified by the environment variables.)

   ./copy_files.sh

   (This will move the executables and the documentation to their places. This
   will also update the nohrsc.cfg configuration file with the values
   specified in the environment variables.)

   ./install_script.sh

   (This will create tables within the newly created database, and then
    populate it with restored layers.)



