      SUBROUTINE OZONE(L,P,T,R)
C    L=NO. OF PROFILE;P=USER PRESSURE;R=OUTPUT O3 MIXING RATIO
C
C  TO MAKE PGM FLOW,WE ASSUME US STD ATM=SUBTROPICAL SUMMER IN
C  WATER AND OZONE
      implicit real(selected_real_kind(15)) (a-h,o-z)
      DIMENSION O3MAC(33,7),PMAC(33,7)
      DIMENSION O3MAC1(33),O3MAC2(33),O3MAC3(33),O3MAC4(33),O3MAC5(33),
     1 O3MAC6(33),O3MAC7(33)
      DIMENSION PMAC1(33),PMAC2(33),PMAC3(33),PMAC4(33),PMAC5(33),
     1 PMAC6(33),PMAC7(33)
      EQUIVALENCE (O3MAC1(1),O3MAC(1,1)),(O3MAC2(1),O3MAC(1,2))
      EQUIVALENCE (O3MAC3(1),O3MAC(1,3)),(O3MAC4(1),O3MAC(1,4))
      EQUIVALENCE (O3MAC5(1),O3MAC(1,5)),(PMAC1(1),PMAC(1,1))
      EQUIVALENCE (PMAC2(1),PMAC(1,2)),(PMAC3(1),PMAC(1,3))
      EQUIVALENCE (PMAC4(1),PMAC(1,4)),(PMAC5(1),PMAC(1,5))
      EQUIVALENCE (O3MAC6(1),O3MAC(1,6)),(PMAC6(1),PMAC(1,6))
      EQUIVALENCE (O3MAC7(1),O3MAC(1,7)),(PMAC7(1),PMAC(1,7))
