FORTRAN Generation
(/./ftp/cats/J/ApJ/836/5)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/836/5 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-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/836/5       Abundances of LAMOST giants from APOGEE DR12       (Ho+, 2017)
*================================================================================
*Label transfer from APOGEE to LAMOST: precise stellar parameters for 450000
*LAMOST giants.
*    Ho A.Y.Q., Ness M.K., Hogg D.W., Rix H.-W., Liu C., Yang F., Zhang Y.,
*    Hou Y., Wang Y.
*   <Astrophys. J., 836, 5-5 (2017)>
*   =2017ApJ...836....5H    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Stellar labels (Teff, logg, [Fe/H], and [{alpha}/M])
                             for 454180 stars, inferred by The Cannon directly
                             from LAMOST spectra

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

C  J2000 position composed of: RAdeg DEdeg
      character*45  SpecID      ! LAMOST unique identifier (format
*                                 "spec-{LMJD}-{PlanId}-sp{spId}-{FiberId}.fits")
      real*8        RAdeg       ! (deg) Right ascension in decimal degrees (J2000)
      real*8        DEdeg       ! (deg) Declination in decimal degrees (J2000)
      real*4        Teff        ! (K) [3622/5895] Effective temperature
      real*8        logg        ! ([cm/s2]) [-0.6/5.1] Log of surface gravity
      real*8        v_Fe_H_     ! ([-]) [-2.8/0.9] Abundance of [Fe/H]
      real*8        v_a_M_      ! ([-]) [-0.2/0.5] [{alpha}/M] abundance
      real*8        e_Teff      ! (K) [2/57094] Teff uncertainty
      real*4        e_logg      ! ([cm/s2]) [0.0001/1.7] logg uncertainty
      real*8        e__Fe_H_    ! ([-]) [0.00001/1.1] [Fe/H] uncertainty
      real*8        e__a_M_     ! ([-]) [0.00001/0.6] [a/M] uncertainty
      real*4        Chi2        ! [0.02/10] Reduced {chi}^2^

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

C  Loading file 'table1.dat'	! Stellar labels (Teff, logg, [Fe/H], and [{alpha}/M])
*                             for 454180 stars, inferred by The Cannon directly
*                             from LAMOST spectra

C  Format for file interpretation

    1 format(
     +  A45,1X,F12.8,1X,F11.8,1X,F6.1,1X,F7.4,1X,F8.5,1X,F8.5,1X,F7.1,
     +  1X,F6.4,1X,F7.5,1X,F7.5,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,454180
        read(1,'(A139)')ar__
        read(ar__,1)
     +  SpecID,RAdeg,DEdeg,Teff,logg,v_Fe_H_,v_a_M_,e_Teff,e_logg,
     +  e__Fe_H_,e__a_M_,Chi2
c    ..............Just test output...........
        write(6,1)
     +  SpecID,RAdeg,DEdeg,Teff,logg,v_Fe_H_,v_a_M_,e_Teff,e_logg,
     +  e__Fe_H_,e__a_M_,Chi2
c    .......End.of.Just test output...........
      end do
      close(1)

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