March 6, 1997 TDDS Time-Dependent Data System TDDS - Version: 6.0 1997/03/06 DAPLOT - Version 6.1 1997/03/06 XYPLOT - Version 1.2 1997/03/06 DAFILE - Version 6.0 1997/02/06 BACKUP - Version 5.1 1996/04/29 DAFIX - Version 5.5 1996/06/26 DAGET - Version 5.1 1996/04/22 SUMMARY - Version 5.0 1996/02/15 For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the file doc/tdds.txt for descriptions, references, and additional contacts for this software. Instructions for installation, execution, and testing are provided below. TABLE OF CONTENTS A. DISTRIBUTION FILES B. EXTRACTING FILES C. COMPILING D. INSTALLING E. RUNNING THE SOFTWARE F. TESTING A. DISTRIBUTION FILES The following distribution packages (containing the software, test data sets, and information files) are currently available for UNIX systems: tdds6.0.DGUX.tar.gz - Compiled for Data General AViiON under DG/UX 5.4 tdds6.0.Solaris.tar.gz - Compiled for Sun UltraSPARC 2 under Solaris 2.5 tdds6.0.source.tar.gz - Source code Included in directory tdds6.0/doc is a Portable Document Format (PDF) version of the TDDS documentation (tdds.pdf). A PostScript version of this report is available from: http://water.usgs.gov/software/tdds.html The PDF file is readable and printable on various computer platforms using Acrobat Reader from Adobe. The Acrobat Reader is freely available from the following World Wide Web sites: http://www.adobe.com/ http://www.shareware.com/ and by File Transfer Protocol (FTP) from the following site: ftp.adobe.com (path: /pub/adobe/acrobat) B. EXTRACTING FILES The compressed tar file, named tdds6.0.OS.tar.gz, contains all the files needed to install and test TDDS on a computer with a particular operating system, where OS is a string indicating the operating system the distribution is intended for. If a version is not available for your operating system, the file tdds6.0.source.tar.gz contains the source code and all other files needed to compile, install, and test the software on a UNIX-based computer. For either type of distribution, the directory tdds6.0 is created (or overwritten) when the files are extracted from the tar file. If the tdds6.0 directory already exists, you may want to delete or rename it before extracting the files. The following are the steps to extract the files from a distribution tar file. 1. If the tar file is not already in the directory under which you want the distribution installed, move it there. For example: mv tdds6.0.____.tar.gz /usr/opt/wrdapp 2. If you are not in the directory where the tar file is located, go there. For example: cd /usr/opt/wrdapp 3. Uncompress the distribution file. For example: gunzip tdds6.0.____.tar.gz 4. Extract the distribution files from the tar file. For example: tar -xpof tdds6.0.___.tar This creates the following directory structure (the contents of each directory are shown to the right): tdds6.0 ; copy of this README file `-----bin ; compiled executable `-----doc ; documentation files `-----src ; Makefile and source code `-----test ; scripts to run verification tests `-----data ; standard data sets used in verification tests `-----examples ; data sets used in the TDDS documentation Notes: a) The bin directory is not included in the tdds6.0.source.tar.gz distribution (it is created during compilation). b) Source code is included only with the tdds6.0.source.tar.gz distribution. c) It is recommended that no user files are kept in the tdds6.0 directory structure. If you do plan to put files in the tdds6.0 directory structure, do so only by creating subdirectories of tdds6.0. C. COMPILING If a compiled version of the software is not available for your computer, or if you want to build the executable yourself, follow the instructions in this section. The source code is provided in the tdds6.0.source.tar.gz distribution so that users can generate the executable themselves. No support can be provided for users generating their own versions of the software. In general, the requirements are a Fortran compiler, utility library libutl6.0 (which includes screen prompting, device independent graphics, and Time-Dependent Data Base access routines), GKS or CalComp graphics software, and a minimal level of knowledge of the compiler and the UNIX operating system. As provided, the Makefile and source code are set up for use on Data General AViiON workstations running the DG/UX operating system. The TDDS program graphics are written using CalComp calls; the LIBUTL library includes routines that translate CalComp calls to GKS calls. If a CalComp library is available, TDDS could easily be modified to use it, rather than the GKS library. To generate a new executable, do the following: 1. Change directory to the source directory: cd tdds6.0/src 2. Modify the beginning of the file named Makefile to correctly specify system-dependent variables: LibDir Top-level directory for LIBUTL software GraphLib Graphics libraries F77 Fortran compiler name FFLAGS Fortran compiler flags 3. Use the make program to initiate compilation of the source code and installation of the software: make [BINDIR=directory_for_links] NOTE: the Installing instructions below explain the use of BINDIR. The make will: a. create the directories tdds6.0/bin and BINDIR if they do not already exist, b. compile the source code, c. place the executable (tdds) in tdds6.0/bin, and d. place a link to the executable in BINDIR if specified. D. INSTALLING To make the executable (tdds) easy to use, it should be installed in a directory included in the user's search path. The Makefile (input instructions to the UNIX make program--located in tdds6.0/src) contains instructions to optionally place a link in a specified directory to the executable contained in tdds6.0/bin. Use the following two commands to do this assuming you have the pre-compiled code or have compiled the code yourself): cd tdds6.0/src make install [BINDIR=directory_for_links] If BINDIR is specified, a link to the executable is placed in the specified directory. For example, if your search path consists of: /usr/bin:/usr/opt/bin:/usr/local/bin use the command: make install BINDIR=/usr/local/bin to make the executable accessible from any directory without requiring the full pathname of the software's location. Notes: a) Brackets "[xxx]" are used to indicate optional arguments to commands. b) To create and delete a link to the TDDS executable file, the installer must have sufficient rights in the directory that BINDIR is set to. E. RUNNING THE SOFTWARE After TDDS is properly installed in a directory that is included in your PATH, the program is initiated using the command: tdds. TDDS is an interactive prompting program. The data base and data station reference files that were last used with TDDS in the current directory are retained in a "master" file for subsequent use. Input files may be pre-coded or created interactively during a TDDS session. NOTE: versions of the software other than Data General have been linked to XGKS (a public domain Graphical Kernel System (GKS) software library--XGKS (C) Copyright 1993 UCAR/Unidata) to resolve graphics calls. XGKS is maintained at unidata.ucar.edu. Fonts used by XGKS are dynamically loaded when first referenced. Thus, the fonts must be installed on the machine where the XGKS application executes. The font path is compiled into the XGKS library and is set to /usr/local/unidata/lib/xgksfonts. However, it is possible to have XGKS fonts installed in a different location and still execute the software without having to recompile. To do this, set the environment variable "XGKSFontDir" to the new path before executing this application. This variable setting will tell XGKS at runtime where to find its fonts. For example (using C shell syntax): setenv XGKSFontDir /usr/xgks-2.5.5/lib/xgksfonts F. TESTING Test data sets are provided to verify that the program is correctly installed and running on the system. The tests may also be looked at as examples of how to use the program. The directory tdds6.0/test contains the scripts to run the tests. The directory tdds6.0/data contains the input data and expected results for each test. Tests must be run in the directory tdds6.0/test. Run the tests using any of the commands in the table below. To test the installation, change to the tdds6.0/test directory and type the command: ./test.sh [m [n]] where: m = the number of the first test to perform, default=1 n = the number of the last test to perform, default=2 For Example: command what happens ------------------ ------------------------------------ ./test.sh runs all of the tests ./test.sh n runs test 'n' through the last test ./test.sh n m runs test 'n' through 'm' After the tests are completed, the results are compared to the expected results. If all goes well, the only differences will be due to different processing times or pathnames. To clean up after the tests, type the command: ./clean.sh NOTE: the standard data sets were created on a Data General AViiON workstation. You may notice slight numeric differences in the results on other computers. These are generally due to different round-off algorithms and the different architecture of the central processing unit chip. The tests are described in the table below. Test is the test number, program is the program used to run the test, and the usage column indicates how a file is used, with i for input, o for output, and i/o for both input and output. test program description of test and files file name & usage ---- ------- --------------------------------- ----------------- 1 tdds This test initiates a TDDB (tdds1.tdd), builds a DSR file (tdds1.dsr), loads two data sets, produces a directory, summary listing, creates a backup of an existing TDDB, adds some stations to an existing DSR file, restores a backed up TDDB, corrects a data value, retrieves data and formats it in four different output formats, and produces plots of two data sets. program-control file allocate1.rdr i allocate output file allocate1.prt o program-control file summary1.rdr i summary output file summary1.prt o program-control file summary2.rdr i summary output file summary2.prt o program-control file backup1.rdr i backup output file backup1.prt o program-control file backup2.rdr i backup output file backup2.prt o program-control file backup3.rdr i backup output file backup3.prt o program-control file dafix1.rdr i dafix output file dafix1.prt o program-control file daget1.rdr i daget output file daget1.prt o program-control file daget2.rdr i daget output file daget2.prt o program-control file daget3.rdr i daget output file daget3.prt o program-control file daget4.rdr i daget output file daget4.prt o program-control file daplot1.rdr i daplot output file daplot1.prt o program-control file daplot2.rdr i daplot output file daplot2.prt o data set to store in TDDB dataset.1 i data set to store in TDDB dataset.2 i Binary backup copy of TDDB BACKUP.TDD i/o DSR file for Potomac River data potomac.dsr i TDDB for Potomac River data potomac.tdd i DIGS plot configuration file tdds1.cfg i TDDS response file to run tests tdds1.dat i TDDS log of TDDS messages of test tdds1.log o Graphical output of test tdds1.plt o GKS error file GKS.errors o Master file of TDDB and DSR names TDDB_DSR.MTR i/o TDDS log of responses during test TDDSLOG.DAT o TDDB created during tests tdds1.tdd i/o DSR file created during tests tdds1.dsr i/o DIGS plot configuration file DIGSPLT1.CFG o 2 tdds This test initiates a TDDB (example.tdd), builds a DSR file (example.dsr), loads two data sets, and produces a directory, summary listing. program-control file dafile2.rdr i dafile output print file dafile2.prt o program-control file xyplot1.rdr i dafile output print file xyplot1.prt o DSR file for test example.dsr i/o TDDB for test example.tdd o TDDS response file to run tests tdds2.dat i TDDS log of TDDS messages of test tdds2.log o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *