FORTRAN Generation
(/./ftp/cats/J/ApJ/819/135)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/819/135 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-Aug-14
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/819/135      Lithium-rich giants in globular clusters      (Kirby+, 2016)
*================================================================================
*Lithium-rich giants in globular clusters.
*    Kirby E.N., Guhathakurta P., Zhang A.J., Hong J., Guo M., Guo R.,
*    Cohen J.G., Cunha K.
*   <Astrophys. J., 819, 135 (2016)>
*   =2016ApJ...819..135K    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Globular clusters observed

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*8   GC         (nr__) ! Globular cluster identifier
      character*3   OID        (nr__) ! Messier number
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000) (2)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      integer*4     RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000) (2)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000) (2)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      integer*4     DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      character*62  r_GC       (nr__) ! Reference for GC catalog (3)
*Note (2): Cluster coordinates are from the compilation of
*          Harris (1996, VII/202; updated 2010 arXiv:1012.3224) and
*          references therein.
*Note (3):
*  Stetson = photometry by P.B. Stetson. Most of the photometry is available at
*      http://www2.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/community/STETSON/standards/,
*      but Stetson provided some of it directly to us.
*  SDSS    = photometry from the Sloan Digital Sky Survey
*            (Abazajian et al. 2009, II/294).

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

C  Declarations for 'table2.dat'	! DEIMOS observations

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

      character*8   GC_1       (nr__1) ! Globular cluster identifier
      character*3   OID_1      (nr__1) ! Messier number
      character*7   Slit       (nr__1) ! Slitmask name
      character*1   f_Slit     (nr__1) ! [a] a: Observations by
*                                   Simon & Geha (2007ApJ...670..313S)
      integer*4     Nt         (nr__1) ! [22/177]? Number of targets on the slitmask
      character*11  Date       (nr__1) ! ("Y/M/D") UT date of observation
      real*4        Airmass    (nr__1) ! [1/2.1]? Airmass
      real*4        Seeing     (nr__1) ! (arcsec) [0.5/1.2]? Seeing
      integer*4     Nx         (nr__1) ! [1/5]? Number of exposures
      integer*4     Exp        (nr__1) ! (s) [300/7200]? Total exposure time

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

C  Declarations for 'table3.dat'	! Line list

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

      real*8        lambda     (nr__2) ! (0.1nm) [6697.1/6717] Wavelength in air
      character*3   Species    (nr__2) ! Element or molecule name
      character*2   State      (nr__2) ! ? Ionization state
      real*4        EP         (nr__2) ! (eV) [0/14.5] Excitation potential
      real*8        log_gf     (nr__2) ! [-5.1/0.4] Oscillator strength

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

C  Declarations for 'table4.dat'	! Stellar properties and Lithium abundances;
                                 updated version sent by the author

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg_1    (nr__3) ! (deg) Right Ascension J2000
      real*8        DEdeg_1    (nr__3) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*3   OID_2      (nr__3) ! Messier globular cluster identifier
      character*8   GC_2       (nr__3) ! Globular cluster identifier
      character*15  Name       (nr__3) ! Star name
      integer*4     RAh_1      (nr__3) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_1      (nr__3) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_1      (nr__3) ! (s) Second of Right Ascension (J2000)
      character*1   DE__1      (nr__3) ! Sign of the Declination (J2000)
      integer*4     DEd_1      (nr__3) ! (deg) Degree of Declination (J2000)
      integer*4     DEm_1      (nr__3) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs_1      (nr__3) ! (arcsec) Arcsecond of Declination (J2000)
      character*3   Branch     (nr__3) ! "RGB" or "AGB" star
      real*4        Vmag       (nr__3) ! (mag) [11.9/21.9] Extinction-corrected apparent
*                                   V magnitude
      real*4        B_V        (nr__3) ! (mag) [0.2/1.9]? Reddening-corrected B-V color index
      real*4        V_I        (nr__3) ! (mag) [0.4/1.8]? Reddening-corrected V-I color index
      real*4        VMag_1     (nr__3) ! (mag) [-2.9/3.4] Extinction-corrected absolute
