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

Conversion of standardized ReadMe file for file /./ftp/cats/B/comets into FORTRAN code for loading all data files into arrays.

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-Sep-22
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 (2018-09-20)

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

      integer*4     Cnote      (nr__) ! Number of the associated "Note Cometaire" (1)
      character*10  Udate      (nr__) ! ("DD/MM/YYYY") Date of "Note Cometaire" update
      character*12  Code       (nr__) ! IAU code for the comet
      character*28  Name       (nr__) ! IAU Name of the comet
      character*9   OrbName    (nr__) ! Orbit Computer name
      real*8        Elem       (nr__) ! (d) Epoch of the computed elements (JD)
      integer*4     n_Elem     (nr__) ! [0,1] relativistic effects (5)
      integer*4     Nobs       (nr__) ! Number of observations used in solution (6)
      real*4        resid      (nr__) ! (arcsec) r.m.s. residual (6)
      character*10  Date0      (nr__) ! ("DD/MM/YYYY") Date of first observation (6)
      character*10  Date1      (nr__) ! ("DD/MM/YYYY") Date of last observation (6)
      real*4        X0         (nr__) ! (AU) X coordinate of position vector (2)
      real*4        Y0         (nr__) ! (AU) Y coordinate of position vector (2)
      real*4        Z0         (nr__) ! (AU) Z coordinate of position vector (2)
      real*4        Xdot       (nr__) ! (AU/d) X-component of Velocity vector (2)
      real*4        Ydot       (nr__) ! (AU/d) Y-component of Velocity vector (2)
      real*4        Zdot       (nr__) ! (AU/d) Z-component of Velocity vector (2)
      real*4        A1         (nr__) ! (AU/d2) X-component of non-gravitational forces (2)
      real*4        A2         (nr__) ! (AU/d2) Y-component of non-gravitational forces (2)
      real*4        A3         (nr__) ! (AU/d2) Z-component of non-gravitational forces (2)
      real*4        T0         (nr__) ! (d) Date of perihelion (3)
      real*4        q          (nr__) ! (AU) Perihelion distance (3)
      real*4        e          (nr__) ! Orbit eccentricity (3)
      real*4        omega      (nr__) ! (deg) Argument of perihelion (3)
      real*4        Omega_1    (nr__) ! (deg) Longitude of orbital node (3)
      real*4        i          (nr__) ! (deg) Inclination of the orbit (3)
      real*4        H1         (nr__) ! (mag) Constant term for magnitude (4)
      real*4        R1         (nr__) ! (mag) Term in log(r) for magnitude (4)
      real*4        D1         (nr__) ! (mag) Term in log(D) for magnitude (4)
      real*4        H2         (nr__) ! (mag) Constant term for magnitude of nucleus (4)
      real*4        R2         (nr__) ! (mag) Term in log(r) for magnitude of nucleus (4)
      real*4        D2         (nr__) ! (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 (2018-09-20)

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,1353
        read(1,'(A521)')ar__
        read(ar__,1)
     +  Cnote(i__),Udate(i__),Code(i__),Name(i__),OrbName(i__),
     +  Elem(i__),n_Elem(i__),Nobs(i__),resid(i__),Date0(i__),
     +  Date1(i__),X0(i__),Y0(i__),Z0(i__),Xdot(i__),Ydot(i__),
     +  Zdot(i__),A1(i__),A2(i__),A3(i__),T0(i__),q(i__),e(i__),
     +  omega(i__),Omega_1(i__),i(i__),H1(i__),R1(i__),D1(i__),
     +  H2(i__),R2(i__),D2(i__)
c    ..............Just test output...........
        write(6,1)
     +  Cnote(i__),Udate(i__),Code(i__),Name(i__),OrbName(i__),
     +  Elem(i__),n_Elem(i__),Nobs(i__),resid(i__),Date0(i__),
     +  Date1(i__),X0(i__),Y0(i__),Z0(i__),Xdot(i__),Ydot(i__),
     +  Zdot(i__),A1(i__),A2(i__),A3(i__),T0(i__),q(i__),e(i__),
     +  omega(i__),Omega_1(i__),i(i__),H1(i__),R1(i__),D1(i__),
     +  H2(i__),R2(i__),D2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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