FORTRAN Generation
(/./ftp/cats/J/ApJS/168/297)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/168/297 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.8, on 2014-Sep-18
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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. J/ApJS/168/297      Stellar parameters of nearby cool stars      (Takeda+, 2007)
*================================================================================
*Structure and evolution of nearby stars with planets.
*II. Physical properties of ~1000 cool stars from the SPOCS catalog.
*    Takeda G., Ford E.B., Sills A., Rasio F.A., Fischer D.A., Valenti J.A.
*   <Astrophys. J. Suppl. Ser., 168, 297-318 (2007)>
*   =2007ApJS..168..297T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Theoretical stellar parameters

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

      character*10  ID         (nr__) ! Stellar identification (BD or HD number)
      real*4        M          (nr__) ! (solMass) ? Best-estimate stellar mass (1)
      real*4        e_M        (nr__) ! (solMass) ? Lower bound 68.2% credible interval on M (1)
      real*4        E_M_1      (nr__) ! (solMass) ? Upper bound 68.2% credible interval on M (1)
      real*4        M2         (nr__) ! (solMass) ? Second-best mass estimate (1)(2)
      real*4        pM2        (nr__) ! ? Probability of Mass2 relative to Mass
      real*4        Age        (nr__) ! (Gyr) ? Best-estimate stellar age (1)
      real*4        e_Age      (nr__) ! (Gyr) ? Lower bound 68.2% credible interval on Age (1)
      real*4        E_Age_1    (nr__) ! (Gyr) ? Upper bound 68.2% credible interval on Age (1)
      real*4        Age2       (nr__) ! (Gyr) ? Second-best age estimate (1)(2)
      real*4        pAge2      (nr__) ! ? Probability of Age2 relative to Age
      real*4        Rad        (nr__) ! (solRad) Best-estimate stellar radius (1)
      real*4        e_Rad      (nr__) ! (solRad) Lower bound 68.2% credible interval on Rad (1)
      real*4        E_Rad_1    (nr__) ! (solRad) Upper bound 68.2% credible interval on Rad (1)
      real*4        Mce        (nr__) ! (solMass) ? Best-estimate stellar convective zone mass (1)
      real*4        e_Mce      (nr__) ! (solMass) ? Lower bound 68.2% credible interval on Mce (1)
      real*4        E_Mce_1    (nr__) ! (solMass) ? Upper bound 68.2% credible interval on Mce (1)
      real*4        Rce        (nr__) ! (solRad) ? Best-estimate stellar convective
*                                  zone depth (1)(3)
      real*4        e_Rce      (nr__) ! (solRad) ? Lower bound 68.2% credible interval on Rce (1)
      real*4        E_Rce_1    (nr__) ! (solRad) ? Upper bound 68.2% credible interval on Rce (1)
      real*4        logg       (nr__) ! ([cm/s2]) ?Log of the best-estimate surface gravity (1)
      real*4        e_logg     (nr__) ! ([cm/s2]) ?Lower bound 68.2% credible interval on logg (1)
      real*4        E_logg_1   (nr__) ! ([cm/s2]) ?Upper bound 68.2% credible interval on logg (1)
*Note (1): Best-estimate parameters are computed from the mode values
*     of the derived probability distribution functions (PDFs). The
*     best-estimate parameter is left blank if the mode value of a PDF is
*     outside the given parameter range; e.g., if a star has an estimated
*     age of 0 or 14Gyr, the best-estimate age is not listed in the table.
*     Similarly, the lower/upper bound of the credible interval is left
*     blank if it lies outside the given parameter range.
*Note (2): Corresponding to the secondary maximum in the derived posterior
*     probability distribution function (PDF).
*Note (3): Measured from the stellar surface.

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

C  Loading file 'table2.dat'	! Theoretical stellar parameters

C  Format for file interpretation

    1 format(
     +  A10,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F4.2,1X,F5.2,1X,F5.2,
     +  1X,F5.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.3,1X,
     +  F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F4.2,1X,F4.2,1X,F4.2)

C  Effective file loading

      open(unit=1,file='table2.dat', status='old')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,1074
        read(1,'(A138)')ar__
        read(ar__,1)
     +  ID(i__),M(i__),e_M(i__),E_M_1(i__),M2(i__),pM2(i__),Age(i__),
     +  e_Age(i__),E_Age_1(i__),Age2(i__),pAge2(i__),Rad(i__),
     +  e_Rad(i__),E_Rad_1(i__),Mce(i__),e_Mce(i__),E_Mce_1(i__),
     +  Rce(i__),e_Rce(i__),E_Rce_1(i__),logg(i__),e_logg(i__),
     +  E_logg_1(i__)
        if(ar__(12:16) .EQ. '') M(i__) = rNULL__
        if(ar__(18:22) .EQ. '') e_M(i__) = rNULL__
        if(ar__(24:28) .EQ. '') E_M_1(i__) = rNULL__
        if(ar__(30:34) .EQ. '') M2(i__) = rNULL__
        if(ar__(36:39) .EQ. '') pM2(i__) = rNULL__
        if(ar__(41:45) .EQ. '') Age(i__) = rNULL__
        if(ar__(47:51) .EQ. '') e_Age(i__) = rNULL__
        if(ar__(53:57) .EQ. '') E_Age_1(i__) = rNULL__
        if(ar__(59:63) .EQ. '') Age2(i__) = rNULL__
        if(ar__(65:68) .EQ. '') pAge2(i__) = rNULL__
        if(ar__(88:92) .EQ. '') Mce(i__) = rNULL__
        if(ar__(94:98) .EQ. '') e_Mce(i__) = rNULL__
        if(ar__(100:105) .EQ. '') E_Mce_1(i__) = rNULL__
        if(ar__(107:111) .EQ. '') Rce(i__) = rNULL__
        if(ar__(113:117) .EQ. '') e_Rce(i__) = rNULL__
        if(ar__(119:123) .EQ. '') E_Rce_1(i__) = rNULL__
        if(ar__(125:128) .EQ. '') logg(i__) = rNULL__
        if(ar__(130:133) .EQ. '') e_logg(i__) = rNULL__
        if(ar__(135:138) .EQ. '') E_logg_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  ID(i__),M(i__),e_M(i__),E_M_1(i__),M2(i__),pM2(i__),Age(i__),
     +  e_Age(i__),E_Age_1(i__),Age2(i__),pAge2(i__),Rad(i__),
     +  e_Rad(i__),E_Rad_1(i__),Mce(i__),e_Mce(i__),E_Mce_1(i__),
     +  Rce(i__),e_Rce(i__),E_Rce_1(i__),logg(i__),e_logg(i__),
     +  E_logg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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