FORTRAN Generation
(/./ftp/cats/III/218/)

Conversion of standardized ReadMe file for file /./ftp/cats/III/218/ 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. III/218             ELODIE archive                        (Prugniel+, 2001)
*================================================================================
*A database of high and medium-resolution stellar spectra
*     Prugniel P., Soubiran, C.
*    <Astron. Astrophys. 369, 1048 (2001)>
*    =2001A&A...369.1048P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! *Spectrophotometry and atmospheric parameters

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     Num         ! Running number in the archive
      character*10  Name        ! *Object identifier
      character*1   u_Name      ! *[?] Uncertain name
      integer*4     RAh         ! (h) *? Right Ascension J2000 (hours)
      integer*4     RAm         ! (min) *? Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) *? Right Ascension J2000 (seconds)
      character*1   DE_         ! *? Declination J2000 (sign)
      integer*4     DEd         ! (deg) *? Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) *? Declination J2000 (minutes)
      integer*4     DEs         ! (arcsec) *? Declination J2000 (seconds)
      character*10  SpType      ! Spectral type (from INCA)
      real*8        HRV         ! (km/s) Heliocentric radial velocity
      integer*4     q_Flux      ! [0,3] Quality of the flux calibration
      real*4        Airm        ! Airmass at mid-time of observation
      real*8        Teff        ! (K) Effective temperature
      integer*4     q_Teff      ! *[-1,4] Quality flag on Teff
      real*4        logg        ! ([cm/s+2]) decimal log of surface gravity
      integer*4     q_logg      ! *[-1,1] Quality flag on logg
      real*8        v_Fe_H_     ! ([Sun]) Iron abundance relative to solar
      integer*4     q__Fe_H_    ! *[-1,4] Quality flag on [Fe/H]
      real*8        TeffM       ! (K) Estimated effective temperature
      real*4        loggM       ! ([cm/s+2]) Estimated log of surface gravity
      real*8        v_Fe_H_M    ! ([Sun]) Estimated [Fe/H]
      real*8        Ca4227      ! (0.1nm) Ca4227 index
      real*8        G4300       ! (0.1nm) G4300 index
      real*8        HgamA       ! (0.1nm) H gamma A index
      real*8        HgamF       ! (0.1nm) H gamma F index
      real*8        Fe4383      ! (0.1nm) Fe4383 index
      real*8        Ca4455      ! (0.1nm) Ca4455 index
      real*8        Fe4531      ! (0.1nm) Fe4531 index
      real*8        Fe4668      ! (0.1nm) Fe4668 index
      real*8        Hbeta       ! (0.1nm) Hbeta index
      real*8        Fe5015      ! (0.1nm) Fe5015 index
      real*8        Mg1         ! (mag) Mg1 index
      real*8        Mg2         ! (mag) Mg2 index
      real*8        Mgb         ! (0.1nm) Mgb index
      real*8        Fe5270      ! (0.1nm) Fe5270 index
      real*8        Fe5335      ! (0.1nm) Fe5335 index
      real*8        Fe5406      ! (0.1nm) Fe5406 index
      real*8        Fe5709      ! (0.1nm) Fe5709 index
      real*8        Fe5782      ! (0.1nm) Fe5782 index
      real*8        NaD         ! (0.1nm) NaD index
      real*8        TiO1        ! (mag) TiO1 index
      real*8        TiO2        ! (mag) TiO2 index
*Note on Name, u_Name:
*   The names are generally from the HD catalogue (<III/135>),
*   BD numbers (<I/122>) are also used. Uncertain identification are noted
*   with a "?" in column u_Name.
*Note on RAh, RAm, RAs, DE-, DEd, DEm, DEs:
*   The position was extracted from SIMBAD (when the Name is accurately
*   known), or from the FITS headers.
*Note on q_Teff:
*  q_Teff=1: Poor determination -> Q_Teff=4: Excellent (see Sect. 2)
*  q_Teff=0: means that we have estimated Teff from the B-V colour (Tycho2
*  <I/259> catalogue), assuming the empirical colour-temperature relation
*  for a main sequence star and neglecting the interstellar extinction
*  q_Teff=-1: Internal determination of the effective temperature
*Note on q_logg:
*  q_logg=1 means that the determination of LOGG is taken from the
*  literature (see Sect. 2).
*  q_logg=0 means that LOGG was converted from the V absolute magnitude
*  from Hiparcos and Teff, using a bolometric correction valid for
*  a main sequence start and an empirical mass-to-light relation.
*  q_logg=-1 Internal determination of the surface gravity
*Note on q_[Fe/H]:
*  See the definition in Sect. 2.
*  q_[Fe/H]=1: Poor determination -> q_[Fe/H]=4: Excellent
*  q_[Fe/H]=-1: Internal determination of [Fe/H]

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

