        PROGRAM COPES

c***********************************************************************
c       This program, Crude Oil Property Evaluation Software, calculates
c          the properties of stock tank oil and separator gas resulting
c          from a crude oil flashed thru multiple separators.  For
c          information on variables and calulations see the subroutine
c          oilsep and its associated subroutines.

c       Author: Scott K. Laudeman
c       Date: June 20, 1987

c***********************************************************************

c***********************************************************************
c       Declarations
c***********************************************************************

        REAL M7Plus,PSep(10),TSep(10),x(12),ysepgas(12),z(12)
        INTEGER FileUnit,TermUnit
        COMMON FileUnit,TermUnit

c***********************************************************************
c       Main Program
c***********************************************************************

        FileUnit=1
        TermUnit=0

c=======================================================================
c       TermUnit is the unit number which specifies terminal input and
c          output.  It depends on the compiler used.  The Microsoft
c          FORTRAN compiler for the Macintosh uses 9 and the Microsoft
c          FORTRAN compiler for IBM compatible computers uses 0.
c=======================================================================


        CALL  input(z,M7Plus,SG7Plus,NumSep,Pres,Tres,PSep,TSep,Psc,
     1     Tsc)

        CALL oilsep(z,M7Plus,SG7Plus,NumSep,Pres,Tres,PSep,TSep,Psc,
     1     Tsc,x,ysepgas,FVF,API,GOR,GG,GHV)

        CALL output(z,M7Plus,SG7Plus,NumSep,Pres,Tres,PSep,TSep,Psc,
     1     Tsc,x,ysepgas,FVF,API,GOR,GG,GHV)

        STOP

        END
