FORTRAN Generation
(/./ftp/cats/J/A_A/442/365)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/442/365 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 2024-Mar-29
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. J/A+A/442/365       Astrometric orbits of SB9 stars      (Jancart+, 2005)
*================================================================================
*Astrometric orbits of SB9 stars.
*    Jancart S., Jorissen A., Babusiaux C., Pourbaix D.
*   <Astron. Astrophys., 442, 365-380 (2005)>
*   =2005A&A...442..365J
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! The 282 stars flagged as astrometric binaries
                              (Pr1, Pr2, Pr3<0.05 and F2_TI_<2.37)

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

      integer*4     HIP         ! HIP (Cat. <I/239>) number
      character*1   n_HIP       ! [f] f for stars passing the Pr1, Pr2 and Pr3 tests
*                             at the more stringent 0.006% level, and F2_TI_<2.37

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

C  Declarations for 'table3.dat'	! The 70 orbital solutions (Campbell solutions)
                              passing all consistency tests.

      integer*4 nr__1
      parameter (nr__1=70)	! Number of records
      character*90 ar__1  	! Full-size record

      integer*4     HIP_1       ! HIP (Cat. <I/239>) number
      real*4        a0          ! (mas) Relative semi-major axis
      real*4        e_a0        ! (mas) rms uncertainty on a0
      real*4        e           ! Eccentricity
      real*4        incl        ! (deg) Inclination
      real*4        e_incl      ! (deg) rms uncertainty on incl
      real*4        omega1      ! (deg) Argument of the periastron
      real*4        OMEGA       ! (deg) Latitude of the ascending node
      real*4        e_OMEGA     ! (deg) rms uncertainty on OMEGA
      real*8        T0          ! (d) HJD of origin
      real*4        Per         ! (d) Period
      character*1   DMSA        ! DMSA system type (from HIP), O=orbital solution
      real*4        a_ahip      ! ? Orbital semi-major axes ratio,
*                                   DMSA/O annex/this work
      real*4        i_ihip      ! ? Inclinations ratio, DMSA/O annex/this work
      integer*4     Ref         ! Reference for the spectroscopic orbit used

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

C  Declarations for 'table4.dat'	! The 31 new orbital solutions (Campbell solutions)
                             passing the Pr_1_, Pr_2_ and Pr_3_ tests at the
                             0.006% level, but failing at least one of the
                             consistency tests.

      integer*4 nr__2
      parameter (nr__2=31)	! Number of records
      character*91 ar__2  	! Full-size record

      integer*4     HIP_2       ! HIP (Cat. <I/239>) number
      real*4        a0_1        ! (mas) Relative semi-major axis
      real*8        e_a0_1      ! (mas) rms uncertainty on a0
      real*4        e_1         ! Eccentricity
      real*4        incl_1      ! (deg) Inclination
      real*4        e_incl_1    ! (deg) rms uncertainty on incl
      real*4        omega1_1    ! (deg) Argument of the periastron
      real*4        OMEGA_1     ! (deg) Latitude of the ascending node
      real*4        e_OMEGA_1   ! (deg) rms uncertainty on OMEGA
      real*8        T0_1        ! (d) HJD of origin
      real*8        Per_1       ! (d) Period
      character*1   DMSA_1      ! DMSA system type
      real*4        xi          ! Values of the corresponding empirical tests
      real*4        epsilon     ! Values of the corresponding empirical tests
      integer*4     Ref_1       ! Reference for the spectroscopic orbit used

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

C  Declarations for 'table5.dat'	! The 39 systems with a DMSA/O entry which do not
                             fulfill the 2 tests assessing the reliability
                             of the astrometric orbital elements, namely
                             {xi}<3 and {epsilon}>0.4 and the probability
                             tests at the 0.006% level (see text).

      integer*4 nr__3
      parameter (nr__3=39)	! Number of records
      character*117 ar__3  	! Full-size record

      integer*4     HIP_3       ! HIP (Cat. <I/239>) number
      character*1   xi_1        ! [y/n] {xi}<3 ? (1)
      character*1   epsilon_1   ! [y/n] {epsilon}>0.4 (1)
      character*1   Pr          ! [y/n] Probability tests at the 0.006% level (1)
      character*104 Rem         ! Remarks
*Note (1): n correspond to failed tests.

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

C  Declarations for 'table6.dat'	! Masses and mass ratios for the 29 systems with
                             main-sequence primaries passing all consistency
                             tests.

      integer*4 nr__4
      parameter (nr__4=29)	! Number of records
      character*97 ar__4  	! Full-size record

      integer*4     HIP_4       ! HIP (Cat. <I/239>) number
      real*4        M1          ! (solMass) ?=- Mass of the primary
      real*4        M2          ! (solMass) ?=- Mass of the secondary
      real*4        M2_M1       ! ?=- M2/M1 mass ratio
      real*4        Q           ! Q ratio, Q=(M_2_^3^)/((M_1_+M_2_)^2^)
      character*8   SpType      ! MK spectral type
      character*60  Rem_1       ! Remarks

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

