U.S. DEPARTMENT OF THE INTERIOR

U.S. GEOLOGICAL SURVEY



Potential-Field Geophysical Software for the PC, version 2.2



by



Jeffrey D. Phillips*



1997





Open-File Report 97-725





This report is preliminary and has not been reviewed for conformity with U.S. Geological Survey standards or stratigraphic nomenclature. Any use of trade names is for descriptive purposes only and does not imply endorsement by the U.S. Geological Survey.

Although these programs and data have been used by the U.S. Geological Survey, no warranty, expressed or implied, is made by the USGS as to the accuracy and completeness of the data nor the accuracy and functioning of the programs and related program material, nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.



* U.S. Geological Survey, Box 25046, MS 964, Federal Center, Denver, CO 80225



CONTENTS

Section
  1. OVERVIEW AND INSTALLATION
  2. DISCLAIMER
  3. BACKGROUND
  4. DATA FORMATS
  5. PROGRAM EXECUTION
  6. ONLINE HELP AND TEST DATA
  7. COMPILATION
  8. ACKNOWLEDGMENTS
  9. TOPICAL PROGRAM LIST
  10. REFERENCES

Section 1. OVERVIEW AND INSTALLATION

The software described in this report is designed for processing of potential-field (gravity and magnetic) data on an IBM-compatible personal computer running the DOS operating system. The software requires that the computer have a full 640 kbytes of memory and a math coprocessor. A 386, 486, or Pentium processor; an SVGA graphics adaptor, and a large hard disk are recommended. The software is essentially that published as version 2.0 (Cordell and others, 1992), as upgraded to versions 2.1 (Phillips and others, 1993) and 2.11 (Grauch and others, 1993), with several additions and improvements. The text of Cordell and others (1992) is included both as plain text (\PF\HELP\DOCUMENT.TXT) and as a WordPerfect 5.1 document file (\PF\HELP\DOCUMENT.WPS). We are designating the current software as version 2.2.

The software is currently available only as downloadable files from a USGS FTP site. We hope to release the software on a DDS-series CD-ROM in the near future. To download the software, you must either login to our anonymous ftp server over the Internet, or use a web browser. The address of the ftp server is ftpext.usgs.gov/pub/cr/co/denver/musette [136.177.80.14]. Login as "anonymous" using any password, then go to the pub/pf directory using the "cd" command. Alternatively use a web browser to go to ftp://ftpext.usgs.gov/pub/cr/co/denver/musette/pub/pf. The software is contained in three self-extracting archive files. Pf22bin.exe is a 10-megabyte DOS-executable file containing the basic software package in the form of binary executables, ASCII documentation files, and test data files. Pf22src.exe is a 4-megabyte file containing the optional source code files. Pf22bndy.exe is a 2-megabyte file containing the optional state boundary files used by program CONTOUR. Download the files you want to the top (\) directory of the local hard disk drive (drive C:) on your PC. Delete or rename any existing \PF directory structure on the hard drive then execute the files to create the new \PF directory and its subdirectories.

A complete installation will create the following primary subdirectories on your hard disk:

The \PF\SOURCE and \PF\NEWSRC directories and their subdirectories are optional. The \PF\WDB2 directory is optional if the state boundary file is not needed by CONTOUR. The \PF\BIN directory must be added to the user's search path in the AUTOEXEC.BAT file, and the computer rebooted. Once this is done, online help for the programs will become available by typing PFHELP, and a menu-driven interface to the programs will become available by typing PFMENU.

Some of the batch file programs assume that the \pf\bin and \pf\help directories are installed on the C drive. If they are installed on a drive other than C, you will need to edit the following files in \PF\BIN:

The speed of some of the larger and slower programs (FFTFIL, ESMAG, MFINIT, MFFILTER, PMAG3D, XIAG, XIAG_FWD, XIAM, XIAM_FWD, and XIA_SAV) can be increased considerably by writing temporary files to a RAM disk. To set up a RAM disk drive on power-up or on rebooting, include a line such as the following in your CONFIG.SYS file (see the DOS help file for RAMDRIVE.SYS):

The following namelist files in \PF\BIN should be edited to reflect the drive letter of the RAM disk: FFTFWD.PRM, FFTINV.PRM, 1STVER.PRM.

Programs PFMENU and REMENU use environment variables. If these programs fail, you may need to expand your environment space. This can be done under DOS or Windows 3.1 by adding a line like the following to the CONFIG.SYS file:

Under Windows95, it is also possible to change the initial size of the environment space from within the Properties menu of the MS-DOS window or icon.

Section 2. DISCLAIMER

Although the potential-field programs in this package have been used by the U.S. Geological Survey, no warranty, expressed or implied, is made by the USGS as to the accuracy and functioning of the programs and related program material, nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.

Registered trade names such as Microsoft, MS-DOS, MS-Fortran, WordPerfect, etc., are used for reference in context and do not necessarily imply endorsement by the U.S. Geological Survey.

Section 3. BACKGROUND

The U.S. Geological Survey (USGS) began developing software for reduction and interpretation of potential-field geophysical data shortly after we pioneered the airborne magnetometer in the late l940's. Originally, each scientist wrote his or her own software, following his or her own unique format. In 1971 we established a standardized binary format for grid, line, and point data, thereafter allowing programs developed by many scientists to be shared. The result was a pool of constantly evolving software representing, over time, a combined effort which could not be duplicated without substantial cost in research, development, and mistakes.

Recognizing this software system to be a potentially valuable resource, we provide the system for implementation on personal computers. Personal computers are widely available worldwide and provide a good medium for training and technology transfer, even if the software will eventually be installed on a larger computer or modified. Although many of these programs have been in use for some time on various types of computers, some are new and have not been completely exercised and tested.

