FORTRAN Generation
(/./ftp/cats/J/PAZh/34/21)

Conversion of standardized ReadMe file for file /./ftp/cats/J/PAZh/34/21 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.8, on 2014-Sep-30
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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. J/PAZh/34/21       New spectral types for Tycho2 stars        (Tsvetkov+, 2008)
*================================================================================
*Inaccuracies in the spectral classification of stars from the Tycho-2 Spectral
*Type Catalogue.
*    Tsvetkov A.S., Popov A.V., Smirnov A.A.
*   <Pis'ma Astron. Zh. 34, 21 (2008)>
*   =2008PAZh...34...21T
*   =2008AstL...34...17T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Tabulated B-V color indices and absolute magnitudes
                             M for stars of various spectra and of luminosity
                             classes I, III and V

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

      character*2   SpClass     ! Spectral class
      real*4        MAG_1       ! (mag) Absolute magnitude for Luminosity class I
      real*4        v_B_V_1     ! (mag) B-V index for Luminosity class I
      real*4        MAG_3       ! (mag) Absolute magnitude for Luminosity class III
      real*4        v_B_V_3     ! (mag) B-V index for Luminosity class III
      real*4        MAG_5       ! (mag) Absolute magnitude for Luminosity class V
      real*4        v_B_V_5     ! (mag) B-V index for Luminosity class V

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

C  Declarations for 'table2.dat'	! Stars with |{delta}logr|>1, their corrected
                             spectral types, and the logarithms of their
                             distances obtained by the spectroscopic
                             parallax method

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

      integer*4     HIP         ! HIP (Cat. I/239) number
      real*4        logRt       ! ([pc]) Logarithm of the distance derived from the
*                                   trigonometric parallax
      real*4        logRs       ! ([pc]) Logarithm of the distance derived from the
*                                   spectroscopic parallax
      real*4        BT_VT       ! (mag) B-V colour index from the Tycho-2 Spectral
*                                   Types Catalogue (Cat. III/231)
      real*4        VTmag       ! (mag) Apparent magnitude from the Tycho-2 Spectral
*                                   Type Catalogue (Cat. III/231)
      character*6   SpType      ! Spectral type from the Tycho-2 Spectral Type
*                                   Catalogue (Cat. III/231)
      character*1   Type        ! [VHDMCNB] Star type (1)
      character*10  SpType1     ! New (presumed) spectral type
      character*2   n_SpType1   ! [sSlL ] Note on SpType1 (2)
      real*4        logR1       ! ([pc]) ? Logarithm of the distance calculated from
*                                     SpType1
*Note (1): Star type as follows:
*      V = variable star
*      H = high-proper-motion star
*      D = double star
*      M = multiple star
*      C = star observed against the background of a cluster
*      N = carbon star
*      B = star erroneously identified with Barnard's star
*Note (2): Note on new spectral type as follows:
*      S = spectral type and luminosity class from the SIMBAD database were used
*      s = only the spectral type from the SIMBAD data base was used
*          (the luminosity class is unavailable or ignored)
*      L = luminosity class III was assigned
*      l = luminosity class V was assigned
*     sL = combination of the s and L flags

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

C  Loading file 'table1.dat'	! Tabulated B-V color indices and absolute magnitudes
*                             M for stars of various spectra and of luminosity
*                             classes I, III and V

C  Format for file interpretation

    1 format(A2,2X,F6.3,2X,F6.3,2X,F6.3,2X,F6.3,2X,F6.3,2X,F6.3)

C  Effective file loading

      open(unit=1,file='table1.dat', status='old')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,61
        read(1,'(A50)')ar__
        read(ar__,1)SpClass,MAG_1,v_B_V_1,MAG_3,v_B_V_3,MAG_5,v_B_V_5
c    ..............Just test output...........
        write(6,1)SpClass,MAG_1,v_B_V_1,MAG_3,v_B_V_3,MAG_5,v_B_V_5
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Stars with |{delta}logr|>1, their corrected
*                             spectral types, and the logarithms of their
*                             distances obtained by the spectroscopic
*                             parallax method

C  Format for file interpretation

    2 format(
     +  I6,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,A6,1X,A1,1X,A10,1X,A2,
     +  1X,F4.2)

C  Effective file loading

      open(unit=1,file='table2.dat', status='old')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,164
        read(1,'(A57)')ar__1
        read(ar__1,2)
     +  HIP,logRt,logRs,BT_VT,VTmag,SpType,Type,SpType1,n_SpType1,
     +  logR1
        if(ar__1(54:57) .EQ. '') logR1 = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  HIP,logRt,logRs,BT_VT,VTmag,SpType,Type,SpType1,n_SpType1,
     +  logR1
c    .......End.of.Just test output...........
      end do
      close(1)

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