*                                   V magnitude
      integer*4     Teff       (nr__3) ! (K) [3852/6727] Effective temperature
      real*4        log_g      (nr__3) ! ([cm/s2]) [0.2/3.6] Log surface gravity
      real*4        v_Fe_H_    (nr__3) ! ([Sun]) [-3.1/-0.3] Log Iron abundance relative
*                                   to the Sun
      real*4        e__Fe_H_   (nr__3) ! ([Sun]) [0.1/1] Uncertainty in [Fe/H]
      character*1   l_A_Li     (nr__3) ! Upper limit flag for A(Li)
      real*4        A_Li       (nr__3) ! [-1.4/7.5] Lithium abundance
      real*4        e_A_Li     (nr__3) ! [0.1/0.4]? Uncertainty in A(Li)

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

C  Loading file 'table1.dat'	! Globular clusters observed

C  Format for file interpretation

    1 format(A8,1X,A3,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,A62)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,25
        read(1,'(A94)')ar__
        read(ar__,1)
     +  GC(i__),OID(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),r_GC(i__)
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  GC(i__),OID(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),r_GC(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! DEIMOS observations

C  Format for file interpretation

    2 format(
     +  A8,1X,A3,1X,A7,1X,A1,1X,I3,1X,A11,1X,F3.1,1X,F3.1,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,81
        read(1,'(A53)')ar__1
        read(ar__1,2)
     +  GC_1(i__),OID_1(i__),Slit(i__),f_Slit(i__),Nt(i__),Date(i__),
     +  Airmass(i__),Seeing(i__),Nx(i__),Exp(i__)
        if(ar__1(24:26) .EQ. '') Nt(i__) = iNULL__
        if(ar__1(40:42) .EQ. '') Airmass(i__) = rNULL__
        if(ar__1(44:46) .EQ. '') Seeing(i__) = rNULL__
        if(ar__1(48:48) .EQ. '') Nx(i__) = iNULL__
        if(ar__1(50:53) .EQ. '') Exp(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  GC_1(i__),OID_1(i__),Slit(i__),f_Slit(i__),Nt(i__),Date(i__),
     +  Airmass(i__),Seeing(i__),Nx(i__),Exp(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Line list

C  Format for file interpretation

    3 format(F9.4,1X,A3,1X,A2,1X,F6.3,1X,F7.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,356
        read(1,'(A31)')ar__2
        read(ar__2,3)
     +  lambda(i__),Species(i__),State(i__),EP(i__),log_gf(i__)
c    ..............Just test output...........
        write(6,3)
     +  lambda(i__),Species(i__),State(i__),EP(i__),log_gf(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Stellar properties and Lithium abundances;
*                                 updated version sent by the author

C  Format for file interpretation

    4 format(
     +  A3,1X,A8,1X,A15,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,
     +  A3,1X,F5.2,1X,F4.2,1X,F4.2,1X,F5.2,1X,I4,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,A1,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,2227
        read(1,'(A111)')ar__3
        read(ar__3,4)
     +  OID_2(i__),GC_2(i__),Name(i__),RAh_1(i__),RAm_1(i__),
     +  RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),
     +  Branch(i__),Vmag(i__),B_V(i__),V_I(i__),VMag_1(i__),Teff(i__),
     +  log_g(i__),v_Fe_H_(i__),e__Fe_H_(i__),l_A_Li(i__),A_Li(i__),
     +  e_A_Li(i__)
        if(ar__3(64:67) .EQ. '') B_V(i__) = rNULL__
        if(ar__3(69:72) .EQ. '') V_I(i__) = rNULL__
        if(ar__3(108:111) .EQ. '') e_A_Li(i__) = rNULL__
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,4)
     +  OID_2(i__),GC_2(i__),Name(i__),RAh_1(i__),RAm_1(i__),
     +  RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),
     +  Branch(i__),Vmag(i__),B_V(i__),V_I(i__),VMag_1(i__),Teff(i__),
     +  log_g(i__),v_Fe_H_(i__),e__Fe_H_(i__),l_A_Li(i__),A_Li(i__),
     +  e_A_Li(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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