C..
READING
INDEPENDENT COMPONENTS AND GIVING THE BALANCE
READ(1,12) KCOMP
C..
THE WATER BALANCE (1 KG H2O = 55.50837 MOLES )
BAL(1)=XW
NEL(1)='H2O'
NUMIN(1)=1
NMM(1)=30
NM(1)=NEL(1)
NUR(1)=1
J=1
J1=0
CHARGE=0.
DO 2000 I=2,KCOMP
READ(1,13) NMCOMP,IIZ,NU
READ(9,*) AA
IF (AA.GT.1.D-20) THEN
J=J+1
BAL(J)=AA
CHARGE=CHARGE+IIZ*AA
NEL(J)=NMCOMP
NM(J)=NEL(J)
NMM(J)=NU
NUMIN(J)=J
NUR(J)=I
ELSE
J1=J1+1
NUL(J1)=I
END IF
2000
CONTINUE
IF(DABS(CHARGE).GT.0.00001) THEN
WRITE(*,*) `THE SALT BALANCE IS NOT CORRECT'
WRITE(*,14) CHARGE
IF(CHARGE.GT.0.)WRITE(*,*)'ADD ANIONS OR SUBT. CATIONS IN
$INPUT'
IF(CHARGE.LT.0.)WRITE(*,*)'ADD CATIONS OR SUBT. ANIONS IN
$INPUT'
PAUSE
GO TO 815
END IF
IP=J
IPP=IP
IPNUL=J1
DO 2100 I=1,IP
DO 2101 J=1,IP
AIN(I,J)=0.
2101
CONTINUE
AIN(I,I)=1.
GIN(I)=0.
2100
CONTINUE
12