C  Declarations for 'table2.dat'	! Comparison of Lick indices

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

      character*9   Band        ! *Designation of the spectrophotometric band
      integer*4     Nco         ! *Number of comparisons
      real*4        Ave         ! *Average value of the index
      real*4        Diff        ! *Mean difference
      real*4        rms         ! rms of the difference after 3{sigma} clipping
      real*8        error       ! *Majorant of relative error
*Note on Band:
*  The designation is as in table1.dat
*Note on Ave:
*  Average value of the measurements used for the comparison.
*Note on Nco:
*  A (non-iterated) 3-sigma clipping was done. Nco is the number of
*  comparisons left afterward.
*Note on Diff:
*  The units are in the "natural" units of the corresponding index, 0.1nm
*  or mag. "Molecular" indices: Mg1, Mg2, TiO1, TiO2 and in mag,
*  the others in 0.1nm.
*Note on error:
*  The mean difference Diff is converted into relative error by assuming that
*  the error is concentrated on the central band of the index

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

C  Loading file 'table1.dat'	! *Spectrophotometry and atmospheric parameters

C  Format for file interpretation

    1 format(
     +  I5,1X,A10,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,2X,A10,
     +  1X,F7.2,1X,I1,1X,F4.2,F7.0,1X,I2,2X,F5.2,1X,I2,F7.2,1X,I2,
     +  F7.0,2X,F5.2,F7.2,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,
     +  F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,F8.4,
     +  F8.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,908
        read(1,'(A284)')ar__
        read(ar__,1)
     +  Num,Name,u_Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,HRV,q_Flux,
     +  Airm,Teff,q_Teff,logg,q_logg,v_Fe_H_,q__Fe_H_,TeffM,loggM,
     +  v_Fe_H_M,Ca4227,G4300,HgamA,HgamF,Fe4383,Ca4455,Fe4531,Fe4668,
     +  Hbeta,Fe5015,Mg1,Mg2,Mgb,Fe5270,Fe5335,Fe5406,Fe5709,Fe5782,
     +  NaD,TiO1,TiO2
        if(ar__(19:20) .EQ. '') RAh = iNULL__
        if(ar__(22:23) .EQ. '') RAm = iNULL__
        if(ar__(25:28) .EQ. '') RAs = rNULL__
        if(ar__(31:32) .EQ. '') DEd = iNULL__
        if(ar__(34:35) .EQ. '') DEm = iNULL__
        if(ar__(37:38) .EQ. '') DEs = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  Num,Name,u_Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,HRV,q_Flux,
     +  Airm,Teff,q_Teff,logg,q_logg,v_Fe_H_,q__Fe_H_,TeffM,loggM,
     +  v_Fe_H_M,Ca4227,G4300,HgamA,HgamF,Fe4383,Ca4455,Fe4531,Fe4668,
     +  Hbeta,Fe5015,Mg1,Mg2,Mgb,Fe5270,Fe5335,Fe5406,Fe5709,Fe5782,
     +  NaD,TiO1,TiO2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Comparison of Lick indices

C  Format for file interpretation

    2 format(A9,I3,4X,F6.3,4X,F6.3,4X,F6.3,3X,F7.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,21
        read(1,'(A52)')ar__1
        read(ar__1,2)Band,Nco,Ave,Diff,rms,error
c    ..............Just test output...........
        write(6,2)Band,Nco,Ave,Diff,rms,error
c    .......End.of.Just test output...........
      end do
      close(1)

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