FORTRAN Generation
(/./ftp/cats/J/ApJ/771/40)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/771/40 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-Apr-18
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/ApJ/771/40     Main-sequence A, F, G, and K stars photometry (Boyajian+, 2013)
*================================================================================
*Stellar diameters and temperatures.
*III. Main-sequence A, F, G, and K stars: additional high-precision measurements
*and empirical relations.
*    Boyajian T.S., Von Braun K., Van Belle G., Farrington C., Schaefer G.,
*    Jones J., White R., McAlister H.A., Ten Brummelaar T.A., Ridgway S.,
*    Gies D., Sturmann L., Sturmann J., Turner N.H., Goldfinger P.J., Vargas N.
*   <Astrophys. J., 771, 40 (2013)>
*   =2013ApJ...771...40B    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! New angular diameters

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

      integer*4     HD          ! Star HD number
      integer*4     Nobs        ! Number of observations
      real*4        chi2r       ! Reduced {chi}^2^
      real*4        thetaUD     ! (mag) Uniform disk angular diameter function (1)
      real*4        e_thetaUD   ! (mag) rms uncertainty on thetaUD
      real*4        mulambda    ! Limb-darkening coefficient (1)
      real*4        thetaLD     ! (mag) Limb-darkened angular diameter function (1)
      real*4        e_thetaLD   ! (mag) rms uncertainty on thetaLD
      real*4        ethetaLD    ! (%) Percentage error on thetaLD
*Note (1): Refer to Section 2.1 for details.

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

C  Declarations for 'table4.dat'	! Object photometry used in SED fits for 91 stars

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

      integer*4     HD_1        ! Star HD number
      character*7   System      ! System used or Wavelength in Angstroms
      character*5   Band        ! Bandpass or band width
      real*4        mag         ! (mag) Observed magnitude in Band
      real*4        e_mag       ! (mag) Error in mag
      integer*4     r_mag       ! Reference in refs.dat file

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

C  Declarations for 'table5.dat'	! Spectral types and bolometric fluxes

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

      integer*4     HD_2        ! Star HD number
      character*13  SpType1     ! First template spectral type
      character*12  SpType2     ! Second template spectral type
      character*6   r_SpType1   ! Reference for SpType1 and SpType3 (1)
      character*5   SpType3     ! Additional spectral type if necessary
*                                      for adequate SED fitting
      integer*4     DF          ! Fit degree of freedom
      real*4        chi2_DF1    ! {chi}2-per-DF metric for first template
      real*4        chi2_DF2    ! ? {chi}2-per-DF metric for second template
      real*4        chi2_DF3    ! ? {chi}2-per-DF metric for third  template
      character*10  SpTypeph    ! Photometric spectral type best fit
      real*8        Fbolph      ! (10-11W/m2) Photometric bolometric flux for
*                                      SpTypeph (2)
      real*4        e_Fbolph    ! (10-11W/m2) rms uncertainty on Fbolph
      real*4        chi2_DFph   ! ?=- Photometric {chi}2-per-DF metric
      character*7   SpTypeSp    ! Spectrohpotometric spectral type best fit
      real*8        FbolSp      ! (10-11W/m2) ?=- Spectrohpotometric bolometric flux
*                                     for SpTypeSp (2)
      real*4        e_FbolSp    ! (10-11W/m2) ? rms uncertainty on FbolSp
      character*5   r_SpTypeSp  ! Reference for spectrophotometric data (3)
*Note (2): Bolometric fluxes of target stars based upon Pickles (1998, Cat.
*  J/PASP/110/863) spectral templates fit to literature spectral types with
*  photometry in the literature (in Table 4), and extended by spectrophotometry
*  when available.
*Note (1): References for the first and second spectral types, as found from
*  the index by Skiff (2013, Cat. B/mk), as follows:
*    1 = Macrae, 1952ApJ...116..592M
*    2 = Cowley et al., 1967AJ.....72.1334C
*    3 = Hagen & van den Bergh, 1967PDDO....2..479H
*    4 = Barry, 1970ApJS...19..281B
*    5 = Schmitt, 1971ApJ...163...75S
*    6 = Morgan & Keenan, 1973ARA&A..11...29M
*    7 = Harlan, 1974AJ.....79..682H, Cat. III/171
*    8 = Houk & Cowley, 1975MSS...C01....0H, Cat. III/31
*    9 = Cowley, 1976PASP...88...95C
*   10 = Levato & Abt, 1978PASP...90..429L
*   11 = Cowley & Bidelman, 1979PASP...91...83C
*   12 = Jensen, 1981A&AS...45..455J
*   13 = Abt, 1981ApJS...45..437A, Cat. III/106
*   14 = Bouw, 1981PASP...93...45B
*   15 = Abt, 1985, Cat. J/ApJS/59/95
*   16 = Abt, 1986ApJ...309..260A
*   17 = Gray, 1989AJ.....98.1049G
*   18 = Gray & Garrison, 1989ApJS...69..301G
*   19 = Gray & Garrison, 1989ApJS...70..623G
*   20 = Keenan & McNeil, 1989ApJS...71..245K, Cat. III/150
*   21 = Abt & Morrell, 1995, Cat. J/ApJS/99/135
*   22 = Gray et al., 2001, Cat. J/AJ/121/2148
*   23 = Gray et al., 2003, Cat. J/AJ/126/2048
*   24 = Gray et al. 2006, Cat. J/AJ/132/161
*   25 = Abt, 2008, Cat. J/ApJS/176/216
*   26 = Zorec et al., 2009, Cat. J/A+A/501/297
*   27 = Abt, 2009, Cat. J/ApJS/180/117
*Note (3): Spectrophotometry references as follows:
*    1 = Burnashev, 1985BCrAO..66..152B
*    2 = Alekseeva et al., 1996BaltA...5..603A, Cat. III/201,
*         1997BaltA...6..481A, Cat. III/201
*    3 = Kharitonov et al., 1988, Cat. III/202
*    4 = Glushneva et al. 1998, Cat. III/207
*    5 = Glushneva et al. 1998, Cat. III/208

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

