FORTRAN Generation
(/./ftp/cats/J/A_A/381/32)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/381/32 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 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/A+A/381/32        Galactic Cepheid abundances             (Andrievsky+, 2002)
*================================================================================
*Using Cepheids to determine the Galactic abundance gradient.
*I. The solar neighbourhood.
*       Andrievsky S.M., Kovtyukh V.V., Luck R.E., Lepine J.R.D., Bersier D.,
*       Maciel W.J., Barbuy B., Klochkova V.G., Panchuk V.E., Karpischek R.U.
*      <Astron. Astrophys. 381, 32 (2002)>
*      =2002A&A...381...32A      (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Program Cepheids, their spectra and results
                                 for individual phases Star

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

      character*11  Star        ! Star name
      character*2   n_Star      ! [s: ] "s"  : s-Cepheid,
*                                        "s:" : s-Cepheids, but not confirmed
      real*8        P           ! (d) Period
      real*8        HJD         ! (d) Heliocentric Julian date
      real*4        phi         ! [0/1[? Phase
      character*9   Tel         ! Telescope (1)
      integer*4     Teff        ! (K) Effective temperature
      real*4        logg        ! ([cm/s2]) Surface gravity
      real*4        Vt          ! (km/s) Microturbulent velocity
      real*4        v_Fe_H_     ! ([Sun]) Metallicity
*Note (1): Telescopes:
*     MDO 2.1m - McDonald Observatory (USA), Struve 2.1-m reflector,
*                 R=60000, S/N>100.
*     KPNO 4m  - Kitt Peak National Observatory (USA), 4-m and coude-feed
*                 telescope, R=30000 and 80000 respectively, S/N=~150
*                 (except for CV Mon with a S/N of about 50).
*     CTIO 4m  - Cerro Tololo Inter-American Observatory (Chile), 4-m
*                 telescope, R=30000, S/N>100.
*     MSO 74in - Mount Stromlo Observatory (Australia), 74-inch telescope,
*                  R=56000, S/N<=50.
*    SAORAS 6m - Special Astrophysical Observatory of the Russian Academy
*                 of Sciences (Russia), 6-m telescope, R=14000 and 25000,
*                 S/N=~70-100 (except for DF Cas, V924 Cyg and TX Del,
*                 where the S/N is below 70).
*    OHP 1.93m - Haute-Provence Observatoire (France), 1.93-m telescope,
*                 R=40000 , S/N>150.

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

C  Declarations for 'table2.dat'	! Averaged relative-to-solar elemental abundance
                                 for program Cepheids Star

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

      character*11  Star_1      ! Star name
      character*2   n_Star_1    ! [s: ] "s"  : s-Cepheid,
*                                   "s:" : s-Cepheids, but not confirmed
      real*4        C           ! ([Sun]) ? C  averaged relative-to-solar elemental abundance
      real*4        O           ! ([Sun]) ? O  averaged relative-to-solar elemental abundance
      real*4        Na          ! ([Sun]) ? Na averaged relative-to-solar elemental abundance
      real*4        Mg          ! ([Sun]) ? Mg averaged relative-to-solar elemental abundance
      real*4        Al          ! ([Sun]) ? Al averaged relative-to-solar elemental abundance
      real*4        Si          ! ([Sun]) ? Si averaged relative-to-solar elemental abundance
      real*4        S           ! ([Sun]) ? S  averaged relative-to-solar elemental abundance
      real*4        Ca          ! ([Sun]) ? Ca averaged relative-to-solar elemental abundance
      real*4        Sc          ! ([Sun]) ? Sc averaged relative-to-solar elemental abundance
      real*4        Ti          ! ([Sun]) ? Ti averaged relative-to-solar elemental abundance
      real*4        V           ! ([Sun]) ? V  averaged relative-to-solar elemental abundance
      real*4        Cr          ! ([Sun]) ? Cr averaged relative-to-solar elemental abundance
      real*4        Mn          ! ([Sun]) ? Mn averaged relative-to-solar elemental abundance
      real*4        Fe          ! ([Sun]) ? Fe averaged relative-to-solar elemental abundance
      real*4        Co          ! ([Sun]) ? Co averaged relative-to-solar elemental abundance
      real*4        Ni          ! ([Sun]) ? Ni averaged relative-to-solar elemental abundance
      real*4        Cu          ! ([Sun]) ? Cu averaged relative-to-solar elemental abundance
      real*4        Zn          ! ([Sun]) ? Zn averaged relative-to-solar elemental abundance
      real*4        Y           ! ([Sun]) ? Y  averaged relative-to-solar elemental abundance
      real*4        Zr          ! ([Sun]) ? Zr averaged relative-to-solar elemental abundance
      real*4        La          ! ([Sun]) ? La averaged relative-to-solar elemental abundance
      real*4        Ce          ! ([Sun]) ? Ce averaged relative-to-solar elemental abundance
      real*4        Nd          ! ([Sun]) ? Nd averaged relative-to-solar elemental abundance
      real*4        Eu          ! ([Sun]) ? Eu averaged relative-to-solar elemental abundance
      real*4        Gd          ! ([Sun]) ? Gd averaged relative-to-solar elemental abundance

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

C  Declarations for 'tablea1.dat'	! Elemental abundances from individual ions

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

      character*11  Star_2      ! Star name
      integer*4     Nspect      ! Number of analyzed spectra
      real*4        Per         ! (d) Period of Star 1
      character*7   Ion         ! Ion
      real*4        v_M_H_      ! ([Sun]) ?=- Relative-to-solar metal abundance
      real*4        e__M_H_     ! ([Sun]) ?=- rms uncertainty on [M/H]1
      integer*4     N_M_H_      ! ?=- Number of the lines used in analysis
      real*4        v_M_H       ! ?=- Absolute abundance of a given ion (M/H) in
*                                     the scale where logA(H)=12.00

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

C  Loading file 'table1.dat'	! Program Cepheids, their spectra and results
*                                 for individual phases Star

C  Format for file interpretation

    1 format(
     +  A11,1X,A2,1X,F7.4,1X,F13.5,1X,F5.3,1X,A9,1X,I4,1X,F4.2,1X,
     +  F4.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,236
        read(1,'(A73)')ar__
        read(ar__,1)Star,n_Star,P,HJD,phi,Tel,Teff,logg,Vt,v_Fe_H_
        if(ar__(38:42) .EQ. '') phi = rNULL__
c    ..............Just test output...........
        write(6,1)Star,n_Star,P,HJD,phi,Tel,Teff,logg,Vt,v_Fe_H_
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Averaged relative-to-solar elemental abundance
*                                 for program Cepheids Star

C  Format for file interpretation

    2 format(
     +  A11,1X,A2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,
     +  1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,75
        read(1,'(A164)')ar__1
        read(ar__1,2)
     +  Star_1,n_Star_1,C,O,Na,Mg,Al,Si,S,Ca,Sc,Ti,V,Cr,Mn,Fe,Co,Ni,
     +  Cu,Zn,Y,Zr,La,Ce,Nd,Eu,Gd
        if(ar__1(16:20) .EQ. '') C = rNULL__
        if(ar__1(22:26) .EQ. '') O = rNULL__
        if(ar__1(28:32) .EQ. '') Na = rNULL__
        if(ar__1(34:38) .EQ. '') Mg = rNULL__
        if(ar__1(40:44) .EQ. '') Al = rNULL__
        if(ar__1(46:50) .EQ. '') Si = rNULL__
        if(ar__1(52:56) .EQ. '') S = rNULL__
        if(ar__1(58:62) .EQ. '') Ca = rNULL__
        if(ar__1(64:68) .EQ. '') Sc = rNULL__
        if(ar__1(70:74) .EQ. '') Ti = rNULL__
        if(ar__1(76:80) .EQ. '') V = rNULL__
        if(ar__1(82:86) .EQ. '') Cr = rNULL__
        if(ar__1(88:92) .EQ. '') Mn = rNULL__
        if(ar__1(94:98) .EQ. '') Fe = rNULL__
        if(ar__1(100:104) .EQ. '') Co = rNULL__
        if(ar__1(106:110) .EQ. '') Ni = rNULL__
        if(ar__1(112:116) .EQ. '') Cu = rNULL__
        if(ar__1(118:122) .EQ. '') Zn = rNULL__
        if(ar__1(124:128) .EQ. '') Y = rNULL__
        if(ar__1(130:134) .EQ. '') Zr = rNULL__
        if(ar__1(136:140) .EQ. '') La = rNULL__
        if(ar__1(142:146) .EQ. '') Ce = rNULL__
        if(ar__1(148:152) .EQ. '') Nd = rNULL__
        if(ar__1(154:158) .EQ. '') Eu = rNULL__
        if(ar__1(160:164) .EQ. '') Gd = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Star_1,n_Star_1,C,O,Na,Mg,Al,Si,S,Ca,Sc,Ti,V,Cr,Mn,Fe,Co,Ni,
     +  Cu,Zn,Y,Zr,La,Ce,Nd,Eu,Gd
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea1.dat'	! Elemental abundances from individual ions

C  Format for file interpretation

    3 format(A11,1X,I2,1X,F6.3,1X,A7,1X,F5.2,1X,F4.2,1X,I4,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,2634
        read(1,'(A50)')ar__2
        read(ar__2,3)Star_2,Nspect,Per,Ion,v_M_H_,e__M_H_,N_M_H_,v_M_H
        if (idig(ar__2(31:35)).EQ.0) v_M_H_ =  rNULL__
        if (idig(ar__2(37:40)).EQ.0) e__M_H_ =  rNULL__
        if (N_M_H_ .EQ. 45) N_M_H_ =  iNULL__
        if (idig(ar__2(47:50)).EQ.0) v_M_H =  rNULL__
c    ..............Just test output...........
        write(6,3)Star_2,Nspect,Per,Ion,v_M_H_,e__M_H_,N_M_H_,v_M_H
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