      SUBROUTINE RCTRNS(ITAP1,RATSTD,RATSM,RATIO,IR)
C      RATSTD=VALUE OF HIGHER STD CO2 CONCENTRATION
C      RATSM=VALUE OF LOWER STD CO2 CONCENTRATION
C      RATIO=ACTUAL CO2 CONCENTRATION
C      THE 3 ABOVE QUANTITIES ARE IN UNITS OF 330 PPMV.
      implicit real(selected_real_kind(15)) (a-h,o-z)
      COMMON/INPUT/P1,P2,TRNSLO,IA,JA,N
      COMMON/PRESS/PA(109)
      COMMON/TRAN/TRANSA(109,109)
      DIMENSION TRNS1(109,109),TRNS2(109,109)
100   FORMAT (4F20.14)
C   READ IN TFS OF LOWER STD CO2 CONCENTRATION
      READ (ITAP1,100) ((TRNS1(I,J),I=1,109),J=1,109)
      ITAP2=ITAP1+1
C   READ IN TFS OF HIGHER STD CO2 CONCENTRATION
      READ (ITAP2,100) ((TRANSA(I,J),I=1,109),J=1,109)
      CALL COEINT(RATSTD,IR)
      DO 401 I=1,109
      DO 401 J=1,I
      IF (J.EQ.I) GO TO 401
C  USING HIGHER CO2 CONCENTRATION,COMPUTE 1ST GUESS CO2 TFS FOR
C  ACTUAL CO2 CONCENTRATION.
      P2=(RATIO+RATSTD)*PA(I)/(2.*RATSTD)  +
     1   (RATSTD-RATIO)*PA(J)/(2.*RATSTD)
      P1=(RATSTD-RATIO)*PA(I)/(2.*RATSTD)  +
     1   (RATIO+RATSTD)*PA(J)/(2.*RATSTD)
      CALL SINTR2
      TRNSPR=TRNSLO
C  USING HIGHER CO2 CONCENTRATION,COMPUTE 1ST GUESS CO2 TFS FOR
C  LOWER STD CO2 CONCENTRATION
      P2=(RATSM+RATSTD)*PA(I)/(2.*RATSTD)  +
     1   (RATSTD-RATSM)*PA(J)/(2.*RATSTD)
      P1=(RATSTD-RATSM)*PA(I)/(2.*RATSTD)  +
     1   (RATSM+RATSTD)*PA(J)/(2.*RATSTD)
      CALL SINTR2
      TRNSPM=TRNSLO
C  COMPUTE TFS FOR CO2 CONCENTRATION GIVEN BY (RATIO).
C   STORE TEMPORARILY IN (TRNS2)
      TRNS2(J,I)=TRNSPR+(RATSTD-RATIO)*(TRNS1(J,I)-
     1 TRNSPM)/(RATSTD-RATSM)
      TRNS2(I,J)=TRNS2(J,I)
C WE NOW CAN OVERWRITE (TRNS1) AND STORE IN (TRNS1) THE 1ST GUESS
C  CO2 TFS FOR LOWER STD CO2 CONCENTRATION
      TRNS1(J,I)=TRNSLO
      TRNS1(I,J)=TRNSLO
401   CONTINUE
C  SET DIAGONAL VALUES OF CO2 TFS TO UNITY
      DO 402 I=1,109
      TRNS1(I,I)=1.0
      TRNS2(I,I)=1.0
402   CONTINUE
C  NOW OUTPUT THE COMPUTED CO2 TFS FOR (RATIO) CO2 CONC. IN (TRANSA)
      DO 405 I=1,109
      DO 405 J=1,109
      TRANSA(J,I)=TRNS2(J,I)
405   CONTINUE
      RETURN
      END