C  Declarations for 'table7.dat'	! Photometry used in color-temperature relations
                                 from erratum (2014, ApJ, 787, 92)

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

      integer*4     HD_3        ! Star HD number
      real*4        Bmag        ! (mag) Johnson B magnitude (1)
      real*4        Vmag        ! (mag) Johnson V magnitude (1)
      real*4        RJmag       ! (mag) ?=- Johnson R magnitude (1)
      real*4        IJmag       ! (mag) ?=- Johnson I magnitude (1)
      real*4        Jmag        ! (mag) Johnson J magnitude (1)
      character*2   n_Jmag      ! [cd ] Note on Jmag (2)
      real*4        Hmag        ! (mag) Johnson H magnitude (1)
      character*3   n_Hmag      ! [cde ] Note on Hmag (2)
      real*4        Kmag        ! (mag) Johnson K magnitude (1)
      character*2   n_Kmag      ! [cd ] Note on Kmag (2)
      real*4        RCmag       ! (mag) ?=- Cousins R magnitude (1)
      real*4        ICmag       ! (mag) ?=- Cousins I magnitude (1)
      real*4        RKmag       ! (mag) ?=- Kron R magnitude (1)
      real*4        IKmag       ! (mag) ?=- Kron I magnitude (1)
      real*4        gmag        ! (mag) ?=- g magnitude (3)
      real*4        rmag        ! (mag) ?=- r magnitude (3)
      real*4        imag        ! (mag) ?=- i magnitude (3)
      real*4        zmag        ! (mag) ?=- z magnitude (3)
      real*4        W3mag       ! (mag) ?=- Wise W3 magnitude (4)
      real*4        W4mag       ! (mag) ?=- Wise W4 magnitude (4)
*Note (1): Photometry sources include: Johnson et al. (1966CoLPL...4...99J,
*  1968ApJ...152..465Jw), Epps (1972RGOB..176..127E), Glass (1974MNSSA..33...53G,
*  1975MNRAS.171p..19G), Guetter (1977AJ.....82..598G), Blackwell et al.
*  (1979MNRAS.188..847B, 1990A&A...232..396B), Noguchi et al.
*  (1981PASJ...33..373N), Sandage & Kowal (1986AJ.....91.1140S),
*  Arribas & Martinez Roger (1989A&A...215..305A),
*  Aumann & Probst (1991ApJ...368..264A), Alonso et al. (1994A&A...282..684A,
*  1994A&AS..107..365A), Sylvester et al. (1996MNRAS.279..915S),
*  Mermilliod (1997, Cat. II/168), Ducati (2002, cat. II/237),
*  Cousins (1980SAAOC...1..166C), Kron et al. (1957AJ.....62..205K), and
*  Wright et al. (2010AJ....140.1868W). See Section 3 for details.
*Note (2): Notes as follows:
*  c = when 2MASS magnitude converted to the Johnson system, see Section 3
*       for details
*  d = missing label in original Table 7
*  e = incorrect input value (H=4.44) was used to derive the value in
*       original Table 7
*Note (3): Average from Ofek (2008, Cat. J/PASP/120/1128) and
*  Pickles & Depagne (2010PASP..122.1437P, Cat. VI/135).
*Note (4): The WISE W3 and W4 magnitudes have been filtered to only allow values
*  that have not reached saturation limits (W3<3.8mag and W4<-0.4mag).

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref         ! Reference number
      character*19  BibCode     ! BibeCode
      character*28  Aut         ! Author's name
      character*108 Com         ! Comments

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

