FORTRAN Generation
(/./ftp/cats/J/A_A/588/A98)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/588/A98 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 2026-Oct-05
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/588/A98   Metallicities and abundances of evolved stars (Maldonado+, 2016)
*================================================================================
*Evolved stars and the origin of abundance trends in planet hosts.
*     Maldonado J., Villaver E.
*    <Astron. Astrophys. 588, A98 (2016)>
*    =2016A&A...588A..98M        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Parameters  for the stars measured in this work

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

      integer*4     HIP         ! ? Hipparcos number
      integer*4     HD          ! ? HD number
      character*14  Other       ! Other name (1)
      integer*4     Teff        ! (K) Effective temperature
      integer*4     e_Teff      ! (K) Uncertainty on effective temperature
      real*4        logg        ! ([cm/s2]) Surface gravity
      real*4        e_logg      ! ([cm/s2]) Uncertainty on surface gravity
      real*4        Vt          ! (km/s) Microturbulence
      real*4        e_Vt        ! (km/s) Uncertainty on microturbulence
      real*4        v_Fe_H_     ! ([Sun]) Metallicity
      real*4        e__Fe_H_    ! ([Sun]) Uncertainty on metallicity
      integer*4     Spec        ! Spectrograph (2)
      real*4        Age         ! (Gyr) ? Stellar age
      real*4        e_Age       ! (Gyr) ? Uncertainty on age
      real*4        Mass        ! ([Sun]) ? Stellar mass
      real*4        e_Mass      ! ([Sun]) ? Uncertainty on Mass
      real*4        Radius      ! ([Sun]) ? Stellar radius
      real*4        e_Radius    ! ([Sun]) ? Uncertainty on Radius
      character*6   Sample      ! Stellar sample (G1)
*Note (1): Only for those stars without HIP or HD number.
*Note (2): Spectrograph as follows:
*           1 = CAHA/FOCES
*           2 = TNG/SARG
*           3 = NOT/FIES
*           4 = MERCATOR/HERMES
*           5 = S4N-McD (Allende Prieto et al., 2004A&A...420..183A)
*           6 = S4N-FEROS (Allende Prieto et al., 2004A&A...420..183A)
*           7 = ESO-Archive FEROS spectra
*           8 = ESO-Archive HARPS spectra

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

C  Declarations for 'table2.dat'	! Derived abundances for the stars analysed
                                 in this work

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

      character*14  Name        ! Hipparcos number / Other name
      real*4        v_C_H_      ! ([Sun]) C abundance
      real*4        e__C_H_     ! ([Sun]) Uncertainty on C abundance
      real*4        v_O_H_      ! ([Sun]) ?=- O abundance
      real*4        e__O_H_     ! ([Sun]) ?=- Uncertainty on O abundance
      real*4        v_Na_H_     ! ([Sun]) Na abundance
      real*4        e__Na_H_    ! ([Sun]) Uncertainty on Na abundance
      real*4        v_Mg_H_     ! ([Sun]) Mg abundance
      real*4        e__Mg_H_    ! ([Sun]) Uncertainty on Mg abundance
      real*4        v_Al_H_     ! ([Sun]) Al abundance
      real*4        e__Al_H_    ! ([Sun]) Uncertainty on Al abundance
      real*4        v_Si_H_     ! ([Sun]) Si abundance
      real*4        e__Si_H_    ! ([Sun]) Uncertainty on Si abundance
      real*4        v_S_H_      ! ([Sun]) ?=- S abundance
      real*4        e__S_H_     ! ([Sun]) ?=- Uncertainty on S abundance
      real*4        v_Ca_H_     ! ([Sun]) Ca abundance
      real*4        e__Ca_H_    ! ([Sun]) Uncertainty on Ca abundance
      real*4        v_ScI_H_    ! ([Sun]) ?=- ScI abundance
      real*4        e__ScI_H_   ! ([Sun]) ?=- Uncertainty on ScI abundance
      real*4        v_ScII_H_   ! ([Sun]) ScII abundance
      real*4        e__ScII_H_  ! ([Sun]) Uncertainty on ScII abundance
      real*4        v_TiI_H_    ! ([Sun]) TiI abundance
      real*4        e__TiI_H_   ! ([Sun]) Uncertainty on TiI abundance
      real*4        v_TiII_H_   ! ([Sun]) TiII abundance
      real*4        e__TiII_H_  ! ([Sun]) Uncertainty on TiII abundance
      real*4        v_V_H_      ! ([Sun]) V abundance
      real*4        e__V_H_     ! ([Sun]) Uncertainty on V abundance
      real*4        v_CrI_H_    ! ([Sun]) CrI abundance
      real*4        e__CrI_H_   ! ([Sun]) Uncertainty on CrI abundance
      real*4        v_CrII_H_   ! ([Sun]) CrII abundance
      real*4        e__CrII_H_  ! ([Sun]) Uncertainty on CrII abundance
      real*4        v_Mn_H_     ! ([Sun]) Mn abundance
      real*4        e__Mn_H_    ! ([Sun]) Uncertainty on Mn abundance
      real*4        v_Co_H_     ! ([Sun]) Co abundance
      real*4        e__Co_H_    ! ([Sun]) Uncertainty on Co abundance
      real*4        v_Ni_H_     ! ([Sun]) Ni abundance
      real*4        e__Ni_H_    ! ([Sun]) Uncertainty on Ni abundance
      real*4        v_Zn_H_     ! ([Sun]) Zn abundance
      real*4        e__Zn_H_    ! ([Sun]) Uncertainty on Zn abundance
      character*6   Sample_1    ! Stellar sample (G1)

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