C    O3MAC=MC CLATCHY OZONE MIXING RATIO;P=MC CLARTCHY PRESSURESQQ
      DATA O3MAC1/
     1 5.6E-5,5.6E-5,5.4E-5,5.1E-5,4.7E-5,4.5E-5,4.3E-5,4.1E-5,3.9E-5,
     2 3.9E-5,3.9E-5,4.1E-5,4.3E-5,4.5E-5,4.5E-5,4.7E-5,4.7E-5,6.9E-5,
     3 9.0E-5,1.4E-4,1.9E-4,2.4E-4,2.8E-4,3.2E-4,3.4E-4,3.4E-4,2.4E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC2/
     1 6.0E-5,6.0E-5,6.0E-5,6.2E-5,6.4E-5,6.6E-5,6.9E-5,7.5E-5,7.9E-5,
     2 8.6E-5,9.0E-5,1.1E-4,1.2E-4,1.5E-4,1.8E-4,1.9E-4,2.1E-4,2.4E-4,
     3 2.8E-4,3.2E-4,3.4E-4,3.6E-4,3.6E-4,3.4E-4,3.2E-4,3.0E-4,2.0E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC3/
     1 6.0E-5,5.4E-5,4.9E-5,4.9E-5,4.9E-5,5.8E-5,6.4E-5,7.7E-5,9.0E-5,
     2 1.2E-4,1.6E-4,2.1E-4,2.6E-4,3.0E-4,3.2E-4,3.4E-4,3.6E-4,3.9E-4,
     3 4.1E-4,4.3E-4,4.5E-4,4.3E-4,4.3E-4,3.9E-4,3.6E-4,3.4E-4,1.9E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC4/
     1 4.9E-5,5.4E-5,5.6E-5,5.8E-5,6.0E-5,6.4E-5,7.1E-5,7.5E-5,7.9E-5,
     2 1.1E-4,1.3E-4,1.8E-4,2.1E-4,2.6E-4,2.8E-4,3.2E-4,3.4E-4,3.9E-4,
     3 4.1E-4,4.1E-4,3.9E-4,3.6E-4,3.2E-4,3.0E-4,2.8E-4,2.6E-4,1.4E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC5/
     1 4.1E-5,4.1E-5,4.1E-5,4.3E-5,4.5E-5,4.7E-5,4.9E-5,7.1E-5,9.0E-5,
     2 1.6E-4,2.4E-4,3.2E-4,4.3E-4,4.7E-4,4.9E-4,5.6E-4,6.2E-4,6.2E-4,
     3 6.2E-4,6.0E-4,5.6E-4,5.1E-4,4.7E-4,4.3E-4,3.6E-4,3.2E-4,1.5E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC6/
     1 6.0E-5,6.0E-5,6.0E-5,6.2E-5,6.4E-5,6.6E-5,6.9E-5,7.5E-5,7.9E-5,
     2 8.6E-5,9.0E-5,1.1E-4,1.2E-4,1.5E-4,1.8E-4,1.9E-4,2.1E-4,2.4E-4,
     3 2.8E-4,3.2E-4,3.4E-4,3.6E-4,3.6E-4,3.4E-4,3.2E-4,3.0E-4,2.0E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA O3MAC7/
     1 6.0E-5,6.0E-5,6.0E-5,6.2E-5,6.4E-5,6.6E-5,6.9E-5,7.5E-5,7.9E-5,
     2 8.6E-5,9.0E-5,1.1E-4,1.2E-4,1.5E-4,1.8E-4,1.9E-4,2.1E-4,2.4E-4,
     3 2.8E-4,3.2E-4,3.4E-4,3.6E-4,3.6E-4,3.4E-4,3.2E-4,3.0E-4,2.0E-4,
     4 9.2E-5,4.1E-5,1.3E-5,4.3E-6,8.6E-8,4.3E-11
     5             /
      DATA PMAC1/
     1 1.013E+3,9.040E+2,8.050E+2,7.150E+2,6.330E+2,5.590E+2,4.920E+2,
     2 4.320E+2,3.780E+2,3.290E+2,2.860E+2,2.470E+2,2.130E+2,1.820E+2,
     3 1.560E+2,1.320E+2,1.110E+2,9.370E+1,7.890E+1,6.660E+1,5.650E+1,
     4 4.800E+1,4.090E+1,3.500E+1,3.000E+1,2.570E+1,1.220E+1,6.000E+0,
     5 3.050E+0,1.590E+0,8.540E-1,5.790E-2,3.000E-4/
      DATA PMAC2/
     1 1.013E+3,9.020E+2,8.020E+2,7.100E+2,6.280E+2,5.540E+2,4.870E+2,
     2 4.260E+2,3.720E+2,3.240E+2,2.810E+2,2.430E+2,2.090E+2,1.790E+2,
     3 1.530E+2,1.300E+2,1.110E+2,9.500E+1,8.120E+1,6.950E+1,5.950E+1,
     4 5.100E+1,4.370E+1,3.760E+1,3.220E+1,2.770E+1,1.320E+1,6.520E+0,
     5 3.330E+0,1.760E+0,9.510E-1,6.710E-2,3.000E-4/
      DATA PMAC3/
     1 1.018E+3,8.973E+2,7.897E+2,6.938E+2,6.081E+2,5.313E+2,4.627E+2,
     2 4.016E+2,3.473E+2,2.992E+2,2.568E+2,2.199E+2,1.882E+2,1.610E+2,
     3 1.378E+2,1.178E+2,1.007E+2,8.610E+1,7.350E+1,6.280E+1,5.370E+1,
     4 4.580E+1,3.910E+1,3.340E+1,2.860E+1,2.430E+1,1.110E+1,5.180E+0,
     5 2.530E+0,1.290E+0,6.820E-1,4.670E-2,3.000E-4/
      DATA PMAC4/
     1 1.010E+3,8.960E+2,7.929E+2,7.000E+2,6.160E+2,5.410E+2,4.730E+2,
     2 4.130E+2,3.590E+2,3.107E+2,2.677E+2,2.300E+2,1.977E+2,1.700E+2,
     3 1.460E+2,1.250E+2,1.080E+2,9.280E+1,7.980E+1,6.860E+1,5.890E+1,
     4 5.070E+1,4.360E+1,3.750E+1,3.227E+1,2.780E+1,1.340E+1,6.610E+0,
     5 3.400E+0,1.810E+0,9.870E-1,7.070E-2,3.000E-4/
      DATA PMAC5/
     1 1.013E+3,8.878E+2,7.775E+2,6.798E+2,5.932E+2,5.158E+2,4.467E+2,
     2 3.853E+2,3.308E+2,2.829E+2,2.418E+2,2.067E+2,1.766E+2,1.510E+2,
     3 1.291E+2,1.103E+2,9.431E+1,8.058E+1,6.882E+1,5.875E+1,5.014E+1,
     4 4.277E+1,3.647E+1,3.109E+1,2.649E+1,2.256E+1,1.020E+1,4.701E+0,
     5 2.243E+0,1.113E+0,5.719E-1,4.016E-2,3.000E-4/
      DATA PMAC6/
     1 1.013E+3,9.020E+2,8.020E+2,7.100E+2,6.280E+2,5.540E+2,4.870E+2,
     2 4.260E+2,3.720E+2,3.240E+2,2.810E+2,2.430E+2,2.090E+2,1.790E+2,
     3 1.530E+2,1.300E+2,1.110E+2,9.500E+1,8.120E+1,6.950E+1,5.950E+1,
     4 5.100E+1,4.370E+1,3.760E+1,3.220E+1,2.770E+1,1.320E+1,6.520E+0,
     5 3.330E+0,1.760E+0,9.510E-1,6.710E-2,3.000E-4/
      DATA PMAC7/
     1 1.013E+3,9.020E+2,8.020E+2,7.100E+2,6.280E+2,5.540E+2,4.870E+2,
     2 4.260E+2,3.720E+2,3.240E+2,2.810E+2,2.430E+2,2.090E+2,1.790E+2,
     3 1.530E+2,1.300E+2,1.110E+2,9.500E+1,8.120E+1,6.950E+1,5.950E+1,
     4 5.100E+1,4.370E+1,3.760E+1,3.220E+1,2.770E+1,1.320E+1,6.520E+0,
     5 3.330E+0,1.760E+0,9.510E-1,6.710E-2,3.000E-4/
C     THE USER'S PRESSURES ARE IN MB FOR THIS PGM.
         DO 10 I=1,33
         II=I
         IF (P.GT.PMAC(I,L)) GO TO 20
10       CONTINUE
20       CONTINUE
      IF (II.EQ.1) II=2
         W1=(PMAC(II-1,L)-P)/(PMAC(II-1,L)-PMAC(II,L))
         W2=(P-PMAC(II,L))/(PMAC(II-1,L)-PMAC(II,L))
         QO3=O3MAC(II,L)*W1+O3MAC(II-1,L)*W2
C RO3=QO3(IN GM/M**3)/DENSITY OF AIR(IN GM/M**3);HENCE THE 10**9
         R=QO3*8.31432E7*T/(1.0E9*P*28.9644)
      RETURN
      END