C  Loading file 'table2.dat'	! New angular diameters

C  Format for file interpretation

    1 format(
     +  3X,I6,1X,I2,1X,F4.2,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,
     +  1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,23
        read(1,'(A51)')ar__
        read(ar__,1)
     +  HD,Nobs,chi2r,thetaUD,e_thetaUD,mulambda,thetaLD,e_thetaLD,
     +  ethetaLD
c    ..............Just test output...........
        write(6,1)
     +  HD,Nobs,chi2r,thetaUD,e_thetaUD,mulambda,thetaLD,e_thetaLD,
     +  ethetaLD
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Object photometry used in SED fits for 91 stars

C  Format for file interpretation

    2 format(2X,I6,1X,A7,1X,A5,1X,F5.2,1X,F5.2,1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,5736
        read(1,'(A38)')ar__1
        read(ar__1,2)HD_1,System,Band,mag,e_mag,r_mag
c    ..............Just test output...........
        write(6,2)HD_1,System,Band,mag,e_mag,r_mag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Spectral types and bolometric fluxes

C  Format for file interpretation

    3 format(
     +  I6,1X,A13,1X,A12,1X,A6,1X,A5,2X,I3,1X,F5.2,1X,F5.2,1X,F4.2,2X,
     +  A10,1X,F8.2,1X,F5.2,1X,F4.2,1X,A7,1X,F9.3,1X,F6.3,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,89
        read(1,'(A131)')ar__2
        read(ar__2,3)
     +  HD_2,SpType1,SpType2,r_SpType1,SpType3,DF,chi2_DF1,chi2_DF2,
     +  chi2_DF3,SpTypeph,Fbolph,e_Fbolph,chi2_DFph,SpTypeSp,FbolSp,
     +  e_FbolSp,r_SpTypeSp
        if(ar__2(59:63) .EQ. '') chi2_DF2 = rNULL__
        if(ar__2(65:68) .EQ. '') chi2_DF3 = rNULL__
        if (idig(ar__2(97:100)).EQ.0) chi2_DFph =  rNULL__
        if (idig(ar__2(110:118)).EQ.0) FbolSp =  rNULL__
        if(ar__2(120:125) .EQ. '') e_FbolSp = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  HD_2,SpType1,SpType2,r_SpType1,SpType3,DF,chi2_DF1,chi2_DF2,
     +  chi2_DF3,SpTypeph,Fbolph,e_Fbolph,chi2_DFph,SpTypeSp,FbolSp,
     +  e_FbolSp,r_SpTypeSp
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! Photometry used in color-temperature relations
*                                 from erratum (2014, ApJ, 787, 92)

C  Format for file interpretation

    4 format(
     +  I6,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,A2,1X,F5.2,A3,F5.2,
     +  A2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,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=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,94
        read(1,'(A114)')ar__3
        read(ar__3,4)
     +  HD_3,Bmag,Vmag,RJmag,IJmag,Jmag,n_Jmag,Hmag,n_Hmag,Kmag,
     +  n_Kmag,RCmag,ICmag,RKmag,IKmag,gmag,rmag,imag,zmag,W3mag,W4mag
        if (idig(ar__3(20:24)).EQ.0) RJmag =  rNULL__
        if (idig(ar__3(26:30)).EQ.0) IJmag =  rNULL__
        if (idig(ar__3(56:60)).EQ.0) RCmag =  rNULL__
        if (idig(ar__3(62:66)).EQ.0) ICmag =  rNULL__
        if (idig(ar__3(68:72)).EQ.0) RKmag =  rNULL__
        if (idig(ar__3(74:78)).EQ.0) IKmag =  rNULL__
        if (idig(ar__3(80:84)).EQ.0) gmag =  rNULL__
        if (idig(ar__3(86:90)).EQ.0) rmag =  rNULL__
        if (idig(ar__3(92:96)).EQ.0) imag =  rNULL__
        if (idig(ar__3(98:102)).EQ.0) zmag =  rNULL__
        if (idig(ar__3(104:108)).EQ.0) W3mag =  rNULL__
        if (idig(ar__3(110:114)).EQ.0) W4mag =  rNULL__
c    ..............Just test output...........
        write(6,4)
     +  HD_3,Bmag,Vmag,RJmag,IJmag,Jmag,n_Jmag,Hmag,n_Hmag,Kmag,
     +  n_Kmag,RCmag,ICmag,RKmag,IKmag,gmag,rmag,imag,zmag,W3mag,W4mag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    5 format(I3,1X,A19,1X,A28,3X,A108)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,204
        read(1,'(A163)')ar__4
        read(ar__4,5)Ref,BibCode,Aut,Com
c    ..............Just test output...........
        write(6,5)Ref,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