C-----------------------------------------------------------------------
program runocc
C-----------------------------------------------------------------------
c
C OCCAM 2.0: Steven Constable IGPP/SIO La Jolla CA 92093-0225
c Program Revision 2.01, 13 Jan 1993
c
c runocc is the calling program for OCCAM v2.0.
C
C REFERENCES: CONSTABLE, PARKER & CONSTABLE, 1987: GEOPHYSICS 52, 289-300.
C DEGROOT-HEDLIN & CONSTABLE, 1990: GEOPHYSICS 55, 1613-1624.
C CONSTABLE, 1991: GEOPHYS. J. INT. 106, 387-388.
C CONSTABLE, 1992: OCCAM DISTRIBUTION NOTES.
C
C REVISION HISTORY:
C MARCH 1986, (VERSION 1.2)
C OCTOBER 1987, (VERSION 1.3)
C AUGUST 1988, (VERSION 1.4)
C JANUARY 1989 (WITH THANKS TO C.DEGROOT-HEDLIN), (VERSION 1.5)
C SEPTEMBER 1989, (VERSION 1.5.2)
C APRIL 1992 (MORE THANKS TO CATHERINE AND ALSO WSE) (VERSION 2.0)
C
C IF YOU OBTAIN THIS CODE FROM A THIRD PERSON, PLEASE SEND YOUR NAME AND ADDRESS
C TO S. CONSTABLE. YOU WILL THEN RECEIVE UPDATES, NEWS ON BUGS, ETC.
C
C VERSION 2.0 IS A RE-WRITE TO MAKE OCCAM INDEPENDENT OF THE DIMENSIONALITY
C OF THE FORWARD PROBLEM, AND TO MAKE MAXIMUM USE OF DYNAMIC MEMORY ALLOCATION,
C AS THE ARRAY SIZES FOR THE 2D PROBLEM ARE NOW GETTING TOO LARGE FOR COMFORT.
C INCLUDE FILES ARE NOW USED TO STREAMLINE CHANGES OF DIMENSION.
C IMPLICIT DOUBLE PRECISION HAS BEEN REMOVED, AGAIN FOR STORAGE REASONS.
C CALLING PROGRAM IS NOW AN INTEGRAL PART OF THE PACKAGE AS ALL THE MODEL-
C DEPENDENT STUFF HAS BEEN SPUN OFF.
C
C IF YOU OBTAIN THIS CODE FROM A THIRD PERSON, PLEASE SEND YOUR NAME AND ADDRESS
C TO S. CONSTABLE. YOU WILL THEN RECEIVE UPDATES, NEWS ON BUGS, ETC.
C
C SUBROUTINES WHICH MUST BE SUPPLIED BY THE USER:
C
C FORMOD(NP,ND,PM,DP,DM), COMPUTES THE FORWARD FUNCTION FOR MODEL PM() AT
C THE DATA PARAMETERS DP() AN
1