c=======================================================================

      subroutine o4cont(wl,sigo4) 1
c
c radiative cross-sections of o2 * o2 and o2 * n2 molecular complex
c
c input:
c  wl      wavelength in microns
c 
c output
c
c  sigo4   cross-section in km-1 
c          the optical depth across a layer due to o2*o2 and o2*n2
c          process is given by tau= sigo4*ff(z)*dz 
c
c          where ff(z)  = ((p(z)/pzero)*(tzero/t(z)))**2
c
c
c where the volume fractions of o2 and n2 have already been included in
c the sigo4 parameter.  The O2*N2 contribution is only included in the
c 1.26um band.  In this band (1.2-1.35um) a collisional efficiency of
c 0.2 of N2 * O2 comparaed to O2 * O2 is used.  Solomon et al. (1998)
c use a collisional efficiency of .1 to .3 compared to O2 this is the
c colored region in the figure).

c
c collisional efficiency of 0.1 is from Cho et al., 1963
c collisional efficiency of 0.3 is from Badger et al., 1965
c

      parameter (fraco2=.209)   ! volume fraction of o2
      parameter (fracn2=.781)   ! volume fraction of n2
      parameter (effn2=.2)      ! efficiency factor for n2 * o2
                                ! compared to o2 * o2 collisions
      dimension sig(1016)

c the strength of o2*o2 (and o2*n2) continuum absorption can be
c modified by calling o4cfac with a correction factor other than 1.0
c o4cfac is an entry point contained within this subroutine.

      save xfac

      data xfac/1.0/

