FORTRAN Generation
(/./ftp/cats/J/A_A/607/A135)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/607/A135 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-Sep-12
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/A+A/607/A135 NGC 104, 6121 & 6809 AGB and RGB stars Na abundance (Wang+, 2017)
*================================================================================
*Sodium abundances of AGB and RGB stars in Galactic globular clusters
*II. Analysis and results of NGC 104, NGC 6121, and NGC 6809.
*    Wang Y., Primas F., Charbonnel C., Van der Swaelmen M., Bono G.,
*    Chantereau W., Zhao G.
*    <Astron. Astrophys. 607, A135 (2017)>
*    =2017A&A...607A.135W        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Basic information of our sample stars

      integer*4 nr__
      parameter (nr__=282)	! Number of records
      character*176 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*4   NGC        (nr__) ! Globular cluster identification
      character*9   StarID     (nr__) ! Star identification (1)
      character*3   EvolPh     (nr__) ! Evolutionary phase
      character*12  Inst       (nr__) ! Instrument used to obtain the spectrum
      integer*4     RAh        (nr__) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes)
      real*4        RAs        (nr__) ! (s) Right Ascension J2000 (seconds)
      character*1   DE_        (nr__) ! Declination J2000 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination J2000 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes)
      real*4        DEs        (nr__) ! (arcsec) Declination J2000 (seconds)
      real*4        Bmag       (nr__) ! (mag) Apparent B magnitude (2)
      real*4        e_Bmag     (nr__) ! (mag) Error of B magnitude (2)
      real*4        Vmag       (nr__) ! (mag) Apparent V magnitude (2)
      real*4        e_Vmag     (nr__) ! (mag) Error of V magnitude (2)
      real*4        Imag       (nr__) ! (mag) Apparent I magnitude (2)
      real*4        e_Imag     (nr__) ! (mag) Error of I magnitude (2)
      real*4        Jmag       (nr__) ! (mag) ? J magnitude (3)
      real*4        e_Jmag     (nr__) ! (mag) ? Error of J magnitude (3)
      real*4        Hmag       (nr__) ! (mag) ? H magnitude (3)
      real*4        e_Hmag     (nr__) ! (mag) ? Error of H magnitude (3)
      real*4        Kmag       (nr__) ! (mag) ? K magnitude (3)
      real*4        e_Kmag     (nr__) ! (mag) ? Error of K magnitude (3)
      real*4        RV         (nr__) ! (km/s) Barycentric radial velocity
*Note (1): The 'StarID' reports the original ID from the photometric catalogue,
* to which we added the suffix AGB/RGB to ease our own data handling.
*Note (2): The optical photometry (B, V and I) were obtained from the
* Johnson-Morgan photometric database which is part of the project
* described in Stetson (2000PASP..112..925S, 2005PASP..117.1325S).
*Note (3): The infrared J, H and K magnitudes were obtained from the 2MASS
* catalogue (Skrutskie et al., 2006, Cat. VII/233) by coordinates cross-matching.

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

C  Declarations for 'table5.dat'	! Stellar parameters of our sample stars

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

      character*4   NGC_1      (nr__1) ! Globular cluster identification
      character*9   StarID_1   (nr__1) ! Star identification
      character*3   EvolPh_1   (nr__1) ! Evolutionary phase
      integer*4     Teff       (nr__1) ! (K) Effective temperature
      real*4        s_Teff     (nr__1) ! (K) Scatter of the temperature (1)
      real*4        logg       (nr__1) ! Surface gravity
      real*4        Vturb      (nr__1) ! (km/s) Microturbulence velocity
      real*4        v_FeI_H_LTE(nr__1) ! ([-]) LTE [FeI/H] ratio
      real*4        s_FeIline  (nr__1) ! ([-]) Abundance dispersion of FeI lines
      real*4        v_FeII_H_  (nr__1) ! ([-]) Line ratio [FeII/H]
      real*4        s_FeIIline (nr__1) ! ([-]) Abundance dispersion of FeII lines
      real*4        v_FeI_H_NLTE(nr__1) ! ([-]) NLTE [FeI/H] ratio
*Note (1): The s_Teff ({sigma}_Teff_) is the scatter of the temperatures derived
*  from the five colors we considered.

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

