FORTRAN Generation
(/./ftp/cats/J/A_A/587/A64)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/587/A64 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 2026-Oct-15
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/587/A64       Physical properties of giant exoplanets    (Santerne+, 2016)
*================================================================================
*SOPHIE velocimetry of Kepler transit candidates
*XVII. The physical properties of giant exoplanets within 400 days of period.
*     Santerne A.,  Moutou C.,  Tsantaki M., Bouchy F., Hebrard G.,
*     Adibekyan V., Almenara J.-M., Amard L., Barros S.C.C., Boisse I.,
*     Bonomo A.S., Bruno G., Courcol B., Deleuil M., Demangeon O., Diaz R.F.,
*     Guillot T., Havel M., Montagnier G., Rajpurohit A.S., Rey J., Santos N.C.
*    <Astron. Astrophys. 587, A64 (2016)>
*    =2016A&A...587A..64S        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Sample of Kepler candidates from the Q1-Q17
                                 dataset that respect all the criteria defined
                                 in Section 2

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

      integer*4     KIC         ! KIC number
      real*8        KOI         ! KOI number
      character*4   Kepler      ! Kepler name
      real*8        Per         ! (d) Period
      real*4        Depth       ! (%) Depth
      real*8        a           ! Semi-major axis, in R* unit
      real*4        E_a         ! Error on a (upper value)
      real*4        e_a_1       ! Error on a (lower value)
      real*4        kepmag      ! (mag) Kepler magnitude
      integer*4     Teff        ! (K) ?=- Effective temperature
      integer*4     E_Teff      ! (K) ? Error on Teff (upper value)
      integer*4     e_Teff_1    ! (K) ? Error on Teff (lower value)
      real*4        logg        ! ([cm/s2]) ?=- Surface gravity
      real*4        E_logg      ! ([cm/s2]) ? Error on logg (upper value)
      real*4        e_logg_1    ! ([cm/s2]) ? Error on logg (lower value)
      real*4        v_Fe_H_     ! ([-]) ?=- Metallicity
      real*4        E__Fe_H_    ! ([-]) ? Error on [Fe/H] (upper value)
      real*4        e__Fe_H__1  ! ([-]) ? Error on [Fe/H] (lower value)
      character*6   Type        ! Nature of the object
      character*10  Ref         ! Reference, in refs.dat file
      character*1   RV          ! [*] * indicates RV data in tables B1-B3

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

C  Declarations for 'tableb1.dat'	! SOPHIE RV of single stars

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

      real*8        BJD         ! (d) Baricentric Julian date
      real*8        RV_1        ! (km/s) Radial velocity
      real*4        e_RV        ! (km/s) rms uncertainty on RV
      real*4        Vspan       ! (km/s) ?=- Bisector span
      real*4        e_Vspan     ! (km/s) ?=- rms uncertainty on Vspan
      real*8        FWHM        ! (km/s) ?=- FWHM
      real*4        e_FWHM      ! (km/s) ?=- rms uncertainty on FWHM
      integer*4     Texp        ! (s) Exposure time
      real*4        S_N         ! Signal-to-noise ratio
      integer*4     KOI_1       ! Target KOI number

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

C  Declarations for 'tableb2.dat'	! SOPHIE RV of SB2 stars

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

      real*8        BJD_1       ! (d) Baricentric Julian date
      real*8        RVA         ! (km/s) Radial velocity of first component
      real*4        e_RVA       ! (km/s) rms uncertainty on RVA
      real*8        RVB         ! (km/s) Radial velocity of second component
      real*4        e_RVB       ! (km/s) rms uncertainty on RVB
      integer*4     Texp_1      ! (s) Exposure time
      real*4        S_N_1       ! Signal-to-noise ratio
      integer*4     KOI_2       ! Target KOI number

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

C  Declarations for 'tableb3.dat'	! SOPHIE RV of SB3 stars

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

      real*8        BJD_2       ! (d) Baricentric Julian date
      real*8        RVA_1       ! (km/s) Radial velocity of first component
      real*4        e_RVA_1     ! (km/s) rms uncertainty on RVA
      real*8        RVB_1       ! (km/s) Radial velocity of second component
      real*4        e_RVB_1     ! (km/s) rms uncertainty on RVB
      real*8        RVC         ! (km/s) Radial velocity of third component
      real*4        e_RVC       ! (km/s) rms uncertainty on RVC
      integer*4     Texp_2      ! (s) Exposure time
      real*4        S_N_2       ! Signal-to-noise ratio
      integer*4     KOI_3       ! Target KOI number

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

