FORTRAN Generation
(/./ftp/cats/J/ApJ/794/60)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/794/60 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-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__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. J/ApJ/794/60                SDSS RGB stars distances                (Tan+, 2014)
*================================================================================
*Red giant stars from the Sloan Digital Sky Survey.
*II. Distances.
*    Tan K., Chen Y., Carrell K., Zhao J., Zhao G.
*   <Astrophys. J., 794, 60 (2014)>
*   =2014ApJ...794...60T    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Parameters of the Sample Stars

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Plate       ! SDSS plate identifier
      integer*4     MJD         ! (d) Modified Julian Date of the observation
      integer*4     Fiber       ! SDSS fiber identifier
      real*8        RAdeg       ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg       ! (deg) Declination in decimal degrees (J2000)
      real*4        v_Fe_H_     ! ([-]) Metallicity
      real*4        e__Fe_H_    ! ([-]) Uncertainty in [Fe/H]
      integer*4     Teff        ! (K) Effective temperature
      integer*4     e_Teff      ! (K) Uncertainty in Teff
      real*4        log_g       ! ([cm/s2]) Log of the surface gravity
      real*4        e_log_g     ! ([cm/s2]) Uncertainty in log(g)
      real*4        HRV         ! (km/s) Heliocentric radial velocity
      real*4        gmag        ! (mag) SDSS g band magnitude; extinction corrected
      real*4        g_r         ! (mag) SDSS (g-r) color; extinction corrected
      real*4        e_gmag      ! (mag) Uncertainty in gmag
      real*4        e_rmag      ! (mag) Uncertainty in the r band magnitude
      real*4        Dfid        ! (kpc) Distance based on fiducials
      real*4        e_Dfid      ! (kpc) Uncertainty in Dfid
      real*4        Dall        ! (kpc) Distance based on isochrones; all parameters
*                                     included
      real*4        e_Dall      ! (kpc) Uncertainty in Dall
      real*4        D4          ! (kpc) Distance based on isochrones (1)
      real*4        e_D4        ! (kpc) Uncertainty in D4
      real*4        D3          ! (kpc) Distance based on isochrones (2)
      real*4        e_D3        ! (kpc) Uncertainty in D3
*Note (1): With [Fe/H], (g-r)_0_, and Teff included.
*Note (2): With only [Fe/H] and (g-r)_0_ included.

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

C  Loading file 'table2.dat'	! Parameters of the Sample Stars

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,17941
        read(1,'(A146)')ar__
        read(ar__,1)
     +  Plate,MJD,Fiber,RAdeg,DEdeg,v_Fe_H_,e__Fe_H_,Teff,e_Teff,
     +  log_g,e_log_g,HRV,gmag,g_r,e_gmag,e_rmag,Dfid,e_Dfid,Dall,
     +  e_Dall,D4,e_D4,D3,e_D3
c    ..............Just test output...........
        write(6,1)
     +  Plate,MJD,Fiber,RAdeg,DEdeg,v_Fe_H_,e__Fe_H_,Teff,e_Teff,
     +  log_g,e_log_g,HRV,gmag,g_r,e_gmag,e_rmag,Dfid,e_Dfid,Dall,
     +  e_Dall,D4,e_D4,D3,e_D3
c    .......End.of.Just test output...........
      end do
      close(1)

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