c o2*o2 cross-section for wavelength 335 to 1350 nm by 1 nm increments
c in units of km-1 loschmidt-2

      data (sig(i),i=1,100)/
     &   1.629e-03, 1.514e-03, 1.778e-03, 1.968e-03, 2.328e-03,
     &   3.308e-03, 5.013e-03, 7.222e-03, 8.699e-03, 7.791e-03,
     &   4.242e-03, 2.248e-03, 1.465e-03, 1.254e-03, 1.440e-03,
     &   1.658e-03, 2.137e-03, 2.743e-03, 3.510e-03, 4.703e-03,
     &   6.922e-03, 1.021e-02, 1.577e-02, 2.231e-02, 2.757e-02,
     &   2.889e-02, 2.148e-02, 1.135e-02, 5.251e-03, 2.520e-03,
     &   1.262e-03, 6.393e-04, 5.156e-04, 4.372e-04, 3.836e-04,
     &   4.187e-04, 4.413e-04, 4.661e-04, 5.012e-04, 8.247e-04,
     &   1.538e-03, 3.139e-03, 6.278e-03, 1.135e-02, 1.561e-02,
     &   1.658e-02, 1.277e-02, 7.392e-03, 3.853e-03, 1.906e-03,
     &   9.322e-04, 5.259e-04, 3.630e-04, 3.300e-04, 2.867e-04,
     &   2.268e-04, 2.145e-04, 1.670e-04, 1.073e-04, 6.600e-05,
     &   6.601e-05, 4.132e-06, 2.063e-05, 4.743e-05, 6.600e-05,
     &   2.142e-04, 2.331e-04, 2.310e-04, 2.226e-04, 2.142e-04,
     &   2.561e-04, 2.435e-04, 2.057e-04, 1.637e-04, 1.428e-04,
     &   1.344e-04, 1.469e-04, 1.973e-04, 1.763e-04, 2.015e-04,
     &   1.931e-04, 2.687e-04, 3.485e-04, 3.947e-04, 4.808e-04,
     &   5.647e-04, 5.857e-04, 5.500e-04, 4.829e-04, 4.115e-04,
     &   4.492e-04, 4.955e-04, 5.332e-04, 5.500e-04, 5.542e-04,
     &   5.962e-04, 6.046e-04, 6.298e-04, 6.550e-04, 6.634e-04/
      data (sig(i),i=101,200)/
     &   6.760e-04, 7.136e-04, 7.727e-04, 8.610e-04, 9.237e-04,
     &   1.092e-03, 1.306e-03, 1.610e-03, 1.999e-03, 2.479e-03,
     &   3.120e-03, 4.001e-03, 4.295e-03, 3.604e-03, 2.606e-03,
     &   1.772e-03, 1.222e-03, 9.066e-04, 7.435e-04, 6.970e-04,
     &   6.508e-04, 7.136e-04, 6.550e-04, 6.298e-04, 7.222e-04,
     &   7.852e-04, 8.482e-04, 9.992e-04, 1.209e-03, 1.469e-03,
     &   1.818e-03, 2.288e-03, 2.945e-03, 3.846e-03, 5.248e-03,
     &   7.243e-03, 9.928e-03, 1.310e-02, 1.686e-02, 2.128e-02,
     &   2.820e-02, 3.765e-02, 4.482e-02, 4.162e-02, 3.307e-02,
     &   2.325e-02, 1.544e-02, 9.686e-03, 5.672e-03, 3.271e-03,
     &   1.881e-03, 1.092e-03, 7.054e-04, 5.668e-04, 5.290e-04,
     &   5.248e-04, 5.165e-04, 5.878e-04, 6.172e-04, 7.642e-04,
     &   8.379e-04, 7.873e-04, 6.319e-04, 4.618e-04, 4.031e-04,
     &   3.312e-04, 3.525e-04, 3.142e-04, 2.506e-04, 2.505e-04,
     &   3.312e-04, 4.161e-04, 4.798e-04, 4.883e-04, 5.138e-04,
     &   6.242e-04, 7.385e-04, 8.368e-04, 9.088e-04, 9.935e-04,
     &   1.070e-03, 1.155e-03, 1.299e-03, 1.465e-03, 1.630e-03,
     &   1.770e-03, 2.046e-03, 2.526e-03, 3.407e-03, 4.204e-03,
     &   5.209e-03, 5.790e-03, 6.583e-03, 7.392e-03, 8.176e-03,
     &   8.867e-03, 9.486e-03, 9.793e-03, 9.771e-03, 8.860e-03/
      data (sig(i),i=201,300)/
     &   7.385e-03, 6.021e-03, 4.993e-03, 4.333e-03, 3.864e-03,
     &   3.562e-03, 3.312e-03, 3.155e-03, 3.062e-03, 3.057e-03,
     &   3.064e-03, 3.108e-03, 3.076e-03, 3.087e-03, 3.087e-03,
     &   3.108e-03, 3.270e-03, 3.376e-03, 3.605e-03, 3.876e-03,
     &   4.161e-03, 4.480e-03, 4.983e-03, 5.545e-03, 6.212e-03,
     &   7.165e-03, 8.375e-03, 9.835e-03, 1.157e-02, 1.371e-02,
     &   1.656e-02, 2.000e-02, 2.389e-02, 2.879e-02, 3.468e-02,
     &   4.097e-02, 4.793e-02, 5.485e-02, 6.183e-02, 6.747e-02,
     &   7.246e-02, 7.610e-02, 7.798e-02, 7.741e-02, 7.157e-02,
     &   5.942e-02, 4.494e-02, 3.408e-02, 2.577e-02, 1.958e-02,
     &   1.469e-02, 1.107e-02, 8.276e-03, 6.199e-03, 4.696e-03,
     &   3.562e-03, 2.667e-03, 2.046e-03, 1.660e-03, 1.420e-03,
     &   1.308e-03, 1.240e-03, 1.223e-03, 1.223e-03, 1.227e-03,
     &   1.355e-03, 1.470e-03, 1.559e-03, 1.708e-03, 1.810e-03,
     &   1.950e-03, 2.379e-03, 2.932e-03, 3.176e-03, 3.611e-03,
     &   4.036e-03, 4.673e-03, 5.417e-03, 6.331e-03, 7.400e-03,
     &   8.454e-03, 9.700e-03, 1.124e-02, 1.308e-02, 1.538e-02,
     &   1.794e-02, 2.098e-02, 2.450e-02, 2.885e-02, 3.305e-02,
     &   3.751e-02, 4.163e-02, 4.562e-02, 4.862e-02, 5.059e-02,
     &   5.112e-02, 5.071e-02, 4.858e-02, 4.496e-02, 4.035e-02/
      data (sig(i),i=301,400)/
     &   3.510e-02, 2.993e-02, 2.491e-02, 2.077e-02, 1.699e-02,
     &   1.368e-02, 1.059e-02, 8.098e-03, 6.182e-03, 4.686e-03,
     &   3.527e-03, 2.585e-03, 1.920e-03, 1.461e-03, 1.147e-03,
     &   9.009e-04, 7.264e-04, 5.651e-04, 4.291e-04, 3.059e-04,
     &   1.869e-04, 8.069e-05, 3.399e-04, 3.781e-04, 3.803e-04,
     &   2.740e-04, 1.487e-04, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00/
      data (sig(i),i=401,500)/100*0./
      data (sig(i),i=501,600)/100*0./
      data (sig(i),i=601,700)/
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
     &   0.000e+00, 3.856e-04, 4.152e-04, 4.873e-04, 6.440e-04,
     &   7.585e-04, 9.614e-04, 1.110e-03, 1.389e-03, 1.604e-03,
     &   1.915e-03, 2.169e-03, 2.366e-03, 2.680e-03, 2.904e-03,
     &   3.216e-03, 3.485e-03, 3.936e-03, 4.402e-03, 4.898e-03,
     &   5.292e-03, 5.885e-03, 6.376e-03, 7.093e-03, 7.692e-03,
     &   8.397e-03, 9.116e-03, 1.002e-02, 1.090e-02, 1.193e-02/
      data (sig(i),i=701,800)/
     &   1.298e-02, 1.394e-02, 1.513e-02, 1.620e-02, 1.746e-02,
     &   1.880e-02, 2.046e-02, 2.200e-02, 2.347e-02, 2.516e-02,
     &   2.703e-02, 2.872e-02, 3.090e-02, 3.312e-02, 3.547e-02,
     &   3.829e-02, 4.120e-02, 4.441e-02, 4.798e-02, 5.221e-02,
     &   5.628e-02, 6.090e-02, 6.519e-02, 6.978e-02, 7.357e-02,
     &   7.699e-02, 7.934e-02, 8.133e-02, 8.311e-02, 8.479e-02,
     &   8.532e-02, 8.525e-02, 8.368e-02, 8.105e-02, 7.656e-02,
     &   7.211e-02, 6.772e-02, 6.382e-02, 5.976e-02, 5.551e-02,
     &   5.163e-02, 4.797e-02, 4.445e-02, 4.119e-02, 3.795e-02,
     &   3.539e-02, 3.286e-02, 3.062e-02, 2.823e-02, 2.623e-02,
     &   2.438e-02, 2.258e-02, 2.102e-02, 1.946e-02, 1.811e-02,
     &   1.669e-02, 1.542e-02, 1.383e-02, 1.297e-02, 1.212e-02,
     &   1.135e-02, 1.078e-02, 9.703e-03, 8.981e-03, 7.984e-03,
     &   7.335e-03, 6.876e-03, 5.910e-03, 5.756e-03, 5.756e-03,
     &   5.211e-03, 4.707e-03, 4.176e-03, 3.589e-03, 3.347e-03,
     &   2.909e-03, 2.461e-03, 2.072e-03, 2.260e-03, 2.118e-03,
     &   2.042e-03, 1.796e-03, 2.025e-03, 1.483e-03, 1.550e-03,
     &   1.047e-03, 8.005e-04, 7.918e-04, 1.038e-03, 9.066e-04,
     &   6.864e-04, 8.303e-04, 3.433e-04, 7.118e-04, 3.685e-04,
     &   2.225e-04, 1.950e-04, 1.694e-04, 0.000e+00, 3.816e-05/
      data (sig(i),i=801,900)/
     &   0.000e+00, 0.000e+00, 8.448e-05, 8.314e-05, 8.179e-05,
     &   8.047e-05, 7.912e-05, 7.778e-05, 7.643e-05, 7.509e-05,
     &   7.376e-05, 7.242e-05, 7.107e-05, 6.973e-05, 6.838e-05,
     &   6.706e-05, 6.571e-05, 6.437e-05, 6.302e-05, 6.168e-05,
     &   6.033e-05, 5.901e-05, 5.767e-05, 5.632e-05, 5.498e-05,
     &   5.363e-05, 5.231e-05, 5.096e-05, 4.962e-05, 4.827e-05,
     &   4.693e-05, 4.560e-05, 4.426e-05, 4.291e-05, 4.157e-05,
     &   4.022e-05, 3.888e-05, 3.755e-05, 3.621e-05, 3.486e-05,
     &   3.352e-05, 3.217e-05, 3.085e-05, 2.951e-05, 2.816e-05,
     &   2.682e-05, 2.547e-05, 2.415e-05, 2.280e-05, 2.146e-05,
     &   2.011e-05, 1.877e-05, 1.744e-05, 1.610e-05, 1.475e-05,
     &   1.341e-05, 1.206e-05, 1.072e-05, 9.394e-06, 8.049e-06,
     &   6.704e-06, 5.359e-06, 4.014e-06, 2.690e-06, 1.345e-06,
     &   1.631e-07, 7.642e-04, 7.021e-04, 9.978e-04, 1.181e-03,
     &   1.376e-03, 1.540e-03, 1.945e-03, 2.219e-03, 2.785e-03,
     &   3.181e-03, 3.620e-03, 4.111e-03, 4.435e-03, 4.940e-03,
     &   5.498e-03, 5.845e-03, 6.406e-03, 6.792e-03, 7.535e-03,
     &   8.471e-03, 9.123e-03, 9.928e-03, 1.090e-02, 1.184e-02,
     &   1.273e-02, 1.382e-02, 1.504e-02, 1.614e-02, 1.745e-02,
     &   1.873e-02, 2.049e-02, 2.211e-02, 2.381e-02, 2.564e-02/
      data (sig(i),i=901,1000)/
     &   2.708e-02, 2.929e-02, 3.117e-02, 3.308e-02, 3.547e-02,
     &   3.795e-02, 4.085e-02, 4.368e-02, 4.584e-02, 4.911e-02,
     &   5.217e-02, 5.514e-02, 5.829e-02, 6.244e-02, 6.611e-02,
     &   7.059e-02, 7.524e-02, 8.019e-02, 8.511e-02, 9.144e-02,
     &   9.839e-02, 1.053e-01, 1.135e-01, 1.206e-01, 1.291e-01,
     &   1.364e-01, 1.437e-01, 1.502e-01, 1.553e-01, 1.592e-01,
     &   1.625e-01, 1.659e-01, 1.689e-01, 1.702e-01, 1.705e-01,
     &   1.692e-01, 1.657e-01, 1.593e-01, 1.517e-01, 1.439e-01,
     &   1.370e-01, 1.290e-01, 1.215e-01, 1.144e-01, 1.078e-01,
     &   1.006e-01, 9.426e-02, 8.862e-02, 8.332e-02, 7.684e-02,
     &   7.239e-02, 6.768e-02, 6.348e-02, 5.964e-02, 5.561e-02,
     &   5.205e-02, 4.867e-02, 4.585e-02, 4.268e-02, 4.010e-02,
     &   3.758e-02, 3.519e-02, 3.295e-02, 3.035e-02, 2.761e-02,
     &   2.599e-02, 2.470e-02, 2.290e-02, 2.144e-02, 1.951e-02,
     &   1.870e-02, 1.704e-02, 1.621e-02, 1.464e-02, 1.326e-02,
     &   1.290e-02, 1.173e-02, 1.145e-02, 1.100e-02, 9.337e-03,
     &   8.774e-03, 8.380e-03, 7.983e-03, 6.775e-03, 6.369e-03,
     &   5.582e-03, 4.838e-03, 4.415e-03, 4.322e-03, 3.789e-03,
     &   4.077e-03, 3.747e-03, 3.262e-03, 3.115e-03, 3.155e-03,
     &   2.567e-03, 2.656e-03, 1.878e-03, 1.418e-03, 1.919e-03/
      data (sig(i),i=1001,1016)/
     &   1.899e-03, 1.936e-03, 1.750e-03, 1.886e-03, 1.701e-03,
     &   7.949e-04, 4.906e-04, 4.434e-04, 1.006e-03, 5.243e-04,
     &   5.159e-04, 1.691e-04, 0.000e+00, 1.606e-04, 2.963e-05,
     &   0.000e+00/
c
      wnm=1000.*wl
      inm=wnm
      f=wnm-inm
      inm=inm-335+1
      sigo4=0.
      if(inm.ge.1.and.inm.le.1015) then 
        factor=fraco2**2
        if(wl.gt.1.2) factor=fraco2*(fraco2+effn2*fracn2)
        sigo4=xfac*factor*(sig(inm)*(1.-f)+sig(inm+1)*f)
        !write(*,*) 'wl,wnm,inm,f,sig(inm),sig(inm+1),sigo4'
        !write(*,*) wl,wnm,inm,f,sig(inm),sig(inm+1),sigo4
      endif
      return
c
      entry o4cfac(xf)
      xfac=xf
      return

      end