FORTRAN Generation
(/./ftp/cats/J/MNRAS/423/122)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/423/122 into FORTRAN code for loading all data files into arrays.

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-May-17
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/MNRAS/423/122   Abundances of 93 solar-type Kepler targets    (Bruntt+, 2012)
*================================================================================
*Accurate fundamental parameters and detailed abundance patterns from
*spectroscopy of 93 solar-type Kepler targets.
*    Bruntt H., Basu S., Smalley B., Chaplin W.J., Verner G.A., Bedding T.R.,
*    Catala C., Gazzano J.-C., Molenda-Zakowicz J., Thygesen A.O.,
*    Uytterhoeven K., Hekker S., Huber D., Karoff C., Mathur S., Mosser B.,
*    Appourchaux T., Campante T.L., Elsworth Y., Garcia R.A., Handberg R.,
*    Metcalfe T.S., Quirion P.-O., Regulo C., Roxburgh I.W., Stello D.,
*    Christensen-Dalsgaard J., Kawaler S.D., Kjeldsen H., Morris R.L.,
*    Quintana E.V., Sanderfer D.T.
*   <Mon. Not. R. Astron. Soc., 423, 122-131 (2012)>
*   =2012MNRAS.423..122B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Atomic data used in the spectral analysis

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

      character*4   El         (nr__) ! Element with ionization state
      real*8        lambda     (nr__) ! (0.1nm) wavelength {lambda} ({AA})
      real*4        Ep         (nr__) ! (eV) excitation potential
      real*4        loggfV     (nr__) ! ([-]) Oscillator strength from VALD
      real*8        loggf      (nr__) ! ([-]) Adjusted oscillator strength value

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

C  Declarations for 'table3.dat'	! Observed targets and their properties

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

      integer*4     KIC        (nr__1) ! KIC number (Cat. V/133)
      integer*4     HIP        (nr__1) ! ? HIP number (Cat. I/311)
      integer*4     HD         (nr__1) ! ? HD number (Cat. III/135)
      real*4        VTmag      (nr__1) ! (mag) Tycho V magnitude
      real*4        VT_K       (nr__1) ! (mag) VT-Ks colour index
      real*4        E_B_V      (nr__1) ! (mag) ? B-V colour excess
      real*4        e_E_B_V    (nr__1) ! (mag) ? rms uncertainty on E(B-V)
      integer*4     Teff1      (nr__1) ! (K) ? Effective temperature  from KIC
      real*4        logg1      (nr__1) ! ([cm/s2]) ? Gravity surface from KIC
      real*4        v_Fe_H_1   (nr__1) ! ([Sun]) ? Metallicity from KIC
      integer*4     Teff2      (nr__1) ! (K) Effective temperature from spectroscopy
*                                 (+/-70K)
      real*4        logg2      (nr__1) ! ([cm/s2]) Gravity surface from spectroscopy (+/-0.08dex)
      integer*4     Teff       (nr__1) ! (K) Final (asteroseismic) effective temperature
*                                 (+/-60K)
      real*4        logg       (nr__1) ! ([cm/s2]) Final (asteroseismic) gravity surface
*                                 (+/-0.03dex)
      real*4        v_Fe_H_    (nr__1) ! ([-]) Final (asteroseismic) metallicity (+/-0.06dex)
      real*4        xi         (nr__1) ! (km/s) Final (asteroseismic) microturbulent velocity
*                                 {xi} (+/-0.06km/s) (1)
      real*4        vsini      (nr__1) ! (km/s) Final (asteroseismic) rotational velocity (1)
*Note (1): We only list the `asteroseismic' values of vsini and xi, since
*          the `spectroscopic' values are almost identical.

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

C  Declarations for 'table4.dat'	! Abundances relative to the Sun and the number of
                             lines used for 13 elements

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

      integer*4     KIC_1      (nr__2) ! KIC number (1)
      integer*4     Ion        (nr__2) ! [1/2] Ionisation state:
