June 3, 1997 CONTOUR - Version: 2.5 1996/01/24 A contouring program for gridded data For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the file doc/contour.txt for descriptions, references, and additional contacts for this software. Instructions for installation, execution, and testing are provided below. TABLE OF CONTENTS A. FILES B. EXTRACTING FILES C. COMPILING D. INSTALLING E. RUNNING THE SOFTWARE F. TESTING A. FILES The following distribution packages (containing the software, test data sets, and information files) are currently available for UNIX systems: contour2.5.DGUX.tar.gz - Compiled for Data General AViiON under DG/UX 5.4 contour2.5.Solaris.tar.gz - Compiled for Sun UltraSPARC 2 under Solaris 2.5 contour2.5.SGI.tar.gz - Compiled for Silicon Graphics Indigo (32-bit) under Irix Release 6.0.1 contour2.5.source.tar.gz - Source code B. EXTRACTING FILES The compressed tar file, named contour2.5.OS.tar.gz, contains all the files needed to install and test CONTOUR 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 contour2.5.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 contour2.5 is created (or overwritten) when the files are extracted from the tar file. If the contour2.5 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 contour2.5.____.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 contour2.5.____.tar.gz 4. Extract the distribution files from the tar file. For example: tar -xpof contour2.5.___.tar This creates the following directory structure (the contents of each directory are shown to the right): contour2.5 ; copy of this README file `-----bin ; compiled executable `-----doc ; documentation files (manual page, update notes) `-----src ; Makefile and source code `-----test ; scripts to run verification tests `-----data ; standard data sets used in verification tests Notes: a) The bin directory is not included in the contour2.5.source.tar.gz distribution (it is created during compilation). b) Source code is included only with the contour2.5.source.tar.gz distribution. c) It is recommended that no user files be kept in the contour2.5 directory structure. If you do plan to put files in the contour2.5 directory structure, do so only by creating subdirectories of contour2.5. 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. If you have retrieved a pre-compiled distribution of the software, skip to the Installing section below. The source code is provided in the contour2.5.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, GKS graphics software, and a minimal level of knowledge of the compiler, GKS, 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. To generate a new executable, do the following: 1. Change directory to the source directory: cd contour2.5/src 2. Modify the beginning of the file named Makefile to correctly specify system-dependent variables: GraphLib GKS libraries pathname LIBTYP GKS library name 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] See the Installing instructions below for an explanation of BINDIR. The make will: a. create the directories contour2.5/bin and BINDIR if they do not already exist, b. compile the source code, c. place the executable (contour) in contour2.5/bin, and d. place a link to the executable in BINDIR if specified. D. INSTALLING To make the executable (contour) 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 contour2.5/src) contains instructions to optionally place a link in a specified directory to the executable contained in contour2.5/bin. Use the following two commands to do this: cd contour2.5/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 CONTOUR executable file, the installer must have sufficient rights in the directory that BINDIR is set to. E. RUNNING THE SOFTWARE After CONTOUR is properly installed in a directory that is included in your PATH, it can be executed with the command "contour". The program prompts for all required information. The user is prompted for grid spacing, data to be contoured, and contour values. There are also prompts to control options such as scaling, the display of the grid, and plotting of values at each grid point. To produce an X-Window plot, specify device type 1100. To produce a PostScript plot, specify device 102; in this case a file named GKS.PLOT will be created, which can be spooled to a printer. Note, these device types are for use of CONTOUR when linked to Prior GKS, for use with XGKS, specify device 4 for an X-Window plot and 2 for a CGM output file. 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 A test data set is provided to verify that the program is correctly installed and running on the system. The test may also be looked at as an example of how to use the program. The directory contour2.5/test contains the scripts to run the test. The directory contour2.5/data contains the input data and expected results for the test. The test must be run in the directory contour2.5/test. Note, the file test.sh must be modified if a GKS other than Prior GKS is used. Modify the variable WSTYPE near the top of test.sh so that it equals the correct workstation device type for the GKS version. To test the installation, change to the contour2.5/test directory and type the command: ./test.sh After the test is completed, the results are compared to the expected results. If all goes well, the only differences will be due to different GKS software. The expected results were generated using Prior GKS. 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 test is 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 contour This test produces the plot found in the User's Guide Delta-x values delx.dat i Delta-y values dely.dat i 2-D z values z.dat i screen messages from program contour1.log o PostScript plot (from Prior GKS) GKS.PLOT o GKS error file GKS.ERR o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *