FORTRAN Generation
(/./ftp/cats/J/ApJ/835/172)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/835/172 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 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/ApJ/835/172 Kepler asteroseismic LEGACY sample. I. Oscillations (Lund+, 2017)
*================================================================================
*Standing on the shoulders of dwarfs: the Kepler asteroseismic LEGACY sample.
*I. Oscillation mode parameters.
*    Lund M.N., Silva Aguirre V., Davies G.R., Chaplin W.J.,
*    Christensen-Dalsgaard J., Houdek G., White T.R., Bedding T.R., Ball W.H.,
*    Huber D., Antia H.M., Lebreton Y., Latham D.W., Handberg R., Verma K.,
*    Basu S., Casagrande L., Justesen A.B., Kjeldsen H., Mosumgaard J.R.
*   <Astrophys. J., 835, 172-172 (2017)>
*   =2017ApJ...835..172L    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Parameters for the targets in the studied sample

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

      character*8   KIC        (nr__) ! KIC number
      character*9   Name       (nr__) ! Popular name
      real*4        Kpmag      (nr__) ! (mag) [5.8/11] Kepler magnitude
      integer*4     numax      (nr__) ! (uHz) [885/4197] Frequency of maximum amplitude
*                                    ({nu}_max_) (1)
      real*4        Dnu        (nr__) ! (uHz) [48.4/173.5] Large frequency separation
*                                    ({Delta}{nu}) (1)
      integer*4     N          (nr__) ! [22/59] Number of peak-bagged modes
      character*6   Cat        (nr__) ! Category according
*                                    to Appourchaux+ (2012A&A...543A..54A);
*                                    "F-like" or "Simple" (44 occurrences)
      character*8   BkQ        (nr__) ! Braketing quarters (2)
      character*18  MgQ        (nr__) ! Missing quarters (2)
      integer*4     Teff       (nr__) ! (K) [5180/6642] Effective temperature (3)
      integer*4     e_Teff     (nr__) ! (K) [50/180] Teff uncertainty (4)
      integer*4     r_Teff     (nr__) ! [1/6]? Reference for Teff (5)
      real*4        v_Fe_H_    (nr__) ! ([-]) [-1/0.4] Metallicity (3)
      real*4        e__Fe_H_   (nr__) ! ([-]) [0.02/0.2] [Fe/H] uncertainty (4)
      integer*4     r__Fe_H_   (nr__) ! [1/6]? Reference for [Fe/H] (5)
      real*4        logg       (nr__) ! ([cm/s2]) [3.9/4.6] Log surface gravity from Paper II
*                                    (Silva Aguirre+, 2017, J/ApJ/835/173)
      real*4        e_logg     (nr__) ! ([cm/s2]) [0.002/0.02] Negative uncertainty on logg
      real*4        E_logg_1   (nr__) ! ([cm/s2]) [0.002/0.02] Positive uncertainty on logg
      real*8        Vlos       (nr__) ! (km/s) [-116/32]? Line-of-sight velocity (3)
      real*4        e_Vlos     (nr__) ! (km/s) [0.1]? Vlos uncertainty
      real*4        vsini      (nr__) ! (km/s) [0/24.1]? Rotational velocity (3)
      real*4        e_vsini    (nr__) ! (km/s) [0.5]? vsini uncertainty
*Note (1): For uncertainties in {nu}_max_ and {Delta}{nu} see Table 2.
*Note (2): First-last Kepler quarters during which the targets were observed in
*          short-cadence (SC), and which quarters were missing in between.
*Note (3): Metallicities, temperatures, line of sight (LOS) velocities, and
*          vsini values are adopted from the Stellar Parameters Classification
*          tool (SPC; see Buchhave+ 2012, J/other/Nat/486.375) analysis of the
*          targets unless otherwise indicated (see Note (5)).
*Note (4): Systematic uncertainties of +/-59K (Teff) and +/-0.062dex ([Fe/H])
*          have been added in quadrature as suggested
*          by Torres+ (2012, J/ApJ/757/161).
*Note (5): Reference as follows:
*  1 = Pinsonneault et al. (2012, J/ApJS/199/30)
*  2 = Pinsonneault et al. (2014, J/ApJS/215/19)
*  3 = the SAGA project (Casagrande+ 2014, J/ApJ/787/110;
*       see http://www.mso.anu.edu.au/saga/saga_home.html)
*  4 = Ramirez et al. (2009, J/A+A/508/L17)
*  5 = Chaplin et al. (2014, J/ApJS/210/1)
*  6 = Huber et al. (2013, J/ApJ/767/127)

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

C  Declarations for 'table6.dat'	! *Extracted mode parameters and quality control
                                (Equations in section 3.2.3) for all sources
                                including the Sun

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

      character*8   KIC_1      (nr__1) ! Kepler Input Catalog Identifier or "Sun"
      integer*4     n_1        (nr__1) ! [8/31] Radial order
      integer*4     l          (nr__1) ! [0/3] Angular degree
      real*8        Freq       (nr__1) ! (uHz) [527.6/5729.7] Frequency
      real*8        e_Freq     (nr__1) ! (uHz) [0.03/6] Lower error on Freq
      real*8        E_Freq_1   (nr__1) ! (uHz) [0.03/6] Upper error on Freq
      real*8        Amp        (nr__1) ! (ppm) [0.05/6.5]? Amplitude
      real*8        e_Amp      (nr__1) ! (ppm) [0.02/0.8]? Lower error on Amp
      real*8        E_Amp_1    (nr__1) ! (ppm) [0.03/0.7]? Upper error on Amp
      real*8        Width      (nr__1) ! (uHz) [0.2/14.9]? Line width
      real*8        e_Width    (nr__1) ! (uHz) [0.04/4.3]? Lower error on Width
      real*8        E_Width_1  (nr__1) ! (uHz) [0.04/7.5]? Upper error on Width
      character*1   l_lnK      (nr__1) ! Limit flag on lnK
      real*4        lnK        (nr__1) ! ([-]) [-1.4/6] Natural log of Bayes factor

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

C  Declarations for 'table7.dat'	! *The calculated mode frequency difference ratios
                                r_01,10,02(n)_ (Equation 16) for all sources
                                including the Sun

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

      character*8   KIC_2      (nr__2) ! Kepler Input Catalog Identifier or "Sun"
      character*5   Type       (nr__2) ! Ratio type (r_01_, r_02_ or r_10_) (1)
      integer*4     n_2        (nr__2) ! [10/30] Radial order
      real*8        Ratio      (nr__2) ! [-0.02/0.15] Mode frequency difference ratio
      real*8        e_Ratio    (nr__2) ! [0.0003/0.07] Lower error on Ratio
      real*8        E_Ratio_1  (nr__2) ! [0.0003/0.06] Upper error on Ratio
*Note (1): Corresponding to the frequency ratios defined as
*          (Roxburgh & Vorontsov 2003A&A...411..215R):
*          r_01_(n)=d_01_(n)/{Delta}{nu}_1_(n),
*          r_10_(n)=d_10_(n)/{Delta}{nu}_0_(n+1),
*          r_02_(n)=({nu}_n,0_-{nu}_n-1,2_)/{Delta}{nu}_1_(n)
*          See Equation 16 in section 3.3.

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

C  Declarations for 'table8.dat'	! *Calculated second differences {Delta}_2_{nu}(n,l)
                                (Equation 20) for all sources and the Sun

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

      character*8   KIC_3      (nr__3) ! Kepler Input Catalog Identifier or "Sun"
      integer*4     n_3        (nr__3) ! [9/30] Radial order
      integer*4     l_1        (nr__3) ! [0/3] Angular degree
      real*8        Del2nu     (nr__3) ! (uHz) [-11.4/12.1] Calculated 2nd difference
*                                {Delta}_2_{nu} (1)
      real*8        e_Del2nu   (nr__3) ! (uHz) [0.05/15.5] Lower error in Del2nu
      real*8        E_Del2nu_1 (nr__3) ! (uHz) [0.06/12.1] Upper error in Del2nu
*Note (1): The second differences - Equation (20):
*          {Delta}_2_{nu}(n,l)={nu}_n-1,l_-2{nu}_n,l_+{nu}_n+1,l_

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

C  Loading file 'table1.dat'	! Parameters for the targets in the studied sample

C  Format for file interpretation

    1 format(
     +  A8,1X,A9,1X,F5.2,1X,I4,1X,F5.1,1X,I2,1X,A6,1X,A8,1X,A18,1X,I4,
     +  1X,I3,1X,I1,1X,F5.2,1X,F4.2,1X,I1,1X,F5.3,1X,F5.3,1X,F5.3,1X,
     +  F7.2,1X,F4.2,1X,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,66
        read(1,'(A139)')ar__
        read(ar__,1)
     +  KIC(i__),Name(i__),Kpmag(i__),numax(i__),Dnu(i__),N(i__),
     +  Cat(i__),BkQ(i__),MgQ(i__),Teff(i__),e_Teff(i__),r_Teff(i__),
     +  v_Fe_H_(i__),e__Fe_H_(i__),r__Fe_H_(i__),logg(i__),
     +  e_logg(i__),E_logg_1(i__),Vlos(i__),e_Vlos(i__),vsini(i__),
     +  e_vsini(i__)
        if(ar__(84:84) .EQ. '') r_Teff(i__) = iNULL__
        if(ar__(97:97) .EQ. '') r__Fe_H_(i__) = iNULL__
        if(ar__(117:123) .EQ. '') Vlos(i__) = rNULL__
        if(ar__(125:128) .EQ. '') e_Vlos(i__) = rNULL__
        if(ar__(130:134) .EQ. '') vsini(i__) = rNULL__
        if(ar__(136:139) .EQ. '') e_vsini(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  KIC(i__),Name(i__),Kpmag(i__),numax(i__),Dnu(i__),N(i__),
     +  Cat(i__),BkQ(i__),MgQ(i__),Teff(i__),e_Teff(i__),r_Teff(i__),
     +  v_Fe_H_(i__),e__Fe_H_(i__),r__Fe_H_(i__),logg(i__),
     +  e_logg(i__),E_logg_1(i__),Vlos(i__),e_Vlos(i__),vsini(i__),
     +  e_vsini(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! *Extracted mode parameters and quality control
*                                (Equations in section 3.2.3) for all sources
*                                including the Sun

C  Format for file interpretation

    2 format(
     +  A8,1X,I2,1X,I1,1X,F10.5,1X,F7.5,1X,F7.5,1X,F7.5,1X,F7.5,1X,
     +  F7.5,1X,F8.5,1X,F7.5,1X,F7.5,1X,A1,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,2927
        read(1,'(A96)')ar__1
        read(ar__1,2)
     +  KIC_1(i__),n_1(i__),l(i__),Freq(i__),e_Freq(i__),
     +  E_Freq_1(i__),Amp(i__),e_Amp(i__),E_Amp_1(i__),Width(i__),
     +  e_Width(i__),E_Width_1(i__),l_lnK(i__),lnK(i__)
        if(ar__1(42:48) .EQ. '') Amp(i__) = rNULL__
        if(ar__1(50:56) .EQ. '') e_Amp(i__) = rNULL__
        if(ar__1(58:64) .EQ. '') E_Amp_1(i__) = rNULL__
        if(ar__1(66:73) .EQ. '') Width(i__) = rNULL__
        if(ar__1(75:81) .EQ. '') e_Width(i__) = rNULL__
        if(ar__1(83:89) .EQ. '') E_Width_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  KIC_1(i__),n_1(i__),l(i__),Freq(i__),e_Freq(i__),
     +  E_Freq_1(i__),Amp(i__),e_Amp(i__),E_Amp_1(i__),Width(i__),
     +  e_Width(i__),E_Width_1(i__),l_lnK(i__),lnK(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! *The calculated mode frequency difference ratios
*                                r_01,10,02(n)_ (Equation 16) for all sources
*                                including the Sun

C  Format for file interpretation

    3 format(A8,1X,A5,1X,I2,1X,F8.5,1X,F7.5,1X,F7.5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,2541
        read(1,'(A42)')ar__2
        read(ar__2,3)
     +  KIC_2(i__),Type(i__),n_2(i__),Ratio(i__),e_Ratio(i__),
     +  E_Ratio_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  KIC_2(i__),Type(i__),n_2(i__),Ratio(i__),e_Ratio(i__),
     +  E_Ratio_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table8.dat'	! *Calculated second differences {Delta}_2_{nu}(n,l)
*                                (Equation 20) for all sources and the Sun

C  Format for file interpretation

    4 format(A8,1X,I2,1X,I1,1X,F9.5,1X,F8.5,1X,F8.5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table8.dat')
      write(6,*) '....Loading file: table8.dat'
      do i__=1,2489
        read(1,'(A41)')ar__3
        read(ar__3,4)
     +  KIC_3(i__),n_3(i__),l_1(i__),Del2nu(i__),e_Del2nu(i__),
     +  E_Del2nu_1(i__)
c    ..............Just test output...........
        write(6,4)
     +  KIC_3(i__),n_3(i__),l_1(i__),Del2nu(i__),e_Del2nu(i__),
     +  E_Del2nu_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end