Water Resources Applications Software

Geochemical || Ground Water || Surface Water || Water Quality || General

Summary of CONTOUR

       contour - A contouring program for gridded data

       CONTOUR is designed for use with finite-difference models such as
       MODFLOW.  It works with uniform or variably spaced grids.  Input
       data can be formatted data from most models or unformatted data from

       Data to be contoured are a two-dimensional array of values, which
       are Z values for each node in a grid.  A contour line is formed by
       connecting successive contour points with straight lines.  Branches
       connect adjacent nodes.  Contour points occur only on Branches.  If
       the value being contoured is between the Z values at two adjacent
       nodes, the connecting branch contains a contour point.  Linear
       interpolation is used to find the location of a contour point on a
       branch.  Unlike many contouring packages, CONTOUR does not create a
       fine uniform grid and interpolate values for each point in that
       grid.  CONTOUR also does not smooth the lines.  Thus, if a grid is
       coarse, the contours will be coarse.  Because CONTOUR does not
       generate a new grid or smooth lines, it uses minimal computational

       Version 2.5 96/01/24 - Current release for Data General workstations
          (split routines that produce graphics through call to GKS from
          main code group)

       Version 2.4 95/08/08 - Increased dimension of arrays

       Version 91/11/15 - First release for Data General workstations

       Version 89/xx/xx - Original published version

       The user is prompted interactively 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.

       The output is a contour plot.

       CONTOUR is written in Fortran 77 with the following extensions:  use
       of integer*2 and integer*4 declarations.  Graphics are coded using
       the Graphical Kernel System (GKS) library references.  Generally,
       the program is easily installed on most computer systems that have
       access to a GKS graphics library.  The code has been used on UNIX-
       based computers.

       Harbaugh, A.W., 1990, A simple contouring program for gridded data:
          U.S. Geological Survey Open-File Report 90-144, 37 p.

       Operation and Distribution:
          U.S. Geological Survey
          Hydrologic Analysis Software Support Program
          437 National Center
          Reston, VA 20192

       Official versions of U.S. Geological Survey water-resources analysis
       software are available for electronic retrieval via the World Wide
       Web (WWW) at:


       and via anonymous File Transfer Protocol (FTP) from:

         (path: /pub/software).

       The WWW page and anonymous FTP directory from which the CONTOUR
       software can be retrieved are, respectively:


       modflow(1) - Modular three-dimensional finite-difference
                    ground-water flow model

The URL for this page is:
Send questions or comments to