*                               1 for neutral, 2 for singly-ionized
      real*4        Li         (nr__2) ! ([Sun]) ?=- Lithum abundance (2)
      real*4        e_Li       (nr__2) ! ([Sun]) ?=- rms uncertainty on Li
      integer*4     o_Li       (nr__2) ! ?=- Number of lines used for Li
      real*4        C          (nr__2) ! ([Sun]) ?=- Carbon abundance (2)
      real*4        e_C        (nr__2) ! ([Sun]) ?=- rms uncertainty on C
      integer*4     o_C        (nr__2) ! ?=- Number of lines used for C
      real*4        N          (nr__2) ! ([Sun]) ?=- Nitrogen abundance (2)
      real*4        e_N        (nr__2) ! ([Sun]) ?=- rms uncertainty on N
      integer*4     o_N        (nr__2) ! ?=- Number of lines used for N
      real*4        O          (nr__2) ! ([Sun]) ?=- Oxygen abundance (2)
      real*4        e_O        (nr__2) ! ([Sun]) ?=- rms uncertainty on O
      integer*4     o_O        (nr__2) ! ?=- Number of lines used for O
      real*4        Na         (nr__2) ! ([Sun]) ?=- Sodium abundance (2)
      real*4        e_Na       (nr__2) ! ([Sun]) ?=- rms uncertainty on Na
      integer*4     o_Na       (nr__2) ! ?=- Number of lines used for Na
      real*4        Mg         (nr__2) ! ([Sun]) ?=- Magnesium abundance (2)
      real*4        e_Mg       (nr__2) ! ([Sun]) ?=- rms uncertainty on Mg
      integer*4     o_Mg       (nr__2) ! ?=- Number of lines used for Mg
      real*4        Si         (nr__2) ! ([Sun]) ?=- Silicium abundance (2)
      real*4        e_Si       (nr__2) ! ([Sun]) ?=- rms uncertainty on Si
      integer*4     o_Si       (nr__2) ! ?=- Number of lines used for Si
      real*4        Ca         (nr__2) ! ([Sun]) ?=- Calcium abundance (2)
      real*4        e_Ca       (nr__2) ! ([Sun]) ?=- rms uncertainty on Ca
      integer*4     o_Ca       (nr__2) ! ?=- Number of lines used for Ca
      real*4        Ti         (nr__2) ! ([Sun]) ?=- Titanium abundance (2)
      real*4        e_Ti       (nr__2) ! ([Sun]) ?=- rms uncertainty on Ti
      integer*4     o_Ti       (nr__2) ! ?=- Number of lines used for Ti
      real*4        V          (nr__2) ! ([Sun]) ?=- Vanadium abundance (2)
      real*4        e_V        (nr__2) ! ([Sun]) ?=- rms uncertainty on V
      integer*4     o_V        (nr__2) ! ?=- Number of lines used for V
      real*4        Cr         (nr__2) ! ([Sun]) ?=- Chromium abundance (2)
      real*4        e_Cr       (nr__2) ! ([Sun]) ?=- rms uncertainty on Cr
      integer*4     o_Cr       (nr__2) ! ?=- Number of lines used for Cr
      real*4        Fe         (nr__2) ! ([Sun]) ?=- Iron abundance (2)
      real*4        e_Fe       (nr__2) ! ([Sun]) ?=- rms uncertainty on Fe
      integer*4     o_Fe       (nr__2) ! ?=- Number of lines used for Fe
      real*4        Ni         (nr__2) ! ([Sun]) ?=- Nickel abundance (2)
      real*4        e_Ni       (nr__2) ! ([Sun]) ?=- rms uncertainty on Ni
      integer*4     o_Ni       (nr__2) ! ?=- Number of lines used for Ni
*Note (1): For each star there are two rows: One for the neutral species and
*          one for the singly-ionized species (for example Fe 1 and Fe 2).
*Note (2): All abundances are relative to the Solar values.
*     "---"  means that no lines were available to determine the abundance.

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

