FORTRAN Generation
(/./ftp/cats/J/A_A/458/997)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/458/997 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-16
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/458/997   Abundances for 6 transiting planet host stars   (Santos+, 2006)
*================================================================================
*Chemical abundances for the transiting planet host stars OGLE-TR-10, 56, 111,
*113, 132 and TrES-1. Abundances in different galactic populations.
*    Santos N.C., Ecuvillon A., Israelinan G., Mayor M., Melo C., Queloz D.,
*    Udry S., Ribeiro J.P., Jorge S.
*   <Astron. Astrophys. 458, 997 (2006)>
*   =2006A&A...458..997S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Stellar parameters and metallicities

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

      character*11  Name        ! Star name
      integer*4     Teff        ! (K) Effective temperature
      integer*4     e_Teff      ! (K) rms uncertainty on Teff
      real*4        logg        ! ([cm/s2]) Surface gravity
      real*4        e_logg      ! ([cm/s2]) rms uncertainty on logg
      real*4        Vt          ! (km/s) Turbulent velocity
      real*4        e_Vt        ! (km/s) rms uncertainty on Vt
      real*4        v_Fe_H_     ! ([Sun]) Metallicity
      real*4        e__Fe_H_    ! ([Sun]) rms uncertainty on [Fe/H]
      integer*4     o_FeI       ! Number of Fe I lines used in analysis
      integer*4     o_FeII      ! Number of Fe I lines used in analysis
      real*4        e_FeI       ! Dispersion of abundances given by FeI lines
      real*4        e_FeII      ! Dispersion of abundances given by FeII lines
      character*36  Ref         ! Reference

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

C  Declarations for 'table2.dat'	! Line-list and atomic parameters

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

      real*8        Lambda      ! (0.1nm) Wavelength of spectral line
      real*4        Xlow        ! (eV) Lower excitation potential
      real*8        loggf       ! ([-]) Oscillator strength value
      character*5   El          ! Element and ionization stage

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

C  Declarations for 'tables.dat'	! Derived abundances for the 6 stars
                             (tables 3-6 of the paper)

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

      character*11  Name_1      ! Star name
      character*5   El_1        ! Element
      character*1   l__El_H_    ! Limit flag on [El/H]
      real*4        v_El_H_     ! ([Sun]) ?=- Abundance
      real*4        e__El_H_    ! ([Sun]) ?=- rms uncertainty on [El/H]
      integer*4     o__El_H_    ! ?=- Number of lines used in analysis
      character*1   n__El_H_    ! [*] Note (1)
*Note (1): For OGLE-TR-113, the Cu abundance was obtained only from the 5380{AA},
*          the uncertainty was derived based on an estimate of the measured EW.
*          For TrES-1, only the 6757{AA} line of sulphur was measured.

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

C  Declarations for 'table7.dat'	! Stellar I magnitudes, stellar radii, galactic
                              coordinates, derived distances, X, Y, Z, Rg
                              galactic coordinates, adopted interstellar
                              extinction, and systemic radial-velocities for
                              the 6 stars studied

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

C  Position composed of: GLON GLAT
      character*11  Name_2      ! Name
      real*4        Imag        ! (mag) I magnitude (1)
      real*4        Rad         ! (solRad) Star radius
      real*8        GLON        ! (deg) Galactic longitude
      real*8        GLAT        ! (deg) Galactic latitude
      integer*4     Dist0       ! (pc) Distance derived considering null extinction
      integer*4     Dist        ! (pc) Distance
      integer*4     X           ! (pc) X galactic coordinate
      integer*4     Y           ! (pc) Y galactic coordinate
      integer*4     Z           ! (pc) Z galactic coordinate
      integer*4     Radg        ! (pc) Galactocentric distance
      real*4        AV          ! (mag) Adopted interstellar extinction
      real*4        RV          ! (km/s) Systemic radial velocity
      character*1   r_RV        ! References for RV (2)
*Note (1): For TrES-1, the I magnitude was derived from the V magnitude
*          (V=11.79) and the known effective temperature.
*Note (2): References for radial velocities as follows:
*      a = Bouchy et al. (2005A&A...431.1105B)
*      b = Pont et al. (2004A&A...426L..15P)
*      c = Bouchy et al. (2004A&A...421L..13B)
*      d = This paper

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

C  Loading file 'table1.dat'	! Stellar parameters and metallicities

C  Format for file interpretation

    1 format(
     +  A11,1X,I4,1X,I3,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,
     +  F4.2,1X,I2,1X,I2,1X,F4.2,1X,F4.2,1X,A36)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,6
        read(1,'(A103)')ar__
        read(ar__,1)
     +  Name,Teff,e_Teff,logg,e_logg,Vt,e_Vt,v_Fe_H_,e__Fe_H_,o_FeI,
     +  o_FeII,e_FeI,e_FeII,Ref
c    ..............Just test output...........
        write(6,1)
     +  Name,Teff,e_Teff,logg,e_logg,Vt,e_Vt,v_Fe_H_,e__Fe_H_,o_FeI,
     +  o_FeII,e_FeI,e_FeII,Ref
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Line-list and atomic parameters

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,136
        read(1,'(A27)')ar__1
        read(ar__1,2)Lambda,Xlow,loggf,El
c    ..............Just test output...........
        write(6,2)Lambda,Xlow,loggf,El
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tables.dat'	! Derived abundances for the 6 stars
*                             (tables 3-6 of the paper)

C  Format for file interpretation

    3 format(A11,1X,A5,A1,F5.2,1X,F4.2,1X,I2,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tables.dat')
      write(6,*) '....Loading file: tables.dat'
      do i__=1,114
        read(1,'(A33)')ar__2
        read(ar__2,3)
     +  Name_1,El_1,l__El_H_,v_El_H_,e__El_H_,o__El_H_,n__El_H_
        if (idig(ar__2(19:23)).EQ.0) v_El_H_ =  rNULL__
        if (idig(ar__2(25:28)).EQ.0) e__El_H_ =  rNULL__
        if (o__El_H_ .EQ. 45) o__El_H_ =  iNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name_1,El_1,l__El_H_,v_El_H_,e__El_H_,o__El_H_,n__El_H_
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! Stellar I magnitudes, stellar radii, galactic
*                              coordinates, derived distances, X, Y, Z, Rg
*                              galactic coordinates, adopted interstellar
*                              extinction, and systemic radial-velocities for
*                              the 6 stars studied

C  Format for file interpretation

    4 format(
     +  A11,1X,F5.2,1X,F5.3,1X,F8.4,1X,F7.4,1X,I4,1X,I4,1X,I5,1X,I4,
     +  1X,I3,1X,I4,1X,F4.2,1X,F4.1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,6
        read(1,'(A81)')ar__3
        read(ar__3,4)
     +  Name_2,Imag,Rad,GLON,GLAT,Dist0,Dist,X,Y,Z,Radg,AV,RV,r_RV
c    ..............Just test output...........
        write(6,4)
     +  Name_2,Imag,Rad,GLON,GLAT,Dist0,Dist,X,Y,Z,Radg,AV,RV,r_RV
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