FORTRAN Generation
(/./ftp/cats/J/A_A/610/A17)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/610/A17 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-20
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/610/A17       RV of candidate hybrid variable stars       (Lampens+, 2018)
*================================================================================
*Multi-technique investigation of the binary fraction of A-F type candidate
*hybrid variable stars discovered by Kepler.
*    Lampens P., Fremat Y., Vermeylen L., Sodor A., Skarka M., De Cat P.,
*    Bognar Zs., De Nutte R., Dumortier L., Escorza A., Oomen G.M.,
*    Van de Steene G., Kamath D., Laverick M., Samadi A., Triana S., Lehmann H.
*    <Astron. Astrophys. 610, A17 (2018)>
*    =2018A&A...610A..17L        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablec1.dat'	! Classification, model parameters and atmospheric
                                 stellar parameters obtained from the
                                 Hermes spectra

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     KIC         ! Kepler Identifier
      integer*4     RAh         ! (h) Rigth ascension (J2000)
      integer*4     RAm         ! (min) Rigth ascension (J2000)
      real*4        RAs         ! (s) Rigth ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*8        Per         ! (d) Period from KIC
      character*5   SpType      ! Spectral type
      integer*4     TeffKIC     ! (K) ? Effective temperature from KIC
      real*4        loggKIC     ! ([cm/s2]) ? Logarithmic gravity from KIC
      real*4        Kpmag       ! (mag) Kepler magnitude
      integer*4     H           ! Number of Hermes/Ace spectra
      character*12  Com         ! Comments (1)
      character*6   Cat         ! Classification type
      character*13  ParamMod    ! Parameters of the synthetic spectrum
      integer*4     TeffMean    ! (K) ? Mean effective temperature
      character*2   l_loggMean  ! [><= ] Limit flag on loggMean
      real*4        loggMean    ! ([cm/s2]) ? Mean logarithmic gravity or lower value of
*                                     mean logarithmic gravity interval
      real*4        loggMeanM   ! ([cm/s2]) ? Upper value of mean logarithmic gravity
*                                     interval
      integer*4     TeffGIR     ! (K) ? Effective temperature from GIRFIT
      real*4        loggGIR     ! ([cm/s2]) ? Logarithmic gravity from GIRFIT
      integer*4     vsiniGIR    ! (km/s) ? Projected rotation velocity from GIRFIT
      character*8   Note        ! Note
      character*10  FileName    ! Name of the table with radial velocity data
*Note (1): References and notes:
*   (a) = from Uytterhoeven et al. (2011, Cat. J/A+A/534/A125)
*   (b) = from Slawson et al. (2011, Cat. J/AJ/142/160)
*   (d) = for range [510-520]nm

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

C  Declarations for 'tablec2.dat'	! Comparison of atmospheric stellar parameters
                                 obtained in this work with published values
                                 (assuming other parameters are equivalent)

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

      integer*4     KIC_1       ! Kepler Identifier
      character*4   SpType_1    ! Spectral type
      integer*4     TeffKIC_1   ! (K) Effective temperature from KIC
      real*4        loggKIC_1   ! ([cm/s2]) Logarithmic gravity from KIC
      real*4        Kpmag_1     ! (mag) Kepler magnitude
      character*6   Cat_1       ! Classification type
      integer*4     TeffMean_1  ! (K) ? Mean effective temperature
      character*2   l_loggMean_1 ! [<>= ] Limit flag on loggMean
      real*4        loggMean_1  ! ([cm/s2]) ? Mean logarithmic gravity or lower value
*                                     of mean logarithmic gravity
      real*4        loggMeanM_1 ! ([cm/s2]) ? Upper value of mean logarithmic gravity
      integer*4     TeffGIR_1   ! (K) Effective temperature from GIRFIT
      real*4        loggGIR_1   ! ([cm/s2]) Logarithmic gravity from GIRFIT
      integer*4     vsiniGIR_1  ! (km/s) Projected rotation velocity from GIRFIT
      integer*4     Tefflit     ! (K) Effective temperature from literature
      real*4        logglit     ! ([cm/s2]) Logarithmic gravity from literature
      integer*4     vsinilit    ! (km/s) Projected rotation velocity from literature
      character*4   Source      ! Reference from literature (1)
*Note (1): Source as follows:
*    (11) = Catanzaro et al. (2011MNRAS.411.1167C)
*    (13) = Tkachenko et al. (2013, Cat. J/A+A/556/A52)
*    (15) = Niemczura et al. (2015, Cat. J/MNRAS/450/2764)

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