Many of the programs have been released in earlier versions of the package (Godson and Mall, 1989; Cordell and others, 1992; Phillips and others, 1993; Grauch and others, 1993). Version 2.0 of the system (Cordell and others, 1992) represented a major consolidation and upgrade. This version (2.2) comprises version 2.0 with updates and additional programs. Some program bugs have been repaired, but others no doubt remain, and new programs are continually being developed. We plan to release upgrades 2.3, 2.4... in due course. In this spirit, we ask that users please report errors and malfunctions to the author. The address is:

The programs on this CD-ROM are not subject to copyright and can therefore be freely copied, distributed, and modified, although the official version can only be obtained through USGS Information Services. Authorship of the larger programs is indicated in the help files and source code. However, many programs have been subsequently modified by others. Names of authors of well-known algorithms and full citations are included in the help files for identification of the algorithms.

Section 4. DATA FORMATS

Three data types are recognized: grid, line, and point. In addition, two image formats are used. Normally data are kept in binary format. Programs are included to translate from binary to ASCII and vice versa.

GRID DATA: (Referred to as "standard file" in some of the programs.)

LINE AND POINT DATA: In some programs (WERNER, PROFGRD, for example) equi-spaced profile data are treated as a one-row grid. In general, however, both line (such as flight-line) and scattered-point data (such as gravity stations) are handled by the same binary file, referred to in the programs as a post file, often with file-name suffix ".pos" or ".pst". Some inconsistency exists internally among individual programs regarding record-item nomenclature. Here, and as described in the help files, consider the post file to be a binary file containing, for each data point, an identification, the x- and y-coordinates, and six independent variables, sometimes referred to as channels.

XYZ POINT DATA: Referred to in the programs as "xyz" data, which may be either ASCII or binary, z being the independent variable in terms of two-dimensional (normally map) coordinates x (east) and y (north).

