FORTRAN Generation
(/./ftp/cats/J/MNRAS/448/1314)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/448/1314 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 2024-Apr-16
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/MNRAS/448/1314    Line list for seven target PAndAS clusters   (Sakari+, 2015)
*================================================================================
*Integrated light chemical tagging analyses of seven M31 outer halo globular
*clusters from the Pan-Andromeda Archaeological Survey.
*    Sakari C.M., Venn K.A., Mackey D., Shetrone M.D., Dotter A.,
*    Ferguson A.M.N., Huxor A.
*   <Mon. Not. R. Astron. Soc., 448, 1314-1334 (2015)>
*   =2015MNRAS.448.1314S    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Properties of the target PAndAS clusters

      integer*4 nr__
      parameter (nr__=7)	! Number of records
      character*61 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   Name       (nr__) ! PAndAS cluster name
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        Vint       (nr__) ! (mag) Integrated V-band magnitude
      real*4        Rproj      (nr__) ! (kpc) Projected distance from the centre of M31
      character*5   v_Fe_H_    (nr__) ! ([-]) Photometric metallicity estimate (1)
      character*1   n__Fe_H_   (nr__) ! [c] Note on [Fe/H] (2)
      character*9   Assoc      (nr__) ! Spatial association with stream? (N=No)
      character*5   Ref        (nr__) ! Reference(s) (3)
*Note (1): Used to constrain the parameters of the input isochrones; see
*          Section 3. [Fe/H] estimates are based on Galactic GC fiducial fits.
*          "MP" indicates a metal-poor cluster ([Fe/H]~< -1.5); fiducial fits 
*          will be given in Mackey et al. (2016MNRAS.460L.114M).
*Note (2): Note as follows:
*  c = PA17 does not have an HST CMD, and there is therefore no a priori
*      information about its metallicity or horizontal branch (HB) morphology.
*Note (3): Reference as follows:
*  1 = Mackey et al. (2007ApJ...655L..85M);
*  2 = Veljanoski et al. (2014MNRAS.442.2929V);
*  3 = Huxor et al. (2014MNRAS.442.2165H);
*  4 = Mackey et al. (2016MNRAS.460L.114M).

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

C  Declarations for 'table3.dat'	! The Line List

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

      real*8        lambda     (nr__1) ! (0.1nm) Spectral line wavelength ({AA})
      character*4   El         (nr__1) ! Element and ionization state
      real*4        EP         (nr__1) ! (eV) Excitation Potential
      real*4        loggf      (nr__1) ! ([-]) Oscillator strength
      real*4        EW_H10     (nr__1) ! (0.1pm) ?=- H10 equivalent width (m{AA})
      character*1   n_EW_H10   (nr__1) ! [s] Mote on EW-H10 (1)
      real*4        EW_H23     (nr__1) ! (0.1pm) ?=- H23 equivalent width (m{AA})
      character*1   n_EW_H23   (nr__1) ! [s] Mote on EW-H23 (1)
      real*4        EW_PA06    (nr__1) ! (0.1pm) ?=- PA06 equivalent width (m{AA})
      character*1   n_EW_PA06  (nr__1) ! [s] Mote on EW-PA06 (1)
      real*4        EW_PA17    (nr__1) ! (0.1pm) ?=- PA17 equivalent width (m{AA})
      character*1   n_EW_PA17  (nr__1) ! [s] Mote on EW-PA17 (1)
      real*4        EW_PA53    (nr__1) ! (0.1pm) ?=- PA53 equivalent width (m{AA})
      character*1   n_EW_PA53  (nr__1) ! [s] Mote on EW-PA53 (1)
      real*4        EW_PA54    (nr__1) ! (0.1pm) ?=- PA54 equivalent width (m{AA})
      character*1   n_EW_PA54  (nr__1) ! [s] Mote on EW-PA54 (1)
      real*4        EW_PA56    (nr__1) ! (0.1pm) ?=- PA56 equivalent width (m{AA})
      character*1   n_EW_PA56  (nr__1) ! [s] Mote on EW-PA56 (1)
*Note (1): s indicates that the lines were measured with spectrum syntheses.

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

C  Loading file 'table1.dat'	! Properties of the target PAndAS clusters

C  Format for file interpretation

    1 format(
     +  A4,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.1,1X,F5.1,
     +  1X,A5,A1,1X,A9,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,7
        read(1,'(A61)')ar__
        read(ar__,1)
     +  Name(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Vint(i__),Rproj(i__),v_Fe_H_(i__),
     +  n__Fe_H_(i__),Assoc(i__),Ref(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)
     +  Name(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Vint(i__),Rproj(i__),v_Fe_H_(i__),
     +  n__Fe_H_(i__),Assoc(i__),Ref(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 'table3.dat'	! The Line List

C  Format for file interpretation

    2 format(
     +  F8.3,1X,A4,1X,F5.3,1X,F6.3,1X,F5.1,A1,F5.1,A1,F5.1,A1,F5.1,A1,
     +  F5.1,A1,F4.1,A1,F5.1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,129
        read(1,'(A68)')ar__1
        read(ar__1,2)
     +  lambda(i__),El(i__),EP(i__),loggf(i__),EW_H10(i__),
     +  n_EW_H10(i__),EW_H23(i__),n_EW_H23(i__),EW_PA06(i__),
     +  n_EW_PA06(i__),EW_PA17(i__),n_EW_PA17(i__),EW_PA53(i__),
     +  n_EW_PA53(i__),EW_PA54(i__),n_EW_PA54(i__),EW_PA56(i__),
     +  n_EW_PA56(i__)
        if (idig(ar__1(28:32)).EQ.0) EW_H10(i__) =  rNULL__
        if (idig(ar__1(34:38)).EQ.0) EW_H23(i__) =  rNULL__
        if (idig(ar__1(40:44)).EQ.0) EW_PA06(i__) =  rNULL__
        if (idig(ar__1(46:50)).EQ.0) EW_PA17(i__) =  rNULL__
        if (idig(ar__1(52:56)).EQ.0) EW_PA53(i__) =  rNULL__
        if (idig(ar__1(58:61)).EQ.0) EW_PA54(i__) =  rNULL__
        if (idig(ar__1(63:67)).EQ.0) EW_PA56(i__) =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  lambda(i__),El(i__),EP(i__),loggf(i__),EW_H10(i__),
     +  n_EW_H10(i__),EW_H23(i__),n_EW_H23(i__),EW_PA06(i__),
     +  n_EW_PA06(i__),EW_PA17(i__),n_EW_PA17(i__),EW_PA53(i__),
     +  n_EW_PA53(i__),EW_PA54(i__),n_EW_PA54(i__),EW_PA56(i__),
     +  n_EW_PA56(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end