C  Declarations for 'tablec3.dat'	! Comparison of atmospheric stellar parameters
                                 obtained in this work with the LAMOST results
                                 based on the ROTFIT procedure

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

      integer*4     KIC_2       ! Kepler Identifier
      character*4   SpType_2    ! Spectral type
      integer*4     TeffKIC_2   ! (K) ? Effective temperature from KIC
      real*4        loggKIC_2   ! ([cm/s2]) ? Logarithmic gravity from KIC
      real*4        Kpmag_2     ! (mag) Kepler magnitude
      character*6   Cat_2       ! Classification type
      integer*4     TeffGIR_2   ! (K) Effective temperature from GIRFIT
      real*4        loggGIR_2   ! ([cm/s2]) Logarithmic gravity from GIRFIT
      character*1   n_loggGIR   ! [*] Note on loggGIR (1)
      integer*4     vsiniGIR_2  ! (km/s) Projected rotation velocity from GIRFIT
      character*1   n_vsiniGIR  ! [*] Note on vsiniGIR (1)
      character*8   SpTypeLam   ! Spectral type from LAMOST
      integer*4     TeffRot     ! (K) Effective temperature from ROTFIT
      integer*4     e_TeffRot   ! (K) rms uncertainty on TeffRot
      real*4        loggRot     ! ([cm/s2]) Logarithmic gravity from ROTFIT
      real*4        e_loggRot   ! ([cm/s2]) rms uncertainty on loggRot
      real*4        v_Fe_H_Rot  ! ([-]) Metallicity from ROTFIT
      real*4        e__Fe_H_Rot ! ([-]) rms uncertainty on [Fe/H]Rot
      real*4        RVRot       ! (km/s) Radial velocity from ROTFIT
      real*4        e_RVRot     ! (km/s) rms uncertainty on RVRot
      integer*4     vsiniRot    ! (km/s) ? Projected rotation velocity from ROTFIT
      integer*4     e_vsiniRot  ! (km/s) ? rms uncertainty on vsiniRot
*Note (1): * kept fixed while determining the other parameters.

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

C  Declarations for 'table2.dat'	! List of radial velocity data used in this work.
                                 I. Single objects and single-lined systems

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

      integer*4     KIC_3       ! Kepler Identifier
      real*8        HJD         ! (d) Heliocentric Julian Date
      real*8        RV1         ! (km/s) Radial velocity
      real*4        e_RV1       ! (km/s) Radial velocity uncertainty
      integer*4     Source_1    ! [1/2] Source (G1)

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

C  Declarations for 'table3.dat'	! List of radial velocity data used in this work.
                                 II. Double- and triple-lined systems

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

      integer*4     KIC_4       ! Kepler Identifier
      real*8        HJD_1       ! (d) Heliocentric Julian Date
      real*8        RV1_1       ! (km/s) Radial velocity, primary component
      real*4        e_RV1_1     ! (km/s) Radial velocity uncertainty
      real*8        RV2         ! (km/s) Radial velocity, secondary component
      real*4        e_RV2       ! (km/s) Radial velocity uncertainty
      real*8        RV3         ! (km/s) ?=- Radial velocity, tertiary component
      real*4        e_RV3       ! (km/s) ?=- Radial velocity uncertainty
      integer*4     Source_2    ! [1/2] Source (G1)

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

C  Loading file 'tablec1.dat'	! Classification, model parameters and atmospheric
*                                 stellar parameters obtained from the
*                                 Hermes spectra

