FORTRAN Generation
(/./ftp/cats/J/A_A/496/841)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/496/841 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-Mar-28
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/496/841       VLT-FLAMES survey of massive stars       (Hunter+, 2009)
*================================================================================
*The VLT-FLAMES survey of massive stars: constraints on stellar evolution from
*the chemical compositions of rapidly rotating Galactic and Magellanic Cloud
*B-type stars.
*    Hunter I., Brott I., Langer N., Lennon D.J., Dufton P.L., Howarth I.D.,
*    Ryans R.S.I., Trundle C., Evans C.J., De Koter A., Smartt S.J.
*   <Astron. Astrophys., 496, 841-853 (2009)>
*   =2009A&A...496..841H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Equivalent width measurements and derived abundances
                             for the metal lines observed in the spectra of
                             our sample stars

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

      character*12  Name        ! Source name
      character*6   El          ! Element
      real*8        lambda      ! (0.1nm) Wavelength
      character*1   l_EW        ! Limit flag on EW
      integer*4     EW          ! (0.1nm) ?=- Equivalent width
      character*1   l_N         ! Limit flag on N
      real*4        N           ! ?=- Abundance

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

C  Declarations for 'table2.dat'	! Atmospheric parameters, projected rotational
                             velocities and chemical compositions of the sample

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

      character*12  Name_1      ! Source name (1)
      integer*4     Teff        ! (K) Effective temperature (2)
      real*4        logg        ! ([cm/s2]) Surface gravity (2)
      integer*4     vt          ! (km/s) ?=- Microturbulent velocity (2)
      integer*4     vsini       ! (km/s) Projected rotational velocity (2)
      real*4        C           ! ?=- Carbon abundance (log(H)=12) (3)
      real*4        e_C         ! ? rms uncertainty on C
      integer*4     o_C         ! ? Number of lines observed for C abundance
      character*1   l_N_1       ! Limit flag on N abundance
      real*4        N_1         ! ?=- Nitrogen abundance (log(H)=12) (3)
      real*4        e_N         ! ? rms uncertainty on N
      integer*4     o_N         ! ? Number of lines observed for N abundance
      real*4        O           ! ?=- Oxygen abundance (log(H)=12) (3)
      real*4        e_O         ! ? rms uncertainty on O
      integer*4     o_O         ! ? Number of lines observed for O abundance
      real*4        Mg          ! ?=- Magnesium abundance (log(H)=12) (3)
      real*4        e_Mg        ! ? rms uncertainty on Mg
      integer*4     o_Mg        ! ? Number of lines observed for Mg abundance
      real*4        Si          ! ?=- Silicon abundance (log(H)=12) (3)
      real*4        e_Si        ! ? rms uncertainty on Si
      integer*4     o_Si        ! ? Number of lines observed for Si abundance
*Note (1): Alternative stellar identifiers can be found in Papers I
*     (Cat. J/A+A/437/467) and II (Cat. J/A+A/456/623).
*Note (2): The atmospheric parameters and rotational velocities are taken
*     from Papers III (Cat. J/A+A/457/265) and IV (Cat. J/A+A/466/277).
*Note (3): Abundances are presented on the scale 12+log[X/H]. A correction
*     has been applied to the carbon abundances.

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

C  Loading file 'table1.dat'	! Equivalent width measurements and derived abundances
*                             for the metal lines observed in the spectra of
*                             our sample stars

C  Format for file interpretation

    1 format(A12,2X,A6,1X,F7.2,1X,A1,I3,2X,A1,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,15158
        read(1,'(A40)')ar__
        read(ar__,1)Name,El,lambda,l_EW,EW,l_N,N
        if (EW .EQ. 45) EW =  iNULL__
        if (idig(ar__(37:40)).EQ.0) N =  rNULL__
c    ..............Just test output...........
        write(6,1)Name,El,lambda,l_EW,EW,l_N,N
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Atmospheric parameters, projected rotational
*                             velocities and chemical compositions of the sample

C  Format for file interpretation

    2 format(
     +  A12,1X,I5,1X,F4.2,1X,I2,1X,I3,1X,F4.2,1X,F4.2,1X,I1,1X,A1,
     +  F4.2,1X,F4.2,1X,I1,1X,F4.2,1X,F4.2,1X,I2,1X,F4.2,1X,F4.2,1X,
     +  I1,1X,F4.2,1X,F4.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,291
        read(1,'(A92)')ar__1
        read(ar__1,2)
     +  Name_1,Teff,logg,vt,vsini,C,e_C,o_C,l_N_1,N_1,e_N,o_N,O,e_O,
     +  o_O,Mg,e_Mg,o_Mg,Si,e_Si,o_Si
        if (vt .EQ. 45) vt =  iNULL__
        if (idig(ar__1(32:35)).EQ.0) C =  rNULL__
        if(ar__1(37:40) .EQ. '') e_C = rNULL__
        if(ar__1(42:42) .EQ. '') o_C = iNULL__
        if (idig(ar__1(45:48)).EQ.0) N_1 =  rNULL__
        if(ar__1(50:53) .EQ. '') e_N = rNULL__
        if(ar__1(55:55) .EQ. '') o_N = iNULL__
        if (idig(ar__1(57:60)).EQ.0) O =  rNULL__
        if(ar__1(62:65) .EQ. '') e_O = rNULL__
        if(ar__1(67:68) .EQ. '') o_O = iNULL__
        if (idig(ar__1(70:73)).EQ.0) Mg =  rNULL__
        if(ar__1(75:78) .EQ. '') e_Mg = rNULL__
        if(ar__1(80:80) .EQ. '') o_Mg = iNULL__
        if (idig(ar__1(82:85)).EQ.0) Si =  rNULL__
        if(ar__1(87:90) .EQ. '') e_Si = rNULL__
        if(ar__1(92:92) .EQ. '') o_Si = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1,Teff,logg,vt,vsini,C,e_C,o_C,l_N_1,N_1,e_N,o_N,O,e_O,
     +  o_O,Mg,e_Mg,o_Mg,Si,e_Si,o_Si
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