      SUBROUTINE MIXRAT(M,P,T,Q)
      implicit real(selected_real_kind(15)) (a-h,o-z)
      DIMENSION A(6,7),B(6,7),QS(7),PRAT(6,7),PS(7)
      DIMENSION PMIN(7),QCONST(7)
C  TO MAKE PGM. FLOW,WE ASSUME THE US STD ATM.=SUBTROPICAL SUMMER IN
C    WATER AND OZONE
      DATA QS/19.,14.,3.5,9.1,1.2,2*14./
      DATA A/3.55,1.37,3.99,2.79,8.66,4.66,
     1       3.31,4.77,4.19,1.30,8.21,4.52,
     2       2.72,2.11,3.41,5.44,3.91,0.00,
     3       3.76,2.95,0.83,4.71,7.43,4.28,
     4       0.00,-.59,4.99,4.18,3.30,0.00,
     5       3.31,4.77,4.19,1.30,8.21,4.52,
     5       3.31,4.77,4.19,1.30,8.21,4.52/
      DATA B/1.91,-7.58,-0.41,-1.52, 1.81, 0.00,
     1      -1.83, 0.67, 0.00,-2.26, 1.67, 0.00,
     2       0.39,-2.02,-0.81, 0.71, 0.00, 0.00,
     3       2.37,-1.01,-3.17, 0.00, 1.41, 0.00,
     4       0.00,-4.46, 0.86, 0.38, 0.00, 0.00,
     5      -1.83, 0.67, 0.00,-2.26, 1.67, 0.00,
     5      -1.83, 0.67, 0.00,-2.26, 1.67, 0.00/
      DATA PRAT/0.795 ,0.694, 0.339, 0.172, 0.110, 0.000,
     1          0.558, 0.421, 0.278, 0.172, 0.110, 0.000,
     2          0.776, 0.342, 0.263, 0.100, 0.000, 0.000,
     3          0.787, 0.375, 0.294, 0.145, 0.107, 0.000,
     4          0.876, 0.350, 0.185, 0.100, 0.000, 0.000,
     5          0.558, 0.421, 0.278, 0.172, 0.110, 0.000,
     5          0.558, 0.421, 0.278, 0.172, 0.110, 0.000/
      DATA PS/1013.01, 1013.01,1018.01,1010.01,1013.01,2*1013.01/
      DATA PMIN/110.99,152.99,117.79,124.99,110.29,2*152.99/
      DATA QCONST/3.25,4.0,4.0,4.0,4.0,2*4.0/
      CONST=10.0*8314.320/28.9644
      PR=P/PS(M)
      N=1
   15 IF (PR.GE.PRAT(N,M)) GO TO 20
      IF (P.LE.PMIN(M)) GO TO 25
      N=N+1
      GO TO 15
   20 ETA=A(N,M)+B(N,M)*LOG(PR)
      Q=CONST*(T/P)*QS(M)*PR**ETA
      GO TO 40
   25 Q=QCONST(M)
      GO TO 40
   40 RETURN
      END
