**==modabund.spg  processed by SPAG 4.50J  at 14:50 on 30 Jun 1995
      SUBROUTINE MODABUND(Abunj)
      IMPLICIT NONE
C*** Start of declarations inserted by SPAG
      REAL abund , frac
      INTEGER i , no
C*** End of declarations inserted by SPAG
c
c    Modifies the abundances of elements.
c
      REAL*4 Abunj(12)
      no = -1
      DO WHILE ( no.NE.0 )
 50      WRITE (*,'(a)') ' Enter No., abundance (Hydrogen=12)?' , 
     &                   ' Type -3,0 for a list + prompt for changes.' , 
     &         ' Type -2,0 to change all the metals by a const fraction'
     &         , ' Type -1,0 for a list.' , ' Type  0,0 to finish'
         READ (*,*,END=50)  , no , abund
         IF ( no.EQ.-3 ) THEN
            PRINT * , ' 1 He (' , Abunj(1) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(1)
            PRINT * , ' 2 C (' , Abunj(2) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(2)
            PRINT * , ' 3 N (' , Abunj(3) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(3)
            PRINT * , ' 4 O (' , Abunj(4) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(4)
            PRINT * , ' 5 Ne (' , Abunj(5) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(5)
            PRINT * , ' 6 Mg (' , Abunj(6) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(6)
            PRINT * , ' 7 Si (' , Abunj(7) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(7)
            PRINT * , ' 8 S (' , Abunj(8) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(8)
            PRINT * , ' 9 Ar (' , Abunj(9) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(9)
            PRINT * , ' 10 Cu (' , Abunj(10) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(10)
            PRINT * , ' 11 Fe (' , Abunj(11) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(11)
            PRINT * , ' 12 Ni (' , Abunj(12) , ')   New abundance ?'
            READ (*,*,END=50)  , Abunj(12)
         ENDIF
         IF ( no.EQ.-2 ) THEN
            WRITE (*,*) ' Fraction of current abundance required ? '
            READ (*,*,END=50)  , frac
            frac = ALOG10(frac)
            DO 60 i = 2 , 12
               Abunj(i) = Abunj(i) + frac
 60         CONTINUE
         ENDIF
         IF ( no.EQ.-1 ) THEN
            PRINT * , ' 1 He (' , Abunj(1) , ')'
            PRINT * , ' 2 C (' , Abunj(2) , ')'
            PRINT * , ' 3 N (' , Abunj(3) , ')'
            PRINT * , ' 4 O (' , Abunj(4) , ')'
            PRINT * , ' 5 Ne (' , Abunj(5) , ')'
            PRINT * , ' 6 Mg (' , Abunj(6) , ')'
            PRINT * , ' 7 Si (' , Abunj(7) , ')'
            PRINT * , ' 8 S (' , Abunj(8) , ')'
            PRINT * , ' 9 Ar (' , Abunj(9) , ')'
            PRINT * , ' 10 Cu (' , Abunj(10) , ')'
            PRINT * , ' 11 Fe (' , Abunj(11) , ')'
            PRINT * , ' 12 Ni (' , Abunj(12) , ')'
         ENDIF
         IF ( no.GE.1 .AND. no.LE.12 ) THEN
            Abunj(no) = abund
            PRINT * , no , '(' , Abunj(no) , ')'
         ENDIF
      ENDDO
      RETURN
      END
