FORTRAN Generation
(/./ftp/cats/J/A_A/382/118)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/382/118 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 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/382/118     Spectroscopic sub-systems in multiple stars (Tokovinin+, 2002)
*================================================================================
*Statistics of spectroscopic sub-systems in visual multiple stars
*    Tokovinin A.A., Smekhov M.G.
*   <Astron. Astrophys. 382, 118 (2002)>
*   =2002A&A...382..118T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Identification, main data

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

      character*10  WDS        (nr__) ! WDS-style coordinates J2000
      character*2   Comp       (nr__) ! Component identifier (1)
      character*8   HD_BD      (nr__) ! HD or BD identifier
      character*5   ADS        (nr__) ! ADS identifier
      real*8        HRV        (nr__) ! (km/s) Mean heliocentric radial velocity
      real*4        e_HRV      (nr__) ! (km/s) Error of the mean HRV
      integer*4     o_HRV      (nr__) ! Number of HRV measurements
      real*4        P_chi2     (nr__) ! Probability that chi^2^ exceeds actual value
      real*4        EW         (nr__) ! (km/s) ? Equivalent width of the correlation dip
      real*4        e_EW       (nr__) ! (km/s) ? Error of equivalent width
      integer*4     o_EW       (nr__) ! ? Number of EW and Vsini measurements
      real*4        Vsin_i     (nr__) ! (km/s) ? Projected rotational velocity
      real*4        e_Vsin_i   (nr__) ! (km/s) ? Error of rotational velocity (2)
      character*1   f_Vsin_i   (nr__) ! [*] Flag for Vsini error (2)
      character*4   Var        (nr__) ! Variability status (3)
      character*3   Phys       (nr__) ! Physical relation to other components (4)
      character*1   RVflag     (nr__) ! [R] R: individual velocities in table2.dat
      character*1   Stat       (nr__) ! [BDT] Flag for statistical samples (5)
*Note (1): If more than two unresolved visual components, '+' appears.
*Note (2): If upper limits on Vsin(i) are given here instead of errors, this is
*           indicated by '*' in column 82.
*Note (3): Variability status:
*      C: constant
*     C?: likely constant
*      V: variable
*     V?: likely variable
*     VO: variability likely due to visual orbital motion
*    S1O: single-lined binary with orbit
*    S2O: double-lined binary with orbit
*    Asterisk indicates possible mixture of partially resolved components
*    affecting the velocity precision and equivalent width.
*Note (4): Physical relation to other components:
*      *: primary component or components of a multiple system
*      P: physical component
*     P?: likely physical component
*      O: optical component
*     O?: likely optical component
*Note (5): Flag for three statistical sub-samples:
*      B: visual binaries with known orbits
*      D: wide resolved visual binaries
*      T: tertiary components to physical binaries

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

C  Declarations for 'notes.dat'	! Notes to table1

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

      character*10  WDS_1      (nr__1) ! WDS-style coordinates J2000
      character*2   Comp_1     (nr__1) ! Component identifier
      character*80  Text       (nr__1) ! Text of the note

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

C  Declarations for 'table2.dat'	! Individual radial velocities

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

      character*10  WDS_2      (nr__2) ! WDS-style coordinates J2000
      character*2   Comp_2     (nr__2) ! Component identifier
      real*8        JDH        (nr__2) ! Heliocentric Julian date
      real*8        RV         (nr__2) ! (km/s) Radial velocity
      real*4        e_RV       (nr__2) ! (km/s) Formal error of the velocity
      character*1   Flag       (nr__2) ! [C] C: measured with CORAVEL

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

C  Declarations for 'table6.dat'	! Data on visual+spectroscopic multiples

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

      character*10  MSC        (nr__3) ! MSC (1900) identifier (J/A+AS/124/75>
      character*5   SpType     (nr__3) ! Spectral type of the primary component
      real*4        log_PL     (nr__3) ! Log10 of the visual period in days
      real*4        e_log_PL   (nr__3) ! Eccentricity of the visual orbit
      real*4        log_PS     (nr__3) ! Log10 of the spectroscopic period in days
      real*4        e_log_PS   (nr__3) ! Eccentricity of the spectroscopic orbit

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

C  Loading file 'table1.dat'	! Identification, main data

C  Format for file interpretation

    1 format(
     +  A10,1X,A2,1X,A8,1X,A5,4X,F7.2,1X,F5.2,1X,I3,1X,F4.2,3X,F4.2,
     +  1X,F4.2,1X,I3,1X,F4.1,1X,F4.1,1X,A1,3X,A4,1X,A3,1X,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,577
        read(1,'(A96)')ar__
        read(ar__,1)
     +  WDS(i__),Comp(i__),HD_BD(i__),ADS(i__),HRV(i__),e_HRV(i__),
     +  o_HRV(i__),P_chi2(i__),EW(i__),e_EW(i__),o_EW(i__),
     +  Vsin_i(i__),e_Vsin_i(i__),f_Vsin_i(i__),Var(i__),Phys(i__),
     +  RVflag(i__),Stat(i__)
        if(ar__(58:61) .EQ. '') EW(i__) = rNULL__
        if(ar__(63:66) .EQ. '') e_EW(i__) = rNULL__
        if(ar__(68:70) .EQ. '') o_EW(i__) = iNULL__
        if(ar__(72:75) .EQ. '') Vsin_i(i__) = rNULL__
        if(ar__(77:80) .EQ. '') e_Vsin_i(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  WDS(i__),Comp(i__),HD_BD(i__),ADS(i__),HRV(i__),e_HRV(i__),
     +  o_HRV(i__),P_chi2(i__),EW(i__),e_EW(i__),o_EW(i__),
     +  Vsin_i(i__),e_Vsin_i(i__),f_Vsin_i(i__),Var(i__),Phys(i__),
     +  RVflag(i__),Stat(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Notes to table1

C  Format for file interpretation

    2 format(A10,1X,A2,1X,A80)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,236
        read(1,'(A94)')ar__1
        read(ar__1,2)WDS_1(i__),Comp_1(i__),Text(i__)
c    ..............Just test output...........
        write(6,2)WDS_1(i__),Comp_1(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Individual radial velocities

C  Format for file interpretation

    3 format(A10,1X,A2,1X,F11.3,1X,F7.2,1X,F5.2,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,2483
        read(1,'(A41)')ar__2
        read(ar__2,3)
     +  WDS_2(i__),Comp_2(i__),JDH(i__),RV(i__),e_RV(i__),Flag(i__)
c    ..............Just test output...........
        write(6,3)
     +  WDS_2(i__),Comp_2(i__),JDH(i__),RV(i__),e_RV(i__),Flag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Data on visual+spectroscopic multiples

C  Format for file interpretation

    4 format(A10,1X,A5,1X,F5.2,1X,F5.3,2X,F5.2,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,65
        read(1,'(A41)')ar__3
        read(ar__3,4)
     +  MSC(i__),SpType(i__),log_PL(i__),e_log_PL(i__),log_PS(i__),
     +  e_log_PS(i__)
c    ..............Just test output...........
        write(6,4)
     +  MSC(i__),SpType(i__),log_PL(i__),e_log_PL(i__),log_PS(i__),
     +  e_log_PS(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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