C  Declarations for 'table7.dat'	! Na abundances of our sample stars

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

      character*4   NGC_2      (nr__2) ! Globular cluster identification
      character*9   StarID_2   (nr__2) ! Star identification
      character*3   EvolPh_2   (nr__2) ! Evolutionary phase
      real*4        v_Na_H_LTE (nr__2) ! ([-]) ? LTE [Na/H] (1)
      real*4        v_Na_H_NLTE(nr__2) ! ([-]) ? NLTE [Na/H] (1)
      real*4        v_Na_FeI_NLTE(nr__2) ! ([-]) ? NLTE [Na/FeI] (1)
*Note (1): The abundance value is left blank for the stars whose Na line/lines
* are of poor quality or saturate, and no reliable abundance could be derived.

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

C  Loading file 'table3.dat'	! Basic information of our sample stars

C  Format for file interpretation

    1 format(
     +  1X,A4,3X,A9,4X,A3,2X,A12,4X,I2,1X,I2,1X,F5.2,2X,A1,I2,1X,I2,
     +  1X,F5.2,4X,F6.3,2X,F6.4,3X,F6.3,2X,F6.4,3X,F6.3,2X,F6.4,3X,
     +  F6.3,2X,F5.3,3X,F6.3,2X,F5.3,3X,F6.3,2X,F5.3,3X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,282
        read(1,'(A176)')ar__
        read(ar__,1)
     +  NGC(i__),StarID(i__),EvolPh(i__),Inst(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),Bmag(i__),
     +  e_Bmag(i__),Vmag(i__),e_Vmag(i__),Imag(i__),e_Imag(i__),
     +  Jmag(i__),e_Jmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),
     +  e_Kmag(i__),RV(i__)
        if(ar__(123:128) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(131:135) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__(139:144) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(147:151) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__(155:160) .EQ. '') Kmag(i__) = rNULL__
        if(ar__(163:167) .EQ. '') e_Kmag(i__) = rNULL__
        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)
     +  NGC(i__),StarID(i__),EvolPh(i__),Inst(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),Bmag(i__),
     +  e_Bmag(i__),Vmag(i__),e_Vmag(i__),Imag(i__),e_Imag(i__),
     +  Jmag(i__),e_Jmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),
     +  e_Kmag(i__),RV(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 'table5.dat'	! Stellar parameters of our sample stars

C  Format for file interpretation

    2 format(
     +  1X,A4,3X,A9,3X,A3,4X,I4,2X,F5.1,5X,F4.2,5X,F4.2,4X,F5.2,5X,
     +  F4.2,4X,F5.2,5X,F4.2,4X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,282
        read(1,'(A101)')ar__1
        read(ar__1,2)
     +  NGC_1(i__),StarID_1(i__),EvolPh_1(i__),Teff(i__),s_Teff(i__),
     +  logg(i__),Vturb(i__),v_FeI_H_LTE(i__),s_FeIline(i__),
     +  v_FeII_H_(i__),s_FeIIline(i__),v_FeI_H_NLTE(i__)
c    ..............Just test output...........
        write(6,2)
     +  NGC_1(i__),StarID_1(i__),EvolPh_1(i__),Teff(i__),s_Teff(i__),
     +  logg(i__),Vturb(i__),v_FeI_H_LTE(i__),s_FeIline(i__),
     +  v_FeII_H_(i__),s_FeIIline(i__),v_FeI_H_NLTE(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! Na abundances of our sample stars

C  Format for file interpretation

    3 format(1X,A4,3X,A9,3X,A3,4X,F5.2,4X,F5.2,4X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,282
        read(1,'(A50)')ar__2
        read(ar__2,3)
     +  NGC_2(i__),StarID_2(i__),EvolPh_2(i__),v_Na_H_LTE(i__),
     +  v_Na_H_NLTE(i__),v_Na_FeI_NLTE(i__)
        if(ar__2(28:32) .EQ. '') v_Na_H_LTE(i__) = rNULL__
        if(ar__2(37:41) .EQ. '') v_Na_H_NLTE(i__) = rNULL__
        if(ar__2(46:50) .EQ. '') v_Na_FeI_NLTE(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  NGC_2(i__),StarID_2(i__),EvolPh_2(i__),v_Na_H_LTE(i__),
     +  v_Na_H_NLTE(i__),v_Na_FeI_NLTE(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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