C  Loading file 'table1.dat'	! Atomic data used in the spectral analysis

C  Format for file interpretation

    1 format(1X,A4,2X,F8.3,1X,F6.3,1X,F6.3,1X,F7.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,1042
        read(1,'(A37)')ar__
        read(ar__,1)
     +  El(i__),lambda(i__),Ep(i__),loggfV(i__),loggf(i__)
c    ..............Just test output...........
        write(6,1)
     +  El(i__),lambda(i__),Ep(i__),loggfV(i__),loggf(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Observed targets and their properties

C  Format for file interpretation

    2 format(
     +  I8,1X,I5,1X,I6,1X,F6.3,1X,F5.3,1X,F4.2,1X,F4.2,1X,I4,1X,F4.2,
     +  1X,F5.2,1X,I4,1X,F4.2,1X,I4,1X,F4.2,1X,F5.2,1X,F4.2,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,93
        read(1,'(A96)')ar__1
        read(ar__1,2)
     +  KIC(i__),HIP(i__),HD(i__),VTmag(i__),VT_K(i__),E_B_V(i__),
     +  e_E_B_V(i__),Teff1(i__),logg1(i__),v_Fe_H_1(i__),Teff2(i__),
     +  logg2(i__),Teff(i__),logg(i__),v_Fe_H_(i__),xi(i__),vsini(i__)
        if(ar__1(10:14) .EQ. '') HIP(i__) = iNULL__
        if(ar__1(16:21) .EQ. '') HD(i__) = iNULL__
        if(ar__1(36:39) .EQ. '') E_B_V(i__) = rNULL__
        if(ar__1(41:44) .EQ. '') e_E_B_V(i__) = rNULL__
        if(ar__1(46:49) .EQ. '') Teff1(i__) = iNULL__
        if(ar__1(51:54) .EQ. '') logg1(i__) = rNULL__
        if(ar__1(56:60) .EQ. '') v_Fe_H_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  KIC(i__),HIP(i__),HD(i__),VTmag(i__),VT_K(i__),E_B_V(i__),
     +  e_E_B_V(i__),Teff1(i__),logg1(i__),v_Fe_H_1(i__),Teff2(i__),
     +  logg2(i__),Teff(i__),logg(i__),v_Fe_H_(i__),xi(i__),vsini(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Abundances relative to the Sun and the number of
*                             lines used for 13 elements

C  Format for file interpretation

    3 format(
     +  I8,1X,I1,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,
     +  2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,
     +  F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,
     +  I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,
     +  F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3,1X,F5.2,2X,F4.2,1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,186
        read(1,'(A218)')ar__2
        read(ar__2,3)
     +  KIC_1(i__),Ion(i__),Li(i__),e_Li(i__),o_Li(i__),C(i__),
     +  e_C(i__),o_C(i__),N(i__),e_N(i__),o_N(i__),O(i__),e_O(i__),
     +  o_O(i__),Na(i__),e_Na(i__),o_Na(i__),Mg(i__),e_Mg(i__),
     +  o_Mg(i__),Si(i__),e_Si(i__),o_Si(i__),Ca(i__),e_Ca(i__),
     +  o_Ca(i__),Ti(i__),e_Ti(i__),o_Ti(i__),V(i__),e_V(i__),
     +  o_V(i__),Cr(i__),e_Cr(i__),o_Cr(i__),Fe(i__),e_Fe(i__),
     +  o_Fe(i__),Ni(i__),e_Ni(i__),o_Ni(i__)
        if (idig(ar__2(12:16)).EQ.0) Li(i__) =  rNULL__
        if (idig(ar__2(19:22)).EQ.0) e_Li(i__) =  rNULL__
        if (o_Li(i__) .EQ. 45) o_Li(i__) =  iNULL__
        if (idig(ar__2(28:32)).EQ.0) C(i__) =  rNULL__
        if (idig(ar__2(35:38)).EQ.0) e_C(i__) =  rNULL__
        if (o_C(i__) .EQ. 45) o_C(i__) =  iNULL__
        if (idig(ar__2(44:48)).EQ.0) N(i__) =  rNULL__
        if (idig(ar__2(51:54)).EQ.0) e_N(i__) =  rNULL__
        if (o_N(i__) .EQ. 45) o_N(i__) =  iNULL__
        if (idig(ar__2(60:64)).EQ.0) O(i__) =  rNULL__
        if (idig(ar__2(67:70)).EQ.0) e_O(i__) =  rNULL__
        if (o_O(i__) .EQ. 45) o_O(i__) =  iNULL__
        if (idig(ar__2(76:80)).EQ.0) Na(i__) =  rNULL__
        if (idig(ar__2(83:86)).EQ.0) e_Na(i__) =  rNULL__
        if (o_Na(i__) .EQ. 45) o_Na(i__) =  iNULL__
        if (idig(ar__2(92:96)).EQ.0) Mg(i__) =  rNULL__
        if (idig(ar__2(99:102)).EQ.0) e_Mg(i__) =  rNULL__
        if (o_Mg(i__) .EQ. 45) o_Mg(i__) =  iNULL__
        if (idig(ar__2(108:112)).EQ.0) Si(i__) =  rNULL__
        if (idig(ar__2(115:118)).EQ.0) e_Si(i__) =  rNULL__
        if (o_Si(i__) .EQ. 45) o_Si(i__) =  iNULL__
        if (idig(ar__2(124:128)).EQ.0) Ca(i__) =  rNULL__
        if (idig(ar__2(131:134)).EQ.0) e_Ca(i__) =  rNULL__
        if (o_Ca(i__) .EQ. 45) o_Ca(i__) =  iNULL__
        if (idig(ar__2(140:144)).EQ.0) Ti(i__) =  rNULL__
        if (idig(ar__2(147:150)).EQ.0) e_Ti(i__) =  rNULL__
        if (o_Ti(i__) .EQ. 45) o_Ti(i__) =  iNULL__
        if (idig(ar__2(156:160)).EQ.0) V(i__) =  rNULL__
        if (idig(ar__2(163:166)).EQ.0) e_V(i__) =  rNULL__
        if (o_V(i__) .EQ. 45) o_V(i__) =  iNULL__
        if (idig(ar__2(172:176)).EQ.0) Cr(i__) =  rNULL__
        if (idig(ar__2(179:182)).EQ.0) e_Cr(i__) =  rNULL__
        if (o_Cr(i__) .EQ. 45) o_Cr(i__) =  iNULL__
        if (idig(ar__2(188:192)).EQ.0) Fe(i__) =  rNULL__
        if (idig(ar__2(195:198)).EQ.0) e_Fe(i__) =  rNULL__
        if (o_Fe(i__) .EQ. 45) o_Fe(i__) =  iNULL__
        if (idig(ar__2(204:208)).EQ.0) Ni(i__) =  rNULL__
        if (idig(ar__2(211:214)).EQ.0) e_Ni(i__) =  rNULL__
        if (o_Ni(i__) .EQ. 45) o_Ni(i__) =  iNULL__
c    ..............Just test output...........
        write(6,3)
     +  KIC_1(i__),Ion(i__),Li(i__),e_Li(i__),o_Li(i__),C(i__),
     +  e_C(i__),o_C(i__),N(i__),e_N(i__),o_N(i__),O(i__),e_O(i__),
     +  o_O(i__),Na(i__),e_Na(i__),o_Na(i__),Mg(i__),e_Mg(i__),
     +  o_Mg(i__),Si(i__),e_Si(i__),o_Si(i__),Ca(i__),e_Ca(i__),
     +  o_Ca(i__),Ti(i__),e_Ti(i__),o_Ti(i__),V(i__),e_V(i__),
     +  o_V(i__),Cr(i__),e_Cr(i__),o_Cr(i__),Fe(i__),e_Fe(i__),
     +  o_Fe(i__),Ni(i__),e_Ni(i__),o_Ni(i__)
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