FORTRAN Generation
(/./ftp/cats/J/A_A/603/L7)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/603/L7 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-Oct-07
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/603/L7     6 giants atomic data and equivalent widths (Mucciarelli+, 2017)
*================================================================================
*Chemical composition of the stellar cluster Gaia 1: no surprise behind Sirius.
*    Mucciarelli A., Monaco L., Bonifacio P., Saviane I.
*    <Astron. Astrophys. 603, L7 (2017)>
*    =2017A&A...603L...7M        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Main information on the observed MIKE targets

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     ID         (nr__) ! [1/7] Star identification number
      character*16  v2MASS     (nr__) ! 2MASS name (HHMMSSss+DDMMSSs)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination (J2000)
      real*4        Jmag       (nr__) ! (mag) 2MASS J magnitude
      real*4        Ksmag      (nr__) ! (mag) 2MASS Ks magnitude
      real*4        RV         (nr__) ! (km/s) Radial velocity (1)
      integer*4     Teff       (nr__) ! (K) ?=- Effective temperature (1)
      integer*4     e_Teff     (nr__) ! (K) ?=- rms uncertainty on Teff (1)
      real*4        logg       (nr__) ! ([cm/s2]) ?=- Surface gravity (1)
      real*4        e_logg     (nr__) ! ([cm/s2]) ?=- rms uncertainty on logg (1)
      real*4        Vt         (nr__) ! (km/s) ?=- Microturbulent velocity (1)
      real*4        e_Vt       (nr__) ! (km/s) ?=- rms uncertainty on Vt (1)
      integer*4     SNR        (nr__) ! Signal-to-noise ratio measured at 600nm
*Note (1): derived from the MIKE spectra.

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

C  Declarations for 'tablea1.dat'	! Atomic data and equivalent widths

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

      integer*4     ID_1       (nr__1) ! [1/7] Star identification number
      real*4        lambda     (nr__1) ! (0.1nm) Wavelength
      real*4        Element    (nr__1) ! Element
      real*4        log_gf     (nr__1) ! Oscillator strength
      real*4        Ep         (nr__1) ! (eV) Excitation potential
      real*4        EW         (nr__1) ! (0.1pm) Measured equivalent width

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

C  Loading file 'table1.dat'	! Main information on the observed MIKE targets

C  Format for file interpretation

    1 format(
     +  I1,6X,A16,1X,F10.6,1X,F10.6,1X,F6.3,1X,F6.3,1X,F5.1,1X,I4,1X,
     +  I2,1X,F4.2,1X,F4.2,1X,F3.1,1X,F3.1,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,7
        read(1,'(A94)')ar__
        read(ar__,1)
     +  ID(i__),v2MASS(i__),RAdeg(i__),DEdeg(i__),Jmag(i__),
     +  Ksmag(i__),RV(i__),Teff(i__),e_Teff(i__),logg(i__),
     +  e_logg(i__),Vt(i__),e_Vt(i__),SNR(i__)
        if (Teff(i__) .EQ. 45) Teff(i__) =  iNULL__
        if (e_Teff(i__) .EQ. 45) e_Teff(i__) =  iNULL__
        if (idig(ar__(75:78)).EQ.0) logg(i__) =  rNULL__
        if (idig(ar__(80:83)).EQ.0) e_logg(i__) =  rNULL__
        if (idig(ar__(85:87)).EQ.0) Vt(i__) =  rNULL__
        if (idig(ar__(89:91)).EQ.0) e_Vt(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  ID(i__),v2MASS(i__),RAdeg(i__),DEdeg(i__),Jmag(i__),
     +  Ksmag(i__),RV(i__),Teff(i__),e_Teff(i__),logg(i__),
     +  e_logg(i__),Vt(i__),e_Vt(i__),SNR(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea1.dat'	! Atomic data and equivalent widths

C  Format for file interpretation

    2 format(3X,I1,2X,F6.1,3X,F5.2,4X,F6.3,4X,F5.3,4X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,1150
        read(1,'(A49)')ar__1
        read(ar__1,2)
     +  ID_1(i__),lambda(i__),Element(i__),log_gf(i__),Ep(i__),EW(i__)
c    ..............Just test output...........
        write(6,2)
     +  ID_1(i__),lambda(i__),Element(i__),log_gf(i__),Ep(i__),EW(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