C  Declarations for 'refs.dat'	! References

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

      character*5   Ref_1       ! Reference code
      character*19  BibCode     ! BibCode
      character*20  Aut         ! Author's name
      character*22  Com         ! Comments

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

C  Loading file 'table1.dat'	! Sample of Kepler candidates from the Q1-Q17
*                                 dataset that respect all the criteria defined
*                                 in Section 2

C  Format for file interpretation

    1 format(
     +  I8,1X,F7.2,1X,A4,1X,F7.3,1X,F4.2,1X,F7.2,1X,F6.2,1X,F6.2,1X,
     +  F4.1,1X,I4,1X,I3,1X,I3,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,F4.2,1X,A6,1X,A10,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,129
        read(1,'(A125)')ar__
        read(ar__,1)
     +  KIC,KOI,Kepler,Per,Depth,a,E_a,e_a_1,kepmag,Teff,E_Teff,
     +  e_Teff_1,logg,E_logg,e_logg_1,v_Fe_H_,E__Fe_H_,e__Fe_H__1,
     +  Type,Ref,RV
        if (Teff .EQ. 45) Teff =  iNULL__
        if(ar__(68:70) .EQ. '') E_Teff = iNULL__
        if(ar__(72:74) .EQ. '') e_Teff_1 = iNULL__
        if (idig(ar__(76:79)).EQ.0) logg =  rNULL__
        if(ar__(81:84) .EQ. '') E_logg = rNULL__
        if(ar__(86:89) .EQ. '') e_logg_1 = rNULL__
        if (idig(ar__(91:95)).EQ.0) v_Fe_H_ =  rNULL__
        if(ar__(97:100) .EQ. '') E__Fe_H_ = rNULL__
        if(ar__(102:105) .EQ. '') e__Fe_H__1 = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  KIC,KOI,Kepler,Per,Depth,a,E_a,e_a_1,kepmag,Teff,E_Teff,
     +  e_Teff_1,logg,E_logg,e_logg_1,v_Fe_H_,E__Fe_H_,e__Fe_H__1,
     +  Type,Ref,RV
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb1.dat'	! SOPHIE RV of single stars

C  Format for file interpretation

    2 format(
     +  F13.5,1X,F8.3,1X,F5.3,1X,F6.3,1X,F5.3,F7.3,1X,F5.3,1X,I4,1X,
     +  F4.1,5X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb1.dat')
      write(6,*) '....Loading file: tableb1.dat'
      do i__=1,191
        read(1,'(A73)')ar__1
        read(ar__1,2)
     +  BJD,RV_1,e_RV,Vspan,e_Vspan,FWHM,e_FWHM,Texp,S_N,KOI_1
        if (idig(ar__1(30:35)).EQ.0) Vspan =  rNULL__
        if (idig(ar__1(37:41)).EQ.0) e_Vspan =  rNULL__
        if (idig(ar__1(42:48)).EQ.0) FWHM =  rNULL__
        if (idig(ar__1(50:54)).EQ.0) e_FWHM =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  BJD,RV_1,e_RV,Vspan,e_Vspan,FWHM,e_FWHM,Texp,S_N,KOI_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb2.dat'	! SOPHIE RV of SB2 stars

C  Format for file interpretation

    3 format(
     +  F13.5,1X,F7.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,I4,1X,F4.1,5X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb2.dat')
      write(6,*) '....Loading file: tableb2.dat'
      do i__=1,41
        read(1,'(A61)')ar__2
        read(ar__2,3)BJD_1,RVA,e_RVA,RVB,e_RVB,Texp_1,S_N_1,KOI_2
c    ..............Just test output...........
        write(6,3)BJD_1,RVA,e_RVA,RVB,e_RVB,Texp_1,S_N_1,KOI_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb3.dat'	! SOPHIE RV of SB3 stars

C  Format for file interpretation

    4 format(
     +  F13.5,1X,F7.3,1X,F5.3,1X,F7.3,1X,F5.3,1X,F7.3,1X,F5.3,1X,I3,
     +  1X,F4.1,5X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb3.dat')
      write(6,*) '....Loading file: tableb3.dat'
      do i__=1,4
        read(1,'(A73)')ar__3
        read(ar__3,4)
     +  BJD_2,RVA_1,e_RVA_1,RVB_1,e_RVB_1,RVC,e_RVC,Texp_2,S_N_2,KOI_3
c    ..............Just test output...........
        write(6,4)
     +  BJD_2,RVA_1,e_RVA_1,RVB_1,e_RVB_1,RVC,e_RVC,Texp_2,S_N_2,KOI_3
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    5 format(A5,1X,A19,1X,A20,1X,A22)

C  Effective file loading

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