OHCOM.FTN
FTN77 
$FILES 0,1
      program OHCOM 
******************* 
*     predict comet OH line strength, based on Schloerb & Gerard 1985.
* 
      integer*4 jd
      character filename*20 
      logical noend 
      real   coeff(4), inversion
      data noend / .true. /, Tbg / 3.5 /,  ipoly / 3 /, 
     *     coeff / 123.905, -126.953, 48.428, -6.76557 /
* 
      write (1,*) 'OHCOM : Prediction source file ? _'
      read  (1,'(a)') filename
      open  (10,file=filename)
      write (1,*) 'date       delta   r    i   flux (mJy) T ant (mK)' 
      do while (noend)
*         read the julian date, sun comet distance in AU, 
*         earth comet distance in AU, and inversion 
  100     read  (10,*,end=999,err=100) jd, delta, r, inversion
*         OH lifetime 
          TAUoh = 1e5 * r * r 
*         OH production - 75% of H2O production from Halley 
*         factor of 1e28 included in flux exponent
          Qoh = 0.0 
          do i = ipoly +1, 2, -1
              Qoh = r * (coeff(i) + Qoh)
          end do
          Qoh = (Qoh + coeff(1)) * 0.75 
*         Total OH content
          gamma = Qoh * TAUoh 
*         OH 1667 MHz flux density in mJy 
          flux = 1.067e-4  * inversion * gamma * Tbg / delta / delta
*         line antenna temperature at 13 Jy / K, in mK
          Tant = flux / 13.0
          write (1,1001) jd, delta, r, inversion, flux, tant
 1001     format (i8,f8.4,f8.4,f8.3,i8,i8)
      end do
  999 stop 'OHCOM done' 
      end 
