FORTRAN Generation
(/./ftp/cats/B/comets)

Conversion of standardized ReadMe file for file /./ftp/cats/B/comets into FORTRAN code for reading data files line by line.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2018-Apr-23
C=============================================================================
*  This code was generated from the ReadMe file documenting a catalogue
*  according to the "Standard for Documentation of Astronomical Catalogues"
*  currently in use by the Astronomical Data Centers (CDS, ADC, A&A)
*  (see full documentation at URL http://vizier.u-strasbg.fr/doc/catstd.htx)
*  Please report problems or questions to   
C=============================================================================

      implicit none
*  Unspecified or NULL values, generally corresponding to blank columns,
*  are assigned one of the following special values:
*     rNULL__    for unknown or NULL floating-point values
*     iNULL__    for unknown or NULL   integer      values
      real*4     rNULL__
      integer*4  iNULL__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. B/comets            Database of the orbital elements of comets   (Rocher, 2007)
*================================================================================
*Database of the orbital elements of comets
*     Rocher P.
*    <IMCCE - Paris Observatoire (2007)>
*    =2010yCat....102021R
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'comets.dat'	! The catalog of Comets (2017-12-10)

      integer*4 nr__
      parameter (nr__=1321)	! Number of records
      character*521 ar__   	! Full-size record

      integer*4     Cnote       ! Number of the associated "Note Cometaire" (1)
      character*10  Udate       ! ("DD/MM/YYYY") Date of "Note Cometaire" update
      character*12  Code        ! IAU code for the comet
      character*28  Name        ! IAU Name of the comet
      character*9   OrbName     ! Orbit Computer name
      real*8        Elem        ! (d) Epoch of the computed elements (JD)
      integer*4     n_Elem      ! [0,1] relativistic effects (5)
      integer*4     Nobs        ! Number of observations used in solution (6)
      real*4        resid       ! (arcsec) r.m.s. residual (6)
      character*10  Date0       ! ("DD/MM/YYYY") Date of first observation (6)
      character*10  Date1       ! ("DD/MM/YYYY") Date of last observation (6)
      real*4        X0          ! (AU) X coordinate of position vector (2)
      real*4        Y0          ! (AU) Y coordinate of position vector (2)
      real*4        Z0          ! (AU) Z coordinate of position vector (2)
      real*4        Xdot        ! (AU/d) X-component of Velocity vector (2)
      real*4        Ydot        ! (AU/d) Y-component of Velocity vector (2)
      real*4        Zdot        ! (AU/d) Z-component of Velocity vector (2)
      real*4        A1          ! (AU/d2) X-component of non-gravitational forces (2)
      real*4        A2          ! (AU/d2) Y-component of non-gravitational forces (2)
      real*4        A3          ! (AU/d2) Z-component of non-gravitational forces (2)
      real*4        T0          ! (d) Date of perihelion (3)
      real*4        q           ! (AU) Perihelion distance (3)
      real*4        e           ! Orbit eccentricity (3)
      real*4        omega       ! (deg) Argument of perihelion (3)
      real*4        Omega_1     ! (deg) Longitude of orbital node (3)
      real*4        i           ! (deg) Inclination of the orbit (3)
      real*4        H1          ! (mag) Constant term for magnitude (4)
      real*4        R1          ! (mag) Term in log(r) for magnitude (4)
      real*4        D1          ! (mag) Term in log(D) for magnitude (4)
      real*4        H2          ! (mag) Constant term for magnitude of nucleus (4)
      real*4        R2          ! (mag) Term in log(r) for magnitude of nucleus (4)
      real*4        D2          ! (mag) Term in log(D) for magnitude of nucleus (4)
*Note (1): the "Notes Cometaires" are available from
*     http://www.imcce.fr/en/ephemerides/donnees/comets/
*Note (2): elements given in the Heliocentric Equatorial J2000 frame
*Note (3): osculating elements are given in the
*     Heliocentric Ecliptic J2000 frame.
*Note (4): the apparent magnitude of the comet (of the cometary nucleus)
*     are computed with the formula
*      m = H1 + R1 log(r) + D1 log(D)
*     where H1, R1, D1 are the parameters given in the table,
*           r is the distance (in AU) Sun-Comet, and
*           D is the distance (in AU) Earth-Comet.
*     A special formula has to be used for the comet P/Encke:
*      m = 9.8 + 5log(D) + 2.5(r^1.8^-1)
*Note (5): this flag is set to '1' when the relativistic forces have been
*     taken into account in the computations.
*Note (6): parameter added from version of 06-Sep-2010

C=============================================================================

C  Loading file 'comets.dat'	! The catalog of Comets (2017-12-10)

C  Format for file interpretation

    1 format(
     +  1X,I4,1X,A10,1X,A12,9X,A28,3X,A9,1X,F9.1,1X,I1,1X,I6,1X,F5.2,
     +  1X,A10,1X,A10,1X,E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,
     +  E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,
     +  E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,E23.15,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'comets.dat')
      write(6,*) '....Loading file: comets.dat'
      do i__=1,1321
        read(1,'(A521)')ar__
        read(ar__,1)
     +  Cnote,Udate,Code,Name,OrbName,Elem,n_Elem,Nobs,resid,Date0,
     +  Date1,X0,Y0,Z0,Xdot,Ydot,Zdot,A1,A2,A3,T0,q,e,omega,Omega_1,i,
     +  H1,R1,D1,H2,R2,D2
c    ..............Just test output...........
        write(6,1)
     +  Cnote,Udate,Code,Name,OrbName,Elem,n_Elem,Nobs,resid,Date0,
     +  Date1,X0,Y0,Z0,Xdot,Ydot,Zdot,A1,A2,A3,T0,q,e,omega,Omega_1,i,
     +  H1,R1,D1,H2,R2,D2
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end