C  Declarations for 'refs.dat'	! References

      integer*4 nr__5
      parameter (nr__5=66)	! Number of records
      character*80 ar__5  	! Full-size record

      integer*4     Ref_2       ! Reference number
      character*19  BibCode     ! BibCode
      character*20  Aut         ! Author's name
      character*36  Com         ! Comments

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

C  Loading file 'table1.dat'	! The 282 stars flagged as astrometric binaries
*                              (Pr1, Pr2, Pr3<0.05 and F2_TI_<2.37)

C  Format for file interpretation

    1 format(I6,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,282
        read(1,'(A8)')ar__
        read(ar__,1)HIP,n_HIP
c    ..............Just test output...........
        write(6,1)HIP,n_HIP
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! The 70 orbital solutions (Campbell solutions)
*                              passing all consistency tests.

C  Format for file interpretation

    2 format(
     +  I6,1X,F5.2,1X,F4.2,1X,F5.3,1X,F6.2,1X,F5.2,1X,F6.2,1X,F6.2,1X,
     +  F6.2,1X,F9.1,1X,F6.1,1X,A1,1X,F4.2,1X,F4.2,2X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,70
        read(1,'(A90)')ar__1
        read(ar__1,2)
     +  HIP_1,a0,e_a0,e,incl,e_incl,omega1,OMEGA,e_OMEGA,T0,Per,DMSA,
     +  a_ahip,i_ihip,Ref
        if(ar__1(78:81) .EQ. '') a_ahip = rNULL__
        if(ar__1(83:86) .EQ. '') i_ihip = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  HIP_1,a0,e_a0,e,incl,e_incl,omega1,OMEGA,e_OMEGA,T0,Per,DMSA,
     +  a_ahip,i_ihip,Ref
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! The 31 new orbital solutions (Campbell solutions)
*                             passing the Pr_1_, Pr_2_ and Pr_3_ tests at the
*                             0.006% level, but failing at least one of the
*                             consistency tests.

C  Format for file interpretation

    3 format(
     +  I6,1X,F6.2,1X,F8.2,1X,F4.2,1X,F5.1,1X,F4.1,1X,F5.1,2X,F5.1,1X,
     +  F4.1,2X,F9.1,1X,F7.1,2X,A1,1X,F4.2,1X,F4.2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,31
        read(1,'(A91)')ar__2
        read(ar__2,3)
     +  HIP_2,a0_1,e_a0_1,e_1,incl_1,e_incl_1,omega1_1,OMEGA_1,
     +  e_OMEGA_1,T0_1,Per_1,DMSA_1,xi,epsilon,Ref_1
c    ..............Just test output...........
        write(6,3)
     +  HIP_2,a0_1,e_a0_1,e_1,incl_1,e_incl_1,omega1_1,OMEGA_1,
     +  e_OMEGA_1,T0_1,Per_1,DMSA_1,xi,epsilon,Ref_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! The 39 systems with a DMSA/O entry which do not
*                             fulfill the 2 tests assessing the reliability
*                             of the astrometric orbital elements, namely
*                             {xi}<3 and {epsilon}>0.4 and the probability
*                             tests at the 0.006% level (see text).

C  Format for file interpretation

    4 format(I6,1X,A1,1X,A1,1X,A1,1X,A104)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,39
        read(1,'(A117)')ar__3
        read(ar__3,4)HIP_3,xi_1,epsilon_1,Pr,Rem
c    ..............Just test output...........
        write(6,4)HIP_3,xi_1,epsilon_1,Pr,Rem
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Masses and mass ratios for the 29 systems with
*                             main-sequence primaries passing all consistency
*                             tests.

C  Format for file interpretation

    5 format(I6,1X,F4.2,1X,F4.2,1X,F4.2,1X,F6.4,1X,A8,A60)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,29
        read(1,'(A97)')ar__4
        read(ar__4,5)HIP_4,M1,M2,M2_M1,Q,SpType,Rem_1
        if (idig(ar__4(8:11)).EQ.0) M1 =  rNULL__
        if (idig(ar__4(13:16)).EQ.0) M2 =  rNULL__
        if (idig(ar__4(18:21)).EQ.0) M2_M1 =  rNULL__
c    ..............Just test output...........
        write(6,5)HIP_4,M1,M2,M2_M1,Q,SpType,Rem_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    6 format(I2,1X,A19,1X,A20,1X,A36)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,66
        read(1,'(A80)')ar__5
        read(ar__5,6)Ref_2,BibCode,Aut,Com
c    ..............Just test output...........
        write(6,6)Ref_2,BibCode,Aut,Com
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end