C  Format for file interpretation

    1 format(
     +  I8,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F7.5,1X,A5,
     +  1X,I4,1X,F4.2,1X,F4.1,1X,I2,1X,A12,1X,A6,1X,A13,1X,I4,1X,A2,
     +  F3.1,1X,F3.1,1X,I4,1X,F4.2,1X,I3,1X,A8,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablec1.dat')
      write(6,*) '....Loading file: tablec1.dat'
      do i__=1,51
        read(1,'(A147)')ar__
        read(ar__,1)
     +  KIC,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Per,SpType,TeffKIC,loggKIC,
     +  Kpmag,H,Com,Cat,ParamMod,TeffMean,l_loggMean,loggMean,
     +  loggMeanM,TeffGIR,loggGIR,vsiniGIR,Note,FileName
        if(ar__(48:51) .EQ. '') TeffKIC = iNULL__
        if(ar__(53:56) .EQ. '') loggKIC = rNULL__
        if(ar__(100:103) .EQ. '') TeffMean = iNULL__
        if(ar__(107:109) .EQ. '') loggMean = rNULL__
        if(ar__(111:113) .EQ. '') loggMeanM = rNULL__
        if(ar__(115:118) .EQ. '') TeffGIR = iNULL__
        if(ar__(120:123) .EQ. '') loggGIR = rNULL__
        if(ar__(125:127) .EQ. '') vsiniGIR = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  KIC,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Per,SpType,TeffKIC,loggKIC,
     +  Kpmag,H,Com,Cat,ParamMod,TeffMean,l_loggMean,loggMean,
     +  loggMeanM,TeffGIR,loggGIR,vsiniGIR,Note,FileName
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablec2.dat'	! Comparison of atmospheric stellar parameters
*                                 obtained in this work with published values
*                                 (assuming other parameters are equivalent)

C  Format for file interpretation

    2 format(
     +  I8,1X,A4,1X,I4,1X,F4.2,1X,F4.1,1X,A6,1X,I4,1X,A2,F3.1,1X,F3.1,
     +  1X,I4,1X,F4.2,1X,I3,1X,I4,1X,F4.2,1X,I3,1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablec2.dat')
      write(6,*) '....Loading file: tablec2.dat'
      do i__=1,23
        read(1,'(A83)')ar__1
        read(ar__1,2)
     +  KIC_1,SpType_1,TeffKIC_1,loggKIC_1,Kpmag_1,Cat_1,TeffMean_1,
     +  l_loggMean_1,loggMean_1,loggMeanM_1,TeffGIR_1,loggGIR_1,
     +  vsiniGIR_1,Tefflit,logglit,vsinilit,Source
        if(ar__1(37:40) .EQ. '') TeffMean_1 = iNULL__
        if(ar__1(44:46) .EQ. '') loggMean_1 = rNULL__
        if(ar__1(48:50) .EQ. '') loggMeanM_1 = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  KIC_1,SpType_1,TeffKIC_1,loggKIC_1,Kpmag_1,Cat_1,TeffMean_1,
     +  l_loggMean_1,loggMean_1,loggMeanM_1,TeffGIR_1,loggGIR_1,
     +  vsiniGIR_1,Tefflit,logglit,vsinilit,Source
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablec3.dat'	! Comparison of atmospheric stellar parameters
*                                 obtained in this work with the LAMOST results
*                                 based on the ROTFIT procedure

C  Format for file interpretation

    3 format(
     +  I8,1X,A4,1X,I4,1X,F4.2,1X,F5.2,1X,A6,1X,I4,1X,F4.2,A1,1X,I3,
     +  A1,1X,A8,1X,I4,1X,I3,1X,F4.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.1,
     +  1X,F4.1,1X,I3,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablec3.dat')
      write(6,*) '....Loading file: tablec3.dat'
      do i__=1,26
        read(1,'(A109)')ar__2
        read(ar__2,3)
     +  KIC_2,SpType_2,TeffKIC_2,loggKIC_2,Kpmag_2,Cat_2,TeffGIR_2,
     +  loggGIR_2,n_loggGIR,vsiniGIR_2,n_vsiniGIR,SpTypeLam,TeffRot,
     +  e_TeffRot,loggRot,e_loggRot,v_Fe_H_Rot,e__Fe_H_Rot,RVRot,
     +  e_RVRot,vsiniRot,e_vsiniRot
        if(ar__2(15:18) .EQ. '') TeffKIC_2 = iNULL__
        if(ar__2(20:23) .EQ. '') loggKIC_2 = rNULL__
        if(ar__2(104:106) .EQ. '') vsiniRot = iNULL__
        if(ar__2(108:109) .EQ. '') e_vsiniRot = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  KIC_2,SpType_2,TeffKIC_2,loggKIC_2,Kpmag_2,Cat_2,TeffGIR_2,
     +  loggGIR_2,n_loggGIR,vsiniGIR_2,n_vsiniGIR,SpTypeLam,TeffRot,
     +  e_TeffRot,loggRot,e_loggRot,v_Fe_H_Rot,e__Fe_H_Rot,RVRot,
     +  e_RVRot,vsiniRot,e_vsiniRot
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! List of radial velocity data used in this work.
*                                 I. Single objects and single-lined systems

C  Format for file interpretation

    4 format(I8,1X,F13.5,1X,F7.3,1X,F6.3,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,347
        read(1,'(A39)')ar__3
        read(ar__3,4)KIC_3,HJD,RV1,e_RV1,Source_1
c    ..............Just test output...........
        write(6,4)KIC_3,HJD,RV1,e_RV1,Source_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! List of radial velocity data used in this work.
*                                 II. Double- and triple-lined systems

C  Format for file interpretation

    5 format(
     +  I8,1X,F13.5,1X,F7.3,1X,F6.3,1X,F7.3,1X,F5.3,1X,F7.3,1X,F6.3,
     +  1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,169
        read(1,'(A68)')ar__4
        read(ar__4,5)
     +  KIC_4,HJD_1,RV1_1,e_RV1_1,RV2,e_RV2,RV3,e_RV3,Source_2
        if (idig(ar__4(53:59)).EQ.0) RV3 =  rNULL__
        if (idig(ar__4(61:66)).EQ.0) e_RV3 =  rNULL__
c    ..............Just test output...........
        write(6,5)
     +  KIC_4,HJD_1,RV1_1,e_RV1_1,RV2,e_RV2,RV3,e_RV3,Source_2
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