C  Declarations for 'table3.dat'	! Abundances of carbon and oxygen of the stars
                                 taken from Maldonado et al. 2015A&A...579A..20M

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

      integer*4     HIP_1       ! Hipparcos number
      real*4        v_C_H__1    ! ([Sun]) ? C abundance
      real*4        e__C_H__1   ! ([Sun]) ? Uncertainty on C abundance
      real*4        v_O_H__1    ! ([Sun]) ? O abundance
      real*4        e__O_H__1   ! ([Sun]) ? Uncertainty on O abundance

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

C  Loading file 'table1.dat'	! Parameters  for the stars measured in this work

C  Format for file interpretation

    1 format(
     +  I6,1X,I6,1X,A14,1X,I4,1X,I2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,
     +  1X,F5.2,1X,F4.2,1X,I1,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,154
        read(1,'(A108)')ar__
        read(ar__,1)
     +  HIP,HD,Other,Teff,e_Teff,logg,e_logg,Vt,e_Vt,v_Fe_H_,e__Fe_H_,
     +  Spec,Age,e_Age,Mass,e_Mass,Radius,e_Radius,Sample
        if(ar__(1:6) .EQ. '') HIP = iNULL__
        if(ar__(8:13) .EQ. '') HD = iNULL__
        if(ar__(71:75) .EQ. '') Age = rNULL__
        if(ar__(77:80) .EQ. '') e_Age = rNULL__
        if(ar__(82:85) .EQ. '') Mass = rNULL__
        if(ar__(87:90) .EQ. '') e_Mass = rNULL__
        if(ar__(92:96) .EQ. '') Radius = rNULL__
        if(ar__(98:101) .EQ. '') e_Radius = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  HIP,HD,Other,Teff,e_Teff,logg,e_logg,Vt,e_Vt,v_Fe_H_,e__Fe_H_,
     +  Spec,Age,e_Age,Mass,e_Mass,Radius,e_Radius,Sample
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Derived abundances for the stars analysed
*                                 in this work

C  Format for file interpretation

    2 format(
     +  A14,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,
     +  F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,
     +  1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,154
        read(1,'(A230)')ar__1
        read(ar__1,2)
     +  Name,v_C_H_,e__C_H_,v_O_H_,e__O_H_,v_Na_H_,e__Na_H_,v_Mg_H_,
     +  e__Mg_H_,v_Al_H_,e__Al_H_,v_Si_H_,e__Si_H_,v_S_H_,e__S_H_,
     +  v_Ca_H_,e__Ca_H_,v_ScI_H_,e__ScI_H_,v_ScII_H_,e__ScII_H_,
     +  v_TiI_H_,e__TiI_H_,v_TiII_H_,e__TiII_H_,v_V_H_,e__V_H_,
     +  v_CrI_H_,e__CrI_H_,v_CrII_H_,e__CrII_H_,v_Mn_H_,e__Mn_H_,
     +  v_Co_H_,e__Co_H_,v_Ni_H_,e__Ni_H_,v_Zn_H_,e__Zn_H_,Sample_1
        if (idig(ar__1(26:30)).EQ.0) v_O_H_ =  rNULL__
        if (idig(ar__1(32:35)).EQ.0) e__O_H_ =  rNULL__
        if (idig(ar__1(82:86)).EQ.0) v_S_H_ =  rNULL__
        if (idig(ar__1(88:91)).EQ.0) e__S_H_ =  rNULL__
        if (idig(ar__1(104:108)).EQ.0) v_ScI_H_ =  rNULL__
        if (idig(ar__1(110:113)).EQ.0) e__ScI_H_ =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name,v_C_H_,e__C_H_,v_O_H_,e__O_H_,v_Na_H_,e__Na_H_,v_Mg_H_,
     +  e__Mg_H_,v_Al_H_,e__Al_H_,v_Si_H_,e__Si_H_,v_S_H_,e__S_H_,
     +  v_Ca_H_,e__Ca_H_,v_ScI_H_,e__ScI_H_,v_ScII_H_,e__ScII_H_,
     +  v_TiI_H_,e__TiI_H_,v_TiII_H_,e__TiII_H_,v_V_H_,e__V_H_,
     +  v_CrI_H_,e__CrI_H_,v_CrII_H_,e__CrII_H_,v_Mn_H_,e__Mn_H_,
     +  v_Co_H_,e__Co_H_,v_Ni_H_,e__Ni_H_,v_Zn_H_,e__Zn_H_,Sample_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Abundances of carbon and oxygen of the stars
*                                 taken from Maldonado et al. 2015A&A...579A..20M

C  Format for file interpretation

    3 format(I6,2X,F5.2,3X,F4.2,4X,F5.2,3X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,187
        read(1,'(A36)')ar__2
        read(ar__2,3)HIP_1,v_C_H__1,e__C_H__1,v_O_H__1,e__O_H__1
        if(ar__2(9:13) .EQ. '') v_C_H__1 = rNULL__
        if(ar__2(17:20) .EQ. '') e__C_H__1 = rNULL__
        if(ar__2(25:29) .EQ. '') v_O_H__1 = rNULL__
        if(ar__2(33:36) .EQ. '') e__O_H__1 = rNULL__
c    ..............Just test output...........
        write(6,3)HIP_1,v_C_H__1,e__C_H__1,v_O_H__1,e__O_H__1
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