GEOGRAPHIC CONVENTIONS: Longitudes are negative if west of Greenwich, and latitudes are negative if south of the Equator. Projections are referred to by number according to the following:

  1. American polyconic
  2. ellipsoidal transverse Mercator (similar to UTM, but with arbitrary central meridians and base latitudes and no false eastings or northings)
  3. Mercator
  4. Lambert conformal conic. Lower and upper parallels can be specified or default to 33 and 45 degrees.
  5. Albers equal area for conterminous United States. Standard parallels are 29.5 and 45.5 degrees.
  6. Albers equal area for Alaska. Standard parallels are 55 and 65 degrees.
  7. Albers equal area for Hawaii. Standard parallels are 8 and 18 degrees.
  8. reserved
  9. spherical transverse Mercator (special for Geological Society of America's "Decade of North American Geology" map series).

IMAGE FORMATS: Two image display programs are supplied; each uses a different image format. The DISPLAY program uses the REMAPP (REMote sensing Array Processing Procedures) image format (Livo, 1990). Grids can be converted to REMAPP images by using the program GRDREM. The IMVIS display program uses a modified PDS (Planetary Data System) image format. Grids can be converted to PDS graytone images by using the GRD2IMG batch program, to color shaded-relief PDS images by using the CSR, CSRHIST, CSRCON, or CSRZERO batch programs, or to color edge- enhanced PDS images by using the CEDGE batch program.

Section 5. PROGRAM EXECUTION

The potential-field programs are largely interactive, but most do not have graphical user interfaces. A program is started by typing its name on the command line. Parameters and data are communicated to the program either by typing responses to prompts or by means of a namelist-based command file, normally having filename suffix ".cmd". Command files begin with &parms (or $parms) and end with & (or $); namelist variables are entered in between. A command file might look like the following:

The delimiters need not be given on separate lines. Note that all character parameters, such as file names, are enclosed in single quotes. Many programs will ask for required parameters not given by the command file; the documentation usually states which parameters these are. Some programs (FFTFIL, GRAVPOLY, and MAGPOLY) also require information on lines before or after the delimiters.

Interactive programs generally follow a set of rules:

1. Items inside brackets correspond to the default response and will be used by the program if <Enter> is pressed. For example, by pressing <Enter> in answer to the question that follows, the program will next ask for a constant value instead of a second input file.

Alternatively, you could enter the name of a grid file. If the program was compiled using the new IOSYS routines, then a third possible response would be "mu", which means "I am done with this question", or "go back to the previous question".

2. If the program is asking for a file name or format, try a carriage return to use the default or bypass the question.

3. If the program is asking for a function or command file and the proper answer is unclear, try typing h or help. (One notable exception is program UTILITY, which uses h for another function. In this case, when asked for a function, type a wild character, such as ?, and you will get a list of available functions.)

4. If the program is asking for an option that is an integer, try typing 0 or 999 to get a list of options, or -1 to indicate you are done with the question.

5. Use <Ctrl-C> to break out of a program. If you break out of a program in graphics mode, you must type the DOS command "MODE CO80" to restore the screen to 80 column text mode.

Batch file programs require that all parameters be entered on the command line; to see a list of the required parameters you can invoke the batch file program with no parameters. See the program help (.hlp) files.

A menu system is supplied for accessing the potential-field programs. Once the programs are installed (see Section 1. OVERVIEW AND INSTALLATION), the menu system can be started by typing PFMENU at the command line and pressing the <Enter> key. The menu system assumes that the directory containing the executable programs is in the user's PATH, and it uses the DOS editor EDIT to edit command files for programs requiring them. Each level of the menu contains a HELP option for accessing the help files and a DOS option for temporarily exiting to DOS. The menu system can be modified or customized (to add additional programs, for example) by modifying the file PFMENU.DAT in the \PF\BIN directory (see the help file for GSMENU for details). You may find that some of the larger programs, like CONTOUR and DISPLAY, may require too much memory to execute from within the menu system, especially if you have memory-resident software installed.

Section 6. ONLINE HELP AND TEST DATA

ONLINE HELP: A help file is provided for each program. The help file for a particular program can be viewed a page at a time by using the PFHELP facility. To obtain help, type "pfhelp <program_name>", for example:

If PFHELP is invoked without the optional program name, a scrollable list of program names is displayed, with instructions for selecting a program from the list. To exit help for a particular program and return to the scrollable list, type the <Esc> key. To exit PFHELP entirely, type the <Esc> key again.

Several help files contain lists of programs and functions. These have names starting with the numeral 1, and are displayed at the beginning of the scrollable list.

TEST DATA: Command files for some of the major programs, and test data sets, are provided in the \PF\TEST directory. To see a list of programs having test materials, type:

Section 7. COMPILATION

Most of the programs were compiled under the Microsoft MS-DOS operating system using Microsoft Fortran versions 5.0 and 5.1 and were linked with the large Fortran memory module containing inline, floating-point instructions (LLIBFOR7.LIB). Most C programs were compiled using Microsoft C/C++ version 7.0. Supplied executable code will run only on computers having a math coprocessor (8087, 80287, 386DX, 486DX, or Pentium). The following sequence suggests how the programs could be recompiled, if required, under DOS with MS Fortran 5.1 and MS C/C++ 7.0 or Visual C/C++ 1.5 compilers:

Most simple programs can be compiled individually with the command :

We normally use the /e /f and /packc options to make more compact and efficient executables. (The /packc option may not be compatible with assembly-language programs and therefore should not be used with programs involving graphics.):

Compound programs require several object modules, the first defining the name of the .EXE file. These are compiled using the command:

These programs include:

MAD Programs belonging to the MAD set of programs (stands for "manipulating aeromagnetic data") must be linked with MADSUBS.LIB, compiled as a library of object files. The MADSUBS.LIB library and all MAD programs can be compiled with the commands:

Large-array programs require the /Gt option (it's case sensitive) of the fl command. These programs include:

Section 8. ACKNOWLEDGMENTS

Many individual scientists have contributed programs and algorithms to the potential-field software package, including R.A. Ambroziak, W.L. Anderson, J. Bernard, R.J. Blakely, R.E. Bracken, J.W. Cady, L. Cordell, D.L. Daniels, J.S. Duval, J.N. Evendon, C.A. Finn, R.H. Godson, V.J.S. Grauch, T.E. Hildenbrand, K.E. Livo, M.R. Mall, J.D. Phillips, R.W. Saltus, R.W. Simpson, R.E. Sweeney, R.D. Watts, M.W. Webring, and S. Wybraniec.

Section 9. TOPICAL LIST OF PROGRAMS

Note: programs in square brackets are not accessible from PFMENU under the specified category, either due to space limitations (in which case they usually appear elsewhere), or because they are intended to be only for internal use by other programs.

GRID & IMAGE DISPLAY

ADDSCALE add an intensity scale bar to the right side of a grid file in preparation for converting the grid to an image.

CONTOUR general purpose contouring and map generation program (uses a command file).

DETOUR contouring of post and xyz data using Delaunay tessellation.

DETOURG contouring of gridded data using Delaunay tessellation.

DISPLAY REMAPP image display.

EXAMPLE demonstrates use of the plot system.

FIXHPGL removes blanks from HPGL plot files produced by the plot system so that they can be imported into some word processor programs as graphics images.

GEOCON R.E. Godson's projection, gridding, contouring, shading package (uses command files and takes about 595K RAM).

GRDREM convert grid to REMAPP image, for viewing with program DISPLAY.

[HISTNORM] stretches the values in a grid to produce a uniform distribution.

[IMVIEW] PDS image display

IMVIS PDS image display.

[SPLIT3] quantize a grid into 3 specified levels for display.

[SPLIT_N] quantize a grid into N equispaced levels for display.

ZOCZC Stan Wybraniec's color-shaded relief display program for grids.

PDS IMAGE GENERATION

ADDPAL add palette information to a PDS image label file.

ADDPROJ add projection and overlay information to a PDS image label file.

[ADDSCALE] add an intensity scale bar to the right side of a grid file in preparation for converting the grid to an image.

CDIP2RAW converts output of LOCDEP to a REORDER input file.

CEDGE generates a color edge-enhanced PDS image from two grids (batch file).

[CEE] generates RGB color edge-enhanced grids.

[CSHADE] generates RGB color shaded-relief grids.

CSR generates a continuous-tone color shaded-relief (CSR) PDS image from two grids (batch file).

CSRHIST generates a continuous-tone CSR PDS image with histogram-normalized color levels (batch file).

CSRCON generates a CSR PDS image with distinct color contour bands (batch file).

CSRZERO generates a CSR PDS image with a "coastline" (batch file).

DEP2RAW converts output of ASDEP or HDEP to a REORDER input file.

DIP2RAW converts output of LOCDEP to a REORDER input file.

GRD2IMG generates a graytone PDS image from a grid (batch file).

GRD2SIMG generates a graytone PDS image with a specified linear stretch from a grid (batch file).

GS2RAW converts a GSMAP ascii file to a REORDER input file.

HISTNORM stretches the values in a grid to produce a uniform distribution.

[IMVIEW] PDS image display

IMVIS PDS image display.

LBL2PCX converts a 256-color PDS image to a .PCX image file.

[MAKELBL] make a label for a PDS image.

PCX2LBL converts a .PCX image file to a PDS image.

PROX2RAW converts a PROFILEX coordinate file to a .RAW file for input to REORDER (batch file). Allows plotting of profile locations as a vector overlay on IMVIS images.

[RAINBOW] generates continuous-tone red, green, blue density slice grids.

[RAINCON] generates 15-level red, green, blue density slice grids.

RAINPAL make a simple color pallette file for a PDS image.

[RAINZERO] generates red, green, blue density slice grids with a coastline.

RAW2GEO converts a .RAW file of digitized geologic contacts along a profile from IMVIS into an input file for XYZ2GEO (batch file).

[RAW2XYZ] converts a .RAW digitized file into an .xyz file for use by RAW2GEO.

[REDUCE] generates a PDS image from output of RSG3.

[REM2DAT] convert a REMAPP image into a PDS image file.

REORDER generate binary line overlays for PDS images from .RAW files

[RSG3] converts three (red, green, blue) REMAPP images to an input file for REDUCE.

[SHADE] generates a shaded-relief grid from output of NORMAL

TGA2LBL generates a PDS image from a Targa (.TGA) screen-capture file.

TGA2PCX generates a .PCX image file from a Targa screen-capture file and a palette file.

[VECTA2B] generate binary line overlays for PDS images from .RAW files.

[VECTB2A] generate .RAW files from binary line overlays for PDS images.

XYZ2GEO converts an xyz file from RAW2GEO into a geology file for PDEPTH.

XYZ2GRF converts an unprojected binary xyz file into a .GRF file for overlaying symbols on IMVIS images.

ZEROPAL make a color pallette file with a coastline for a PDS image.

REMAPP IMAGE GENERATION

ADDSCALE add an intensity scale bar to the right side of a grid file in preparation for converting the grid to an image.

DISPLAY REMAPP image display.

GRDREM convert grid to REMAPP image, for viewing with program DISPLAY.

HIST generates a histogram of a REMAPP image file.

HISTNORM stretches the values in a grid to produce a uniform distribution.

[NORMAL] produce grids of three unit normal vectors from a grid, used for shaded-relief imaging.

PMASK makes a point mask for a REMAPP image file.

REMENU menu acess to REMAPP software package (not included).

REMHELP view help files for the REMAPP software package (not included).

REMSHADE use NORMAL and GRDREM to generate REMAPP images for shaded relief (batch file).

SPLIT3 quantize a grid into 3 specified levels for display.

SPLIT_N quantize a grid into N equispaced levels for display.

STRETCH stretches the shades in a REMAPP image file for better contrast.

GRID SPATIAL FILTERING & CONTINUATION

AVER2D fast lowpass filtering of grid data by averaging operator.

BOXFILT fast lowpass filtering by rectangular (boxcar) averaging.

CHESS level-to-drape (and approximate drape-to-level or drape-to-drape) potential-field continuation by the Cordell-Hildenbrand chessboard method.

DRAPE generate a draping surface grid from a topography grid based on a minimum terrain clearance and a maximum rate-of-climb.

GRADIENT uses first differences to generate a grid containing the magnitude of the horizontal gradient. See alternate GRADXYH.

GRADXYH uses splines to compute x(east)- and y(north)-derivative grids, and a horizontal gradent magnitude grid (batch file). See alternate GRADIENT.

[HGRAD] calculate horizontal gradient magnitude from x- and y-derivative grids.

MEDIFILT median filter applied to a grid.

[NORMAL] produces grids of three unit normal vectors from a grid, used for shaded-relief imaging.

[SP_X] uses splines to compute the x(east)-derivative of a grid.

SPIKE remove spikes from a grid.

SURFIT fit surfaces of up to 19th order to input grid using orthogonal polynomials.

TAYLOR arbitrary-surface potential-field continuation by Cordell-Grauch Taylor's series method (uses a command file).

TERRACE terrace grids by Cordell-McCafferty-Phillips method (batch file).

VERTINT first vertical integral of a prepped grid (batch file).

EQUIVALENT SOURCE CONTINUATION

ADDGRD performs point-by-point arithmetic operations (+,-,*,/, mask) between two grids of equal size. Use to get residual field and to restore holes.

DRAPE generate a draping surface grid from a topography grid based on a minimum terrain clearance and a maximum rate-of-climb.

ESMAG generate equivalent dipole sources on the topography to fit the XIAM residual magnetic field.

ESM_FWD calculate the magnetic field of ESMAG equivalent dipole sources on an arbitrary surface. Normally this would be added to the XIAM_FWD calculated field on the same surface.

IGRFPT get components of the geomagnetic reference field at a specified location and date.

PLUGGRID regrid to plug holes prior to XIAG or XIAM (batch file).

XIAG generate an equivalent density source layer to fit an observed gravity field on a surface using the method of Xia and others (1993).

XIAG_FWD calculate the gravity field of the XIAG equivalent source distribution on an arbitrary surface.

XIAM generate an equivalent magnetization source layer to fit an observed magnetic field on a surface using the method of Xia and others (1993).

XIAM_FWD calculate the magnetic field of the XIAM equivalent source distribution on an arbitrary surface.

XIA_SAV attempts to recover XIAG or XIAM results after a program interruption or system crash.

BASIC FOURIER FILTERING OF GRIDS

ADDGRD performs point-by-point arithmetic operations (+,-,*,/, mask) between two grids of equal size. Use to restore holes following de_prep.

CK_DIMS Suggests values for new row and column dimensions that will not be changed internally by program FFTFIL.

PLUGGRID regrid to plug holes prior to FFTFIL (batch file).

PREP detrend and extrapolate grid prior to FFT by tilting and cosine extension, to reduce effect of wrap around.

PREP3 detrend and extrapolate grid prior to FFT by prediction filtering, to reduce effect of wrap around.

PREP4 detrend and extrapolate grid prior to FFT. Like PREP3 but centers data in the extrapolated grid to reduce edge-effects.

PREP5 detrend and extrapolate grid prior to FFT (batch file). Like PREP4 but uses both prediction filtering and minimum curvature gridding to extrapolate grid values.

FFTFIL Fourier filtering of grids using linear operators (continuation, pseudogravity, etc.). Can also be used to compute the forward or inverse Fourier transform of a grid file for filtering external to the program. See external filters listed below (uses a command file).

DE_PREP undoes operations of PREP following Fourier transform of grid.

DE_PREP3 undoes operations of PREP3 following Fourier transform of grid.

DE_PREP4 undoes operations of PREP4 following Fourier transform of grid.

DE_PREP5 undoes operations of PREP5 following Fourier transform of grid (batch file).

EXTERNAL FILTERS - used in conjunction with FFTFIL

F_ADD arithmetic operations with registered FFT coefficient (.cof) files.

F_AMP grid of log of amplitude of FFT spectrum.

F_A_AMP grid of log of area-weighted fft spectrum.

F_AZIM Tapered azimuthal filter in FFT domain. Useful for reduction to magnetic pole at low magnetic latitudes.

[F_COF.FOR] modifiable source code for user-designed FFT filters in frequency domain.

F_CONT upward or downward potential-field continuation.

F_DECOMP decompensative gravity correction.

F_DX first x(east)-derivative in Fourier domain.

F_DY first y(north)-derivative in Fourier domain.

F_DZ first vertical derivative for potential fields.

F_DZX x-component of first vertical derivative.

F_DZY y-component of first vertical derivative.

F_GRAV gravity field of a single horizontal layer density model, in the frequency domain (see TERRACE).

F_MAG magnetic field of single horizontal layer magnetization model in the frequency domain (see TERRACE).

F_POT gravitational-potential of a single horizontal layer density model in the frequency domain (see TERRACE).

F_RFP reduction from the north magnetic pole to a specified geomagnetic inclination and declination.

F_RTE reduction to the magnetic equator at zero declination.

F_RTED reduction to the magnetic equator at a specified declination.

F_RTP reduction to the pole incorporating an azimuthal filter for low magnetic latitudes.

F_SRAS grid of area-weighted radial amplitude spectrum.

F_STRIP Low-pass filter by Cordell stripping method.

IGRFPT get components of the geomagnetic reference field at a specified location and date.

VERTINT first vertical integral of a prepped grid (batch file).

MATCHED FILTERING PROGRAMS

ADDGRD performs point-by-point arithmetic operations (+,-,*,/, mask) between two grids of equal size. Use to restore holes following filtering.

MFINIT matched filtering initialization.

MFDESIGN interactive design of matched bandpass filters.

MFFILTER application of designed bandpass filters and optional azimuthal filters to the grid.

MFPLOT plot current filters.

PLUGGRID regrid to plug holes prior to MFINIT (batch file).

BASIC UTILITIES & STATISTICS FOR GRIDS

ABS computes the absolute value of grid values.

ADDGRD performs point-by-point arithmetic operations (+,-,*,/, mask) between two grids of equal size.

ASCII2SF converts standard grid from ascii to binary. See SF2ASCII.

CORREL compares the grid-point values of two grids and outputs a grid of correlation coefficients.

GHIST histogram and statistics of a grid. See GRD_STAT, GRDMAX, IDMAX.

GRDMAX gives minimum and maximum grid values. See IDMAX, GHIST.

GRD_STAT calculates the mean and standard deviation of one grid or the RMS difference between two grids.

G2XYZ converts grid points to an xyz file (part of the MAD suite of programs).

ID prints the header information of a grid file. See IDMAX, UTILITY.

IDMAX prints grid header information and data range. See ID, GRDMAX.

LOG log10 of positive grid values.

SF2ASCII converts standard-format grid from binary to ascii. See ASCII2SF.

UTILITY operations on a grid: extract, subgrid, list, rotate, transpose, change header, edit and convert to xyz file.

GRID LEVELING AND MERGING

BIHARM generate level-shift statistics for the overlap area of two grids. Used prior to merging the two grids. See alternate program COMPGRD.

COMPGRD compares values in overlap areas of two grids to determine the constant level shift required prior to merging. See alternate program BIHARM.

COMPSURF compares values in overlap areas of two grids to determine a planar surface to remove from one grid prior to merging.

DRAPE generate a draping surface grid from a topography grid based on a minimum terrain clearance and a maximum rate-of-climb.

GMERGE puts multiple input grids into one output grid with no interpolation. See JIGSAW, TILT, UTILITY.

IGRFGRID International Geomagnetic Reference Field (IGRF) calculated on either a draped or constant-elevation surface grid.

INSERT inserts a subgrid into a master grid.

JIGSAW trims boundaries of the data area in a grid to a specified polygon (uses a command file).

JMERGER merges two overlapping grids by spline-weighted interpolation (batch file). See alternate program TMERGER.

[JMRG] merges two registered (small) grids by spline-weighted interpolation. Used by JMERGER.

MAGMRG merges two grids by 1-D cubic-spline interpolation in E-W or N-S directions. See JMERGER, TMERGER.

SURFIT fit surfaces of up to 19th order to input grid using orthogonal polynomials.

TILT adds a planar surface grid with specified edge gradients to an input grid.

TMERGER smoothly merge two grids after correcting for level shifts. See alternate program JMERGER; also see BIHARM, COMPGRD, JMRG, GMERGE, MAGMRG.

GRID RESAMPLING/PLUGGING/TRANSFORMING

DECIMATE resamples a grid at integer intervals.

MEDIPLUG recursively plug holes in a grid using the median of adjacent values. See MEGAPLUG, PLUGGRID.

MEDIPLG1 add a one-grid-cell hull around holes on a grid using the median of adjacent values. See MEDIPLUG, PLUG1.

MEGAPLUG extrapolate data over no-data areas in grids. Restricted to moderate size grids; see unrestricted alternative PLUGGRID.

PLUG1 plug single-cell holes in a grid using the median of adjacent cells.

PLUGGRID regrid to plug holes or add hulls (batch file). Unrestricted alternative to MEGAPLUG.

PRJGRD geographic forward projection of data in lat/lon grid form using cubic splines (Polyconic, UTM, Lambert, Mercator, or Albers projections are available).

REGRID interpolate 2D grid at a specified increment using cubic splines or linear interpolation.

REPLICAT enlarge grid by replicating grid cells.

ROTATE rotate a grid about a specified point and output an XYZ file. See also TRANSPOSE, UTILITY.

TRANSPOS transposes rows and columns of a grid, rotate 90 degrees, or reverse columns.

UTILITY operations on a grid: extract, subgrid, list, rotate, transpose, change header, edit and convert to xyz file.

GRID EDITING/TRIMMING/RESCALING

ADDGRD performs point-by-point arithmetic operations (+,-,*,/, mask) between two grids of equal size.

COMBGR insert dvals into a master grid at locations corresponding to non-dvals in a secondary grid.

DVAL converts a data range to DVALs.

EMPTY makes a grid of all dvals, primarily for use with JMRG.

JIGSAW trims boundaries of the data area in a grid to a specified polygon (uses a command file).

SCALE scales one grid to another by least squares.

SKIM replaces grid values above and(or) below given levels with assigned max, min values.

STDBNDY find crests in a grid and write them to an output grid.

TRIMGRD trims no-data (dval) borders of a grid.

UPPER combines 2 grids as MAX[grid1, grid2+constant] (batch file).

UTILITY operations on a grid: extract, subgrid, list, rotate, transpose, change header, edit and convert to xyz file.

GRID COMPLEX ATTRIBUTES & DERIVATIVES

[ANALYTIC] generate a 3-D analytic signal amplitude grid from vertical and horizontal derivative grids.

[ANALYTI2] generate an alternate 3-D analytic signal amplitude grid from vertical and horizontal derivative grids.

AS generate the 3-D analytic signal amplitude and derivative grids (batch file).

AS2 generate the alternate 3-D analytic signal amplitude and derivative grids (batch file).

ASPRP generate 3-D analytic signal amplitude and derivatives of a prepped grid (batch file).

CK_DIMS Suggests values for new row and column dimensions that will not be changed internally by program FFTFIL.

[GRADCOMP] computes filtered horizontal derivative and horizontal gradient magnitude grids using the gradient-component method of Thurston and Brown (1994).

GRADIENT uses first differences to generate a grid containing the magnitude of the horizontal gradient. Use in preparation for HDEP or BOUNDARY. See alternate GRADXYH.

GRADXYH uses splines to compute x(east)- and y(north)-derivative grids, and a horizontal gradent magnitude grid (batch file). Use in preparation for HDEP or BOUNDARY. See alternate GRADIENT.

HGRAD calculate horizontal gradient magnitude from x- and y-derivative grids.

IGRFPT components of the geomagnetic reference field at a specified location and date.

LOCAL computes local phase, amplitude, and wavenumber of the first vertical integral of the (plugged) input grid (batch file).

PHASE computes local phase from first horizontal and vertical derivatives.

RTVD reduction to vertical dip (batch file).

TERRACE batch program to terrace grids by Cordell-McCafferty method, augmented by Phillips.

VERTINT first vertical integral of a prepped grid (batch file).

GRID CONTACTS & PHYSICAL PROPERTIES

ASDEP crude depth estimates from a 3-D analytic signal grid of magnetic anomaly data. Requires an analytic signal grid generated by AS. Results can be plotted using PLOTDEP or converted into IMVIS vector overlays using DEP2RAW and REORDER. See also HDEP, LOCDEP.

BOUNDARY automatically performs horizontal-gradient method of Cordell and Grauch to find physical-property boundaries. See CK_DIMS.

[CK_DIMS] Suggests values for augmented row and column dimensions in preparation for Fourier transform calculation. May be used prior to BOUNDARY or PREP.

FGRAV refine prepped density grid for a horizontal layer (batch file).

FMAG refine prepped magnetization grid for a horizontal layer (batch file).

GRADIENT uses first differences to generate a grid containing the magnitude of the horizontal gradient. Use in preparation for HDEP or BOUNDARY. See alternate GRADXYH.

GRADXYH uses splines to compute x(east)- and y(north)-derivative grids, and a horizontal gradent magnitude grid (batch file). Use in preparation for HDEP or BOUNDARY. See alternate GRADIENT.

HDEP generate depth estimates and strike information from horizontal gradient magnitude grids of reduced-to-pole magnetics or pseudomagnetics (for minimum source depths), or gravity or pseudogravity (for maximum source depths). Requires an HGM grid generated by GRADXYH or GRADIENT. Results can be plotted using PLOTDEP or converted into IMVIS vector overlays using DEP2RAW and REORDER. See also ASDEP, LOCDEP.

HGRAD calculate horizontal gradient magnitude from x- and y-derivative grids.

[IGRFPT] components of the geomagnetic reference field at a specified location and date.

LOCAL computes local phase, amplitude, and wavenumber of the first vertical integral of the (plugged) input grid (batch file).

LOCDEP generate depth, strike, dip, and susceptibility contrast estimates for magnetic contacts from the local wavenumber grid. Requires a local wavenumber grid generated by LOCAL, or by applying GRADXYH or GRADIENT to the output of PHASE. Results can be plotted using PLOTDEP or PLOTDIP or converted into IMVIS vector overlays using DEP2RAW, DIP2RAW, or CDIP2RAW and REORDER. See also ASDEP, HDEP.

PLOTDEP plot results of HDEP, LOCDEP or ASDEP to the screen.

PLOTDIP plot results of LOCDEP to the screen.

STDBNDY find crests in a grid and write them to an output grid.

TERRACE terrace grids by Cordell-McCafferty method, augmented by Phillips (batch file).

GRID FORWARD MODELING & INVERSION

DIPOLE forward calculation of a dipole anomaly.

GI3 3D gravity inversion by Cordell-Henderson method. Grid size is limited to 50x50 (uses a command file).

GI4 experimental 3D gravity inversion program using a windowed version of GI3, for larger grids.

GRAVPOLY 3D forward gravity modeling using Talwani method, modified to allow for exact formula and to invert for density (uses a command file).

IGRFPT components of the geomagnetic reference field at a specified location and date.

MAGPOLY 3D forward magnetic modeling using Talwani method, modified to allow for exact formula and to invert for magnetization (uses a command file).

PFGRV3D 3D forward gravity calculation of effect of sources having irregular upper and lower surfaces by Parker-Blakely method. See PMAG3D, PFMAG3D.

PFMAG3D 3D forward magnetic calculation of sources having irregular upper and lower surfaces by Parker-Blakely method. See alternate PMAG3D.

PMAG3D large grid version of PFMAG3D.

VARMAG magnetic-terrain correction by Grauch variable-magnetization method (uses a command file).

POINT DATA UTILITIES & GRIDDING

DETOUR screen contouring of xyz or post file data.

EXTRACT rectangular subset from data in xyz or post format.

G2MINCMD generate a MINC command file consistant with a specified grid.

GRAFEDIT interactive graphic editing of xyz and post data sets by inspection of provisional grid.

GENPROJ forward and inverse projection of post and xyz files.

MINC creates 2D grid from randomly spaced data using minimum curvature (uses a command file).

P2GRD generate a grid from a point data file (batch file). Uses GENPROJ, P2MINCND, and MINC.

P2MINCMD generate a MINC command file consistant with a specified point data file.

PRJPT geographic projection of one input latitude, longitude coordinate at a time.

READPTS list a point data file to the screen.

XYZMAX gives minimum, maximum of data fields in xyz and post files.

POST & MAD FILE UTILITIES

A2P converts ascii files in free-form post format to binary post. See P2A. See alternative program A2POS.

A2POS converts ascii files in 80-column post format to binary post files. See POS2A and POS2AGRF (part of the MAD suite of programs). See alternative program A2P.

CKVALUE checks a post file for values within a given range (part of the MAD suite of programs).

COMBPOST concatenate binary post files,

EXTRACT rectangular subset from data in xyz or post format.

FLDEL deletes a flight line from a MAD post file (part of the MAD suite of programs).

FLDIST calculates distance on ground between data points, given a MAD post file (part of the MAD suite of programs).

FLGET extracts a flight line from a MAD post file (part of the MAD suite of programs).

FLSPECS prints minimum, maximum and other specifications for the flight lines in a MAD post file (part of the MAD suite of programs).

FLTOPO calculates approximate elevation of topography from terrain clearance and barometric altitude fields in a MAD post file (part of the MAD suite of programs).

[G2XYZ] converts grid points to an xyz file (part of the MAD suite of programs).

G_SCREEN average close-together gravity stations.

P2A converts binary post file to free-form ascii, thus preserving machine accuracy. More accurate than POS2A. See A2P.

P2GRD generate a grid from a point data file (batch file). Uses GENPROJ, P2MINCND, and MINC.

P2XYZ converts post file to binary xyz file (part of the MAD suite of programs).

PHIST prints a histogram of values in a post file (part of the MAD suite of programs).

POS2A converts a post file to 80-column ascii format. See A2POS (part of the MAD suite of programs). Also see better alternative P2A.

POS2AGRF same as POS2A but adds a marginal graph (part of the MAD suite of programs).

PSCREEN extracts one post file record per grid cell (part of the MAD suite of programs).

PSORT sorts a post file on user-given channels (part of the MAD suite of programs).

PWINNOW winnows by keeping only every nth record in a post file (part of the MAD suite of programs).

READPTS list a point data file to the screen.

TIEDEL deletes all tie (cross) lines in a MAD post file (part of the MAD suite of programs).

XYZMAX gives minimum, maximum of data fields in xyz and post files.

XYZ FILE UTILITIES

A2XYZ converts free-format ascii xyz files to binary. See XYZ2A.

COMBXYZ concatenates xyz files.

EXTRACT rectangular subset from data in xyz or post format.

GEOCON R.E. Godson's projection, gridding, contouring, shading package (uses command files).

G2XYZ converts grid points to an xyz file (part of the MAD suite of programs).

P2GRD generate a grid from a point data file (batch file). Uses GENPROJ, P2MINCND, and MINC.

P2XYZ converts post file to binary xyz file (part of the MAD suite of programs).

[PROX2XYZ] PROFILEX coordinate file to binary xyz file.

READPTS list a point data file to the screen.

ROW2XYZ converts a binary profile in one-row-grid format to an xyz file.

XYZ2A converts an xyz file from binary to ascii. See A2XYZ.

XYZ2P converts an xyz file to a post file. See P2XYZ.

XYZ2ROW converts an xyz file to a binary profile. See ROW2XYZ.

XYZMAX gives minimum, maximum of data fields in xyz and post files.

EQUIVALENT SOURCE GRIDDING

G_SCREEN average close-together gravity stations.

ES three-dimensional gridding of point data at arbitrary elevations, by Cordell's equivalent source method.

ES_CK check the fit of the equivalent source field to the original data.

MEGAPLUG fill holes in grids by extrapolating into no-data areas. See alternative program PLUGGRID.

PLUGGRID regrid to fill holes using MINC (batch file). Works on larger grids than alternative program MEGAPLUG.

PHONY generate a set of phony data used by ES to fill gaps in the equivalent source model.

ES_FWD calculate the field of the equivalent sources on a grid.

ES_COF calculate a fftfil.cof file from the equivalent sources.

XYZMAX gives minimum, maximum of data fields in xyz and post files.

PROFILE DATA

DE_PREP2 restore a PREP2ed binary profile after inverse Fourier transform via PROFFT.

DETREND2 remove a linear trend from a binary profile.

DIPOLE forward calculation of a dipole anomaly.

PDEPTH interactive modeling and interpretation of SAKI-format profile data. Will accept parameters from a SAKI command file (uses a command file).

PREP2 prepare a binary profile for forward FFT via PROFFT.

PROFFILT frequency-domain filters on 1d data, similar to FFTFIL. Operates on FFT obtained by PROFFT. Self-prompting.

PROFFT 1D FFT of binary profiles. See also PREP2, DETREND2, PROFFILT, PROFSPEC, and DE_PREP2.

PROFGRD extract a binary profile from a grid using spline interpolation (uses a command file). See also PROFILEX and SF2PROF.

PROFILEX extract a SAKI-format profile from a contoured grid using either a mouse or a coordinate file.

PROFPLOT plot a binary profile.

PROFSPEC plots spectrum of FFT coefficients output from PROFFT. See also PROFFT, PROFFILT,

PROF2SAK converts binary profiles of potential field data and (optional) elevation data into a SAKI-format ascii profile.

PROX2RAW converts a PROFILEX coordinate file to a .RAW file for input to REORDER (batch file). Allows plotting of profile locations as a vector overlay on IMVIS images.

[PROX2XYZ] PROFILEX coordinate file to binary xyz file.

RAW2GEO converts a .RAW file of digitized geologic contacts along a profile from IMVIS into an input file for XYZ2GEO (batch file).

ROW2XYZ convert a binary profile to ascii x,y,f(x), where y is a dummy value.

SAK2PROF converts a SAKI-format ascii profile into a binary profile for input to PROFFT (PREP2) or WERNER.

SAKI semi-automatic 2.5D gravity and magnetic modeling using generalized inversion and graphics (uses a command file).

SF2PROF extract a SAKI-format profile from anomaly and elevation grids using bilinear interpolation. See also PROFILEX, PROFGRD.

SPLINE use spline interpolation to make a SAKI-format profile equispaced.

SPLI2ROW use spline interpolation to convert a non-equispaced ascii x,y,f(x) file to an equispaced binary profile. The y-values are ignored. See also XYZ2ROW.

TERRACE1 terrace a binary profile.

WERNER automatic depth-to-magnetic-source on binary profiles by Werner deconvolution (uses a command file). See also PDEPTH.

XYZ2GEO converts an xyz file from RAW2GEO into a geology file for PDEPTH.

XYZ2ROW convert an ascii x,y,f(x) file (assumed equispaced) to a binary profile. The y-values are ignored. See also SPLI2ROW.

MISCELLANEOUS PROGRAMS

[BROWSE] text and PDS image browser.

EDIT edit a file using the DOS editor.

FORC batch file to compile and link a simple fortran program.

GREDUC reduction of gravity field measurements. Requires file GMETER.DAT.

GREP find files containing a specified word (batch file). Generates file GREP.LOG.

[GSMENU] menu-based program or text access. See PFMENU.

HAMMER compute Hammer-zone terrain corrections for gravity data.

MEM DOS command to display available memory.

MTYPE type an ascii file one page at a time.

PFHELP help file viewer for the potential-field software package; based on BROWSE.

PFMENU menu-based interface for the potential-field software package. Uses GSMENU.

RDEL delete multiple files.

REMHELP help file viewer for the PC-REMAPP software package (not included), based on BROWSE.

REMENU menu-based interface for the PC-REMAPP image processing software package (not included). Uses GSMENU.

Section 10. REFERENCES

Cordell, Lindrith, Phillips, J.D., Godson, R.H., 1992, U.S. Geological Survey potential-field geophysical software version 2.0: U.S. Geological Survey Open-File Report 93-18, 18p., 6 diskettes.

Godson, R.H., and Mall, M.R., 1989, Potential-field geophysical programs for IBM compatible microcomputers version 1.0: U.S. Geological Survey Open-File Report 89-197, 23p., 5 diskettes.

Grauch, V.J.S., Phillips, J.D., Hoover, D.B., Pitkin, J.A., Livo, K.E., and McCafferty, Anne, 1993, Materials provided at the workshop "Geophysical Map Interpretation on the PC", convened April 21-22, 1993: U.S. Geological Survey Open-File Report 93-560, 150 p., 14 diskettes. (includes potential-field software update 2.11)

Livo, K. Eric, 1990, REMAPP-PC remote sensing image processing software for MS-DOS personal computers version 1.00: U.S. Geological Survey Open-File Report 90-88A-E, 64 p., 4 diskettes.

Phillips, J.D., Duval, J.S., and Ambrosiak, R.A., 1993, National geophysical data grids: gamma-ray, gravity, magnetic, and topographic data for the conterminous United States: U.S. Geological Survey Digital Data Series DDS-9, 1 CD-ROM. (includes potential-field software version 2.1)