FORTRAN Generation
(/./ftp/cats/J/A_A/566/A50)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/566/A50 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-08
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/566/A50   Classification of stellar spectra 644-681nm   (Damiani+, 2014)
*================================================================================
*Gaia-ESO Survey: Empirical classification of VLT/Giraffe stellar spectra in the
*wavelength range 6440-6810{AA} in the gamma Vel cluster, and calibration of
*spectral indices.
*    Damiani F., Prisinzano L., Micela, G., Randich S., Gilmore G., Drew J.E.,
*    Jeffries R.D., Fremat Y., Alfaro E.J., Bensby T., Bragaglia A.,
*    Flaccomio E., Lanzafame A.C., Pancino E., Recio-Blanco A., Sacco G.G.,
*    Smiljanic R., Jackson R.J., de Laverny P., Morbidelli L., Worley C.C.,
*    Hourihane A., Costado M.T., Jofre P., Lind K., Maiorca E.
*   <Astron. Astrophys. 566, A50 (2014)>
*   =2014A&A...566A..50D
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Wavelength ranges for definition of spectral
                             indices

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

      character*8   Index       ! Index name
      character*1   n_Index     ! [a] Note on Index (1)
      character*59  Arange      ! A wavelength range(s) of the numerator
      character*1   n_Arange    ! [b] Note on Arange (1)
      character*63  Brange      ! B wavelength range(s) of the denominator
*Note (1): Notes as follows:
*  a = The alpha_w_ index must include a correction based on mu, see text
*  b = The 6489-6492{AA} range is summed with the main range with relative
*      weights 1:7

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

C  Declarations for 'table3.dat'	! Spectral indices for {gamma} Vel dataset
                              (for 1242 distinct stars)

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

      integer*4     Nspec       ! [1/1802] Sequential spectrum number
      character*16  JName       ! Star name from coordinates (HHMMSSss+DDMMSSs)
      real*8        JD          ! (d) Julian Date of observation
      real*4        Vmag        ! (mag) [12/19] Apparent Johnson V magnitude
      real*4        V_Ic        ! (mag) [0.2/5.0] Johnson-Cousins V-I color index
      real*4        S_N         ! Signal/noise ratio
      real*8        mu1         ! Index {mu}_1_
      real*8        e_mu1       ! ?=- Error on mu1
      real*8        mu2         ! Index {mu}_2_
      real*8        e_mu2       ! ?=- Error on mu2
      real*4        mu3         ! Index {mu}_3_
      real*8        e_mu3       ! ?=- Error on mu3
      real*4        mu4         ! Index {mu}_4_
      real*8        e_mu4       ! ?=- Error on mu4
      real*8        mu5         ! Index {mu}_5_
      real*8        e_mu5       ! ?=- Error on mu5
      real*4        mu6         ! Index {mu}_6_
      real*8        e_mu6       ! ?=- Error on mu6
      real*8        mu7         ! Index {mu}_7_
      real*8        e_mu7       ! ?=- Error on mu7
      real*8        alphaw      ! Index {alpha}_w_
      real*8        e_alphaw    ! Error on alphaw
      real*8        alphac      ! Index {alpha}_c_
      real*8        e_alphac    ! ?=- Error on alphac
      real*8        betat       ! Index {beta}_t_
      real*8        e_betat     ! ?=- Error on betat
      real*4        betac       ! Index {beta}_c_
      real*8        e_betac     ! ?=- Error on betac
      real*4        zeta1       ! Index {zeta}_1_
      real*8        e_zeta1     ! ?=- Error on zeta1
      real*4        gamma1      ! Index {gamma}_1_
      real*8        e_gamma1    ! ?=- Error on gamma1
      real*8        mu          ! Index {mu}=0.25({mu}_1_+{mu}_3_+{mu}_5_+{mu}_7_)
      real*4        e_mu        ! Error on mu
      real*4        beta        ! Index {beta}=1-{beta}_c_/{beta}_t_
      real*8        e_beta      ! ?=- Error on beta
      real*4        gamma       ! Index {gamma}={beta}+{gamma}_1_
      real*8        e_gamma     ! Error on gamma
      real*8        tau         ! Index {tau} = min({alpha}_w_,1)
*                                            - {beta}_t_ - {zeta}_1_ + 3*{mu}
      real*8        e_tau       ! Error on tau
      character*5   Notes       ! [M SB2] Membership/binarity flags (1)
*Note (1): Membership/binarity flags:
*   M = putative (candidate) member of the {gamma} Vel cluster
* SB2 = spectroscopic binary

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

C  Loading file 'table1.dat'	! Wavelength ranges for definition of spectral
*                             indices

C  Format for file interpretation

    1 format(A8,1X,A1,1X,A59,A1,1X,A63)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,13
        read(1,'(A135)')ar__
        read(ar__,1)Index,n_Index,Arange,n_Arange,Brange
c    ..............Just test output...........
        write(6,1)Index,n_Index,Arange,n_Arange,Brange
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Spectral indices for {gamma} Vel dataset
*                              (for 1242 distinct stars)

C  Format for file interpretation

    2 format(
     +  I4,1X,A16,1X,F11.3,1X,F5.2,1X,F4.2,1X,F5.1,1X,F9.5,1X,F9.6,1X,
     +  F7.5,1X,F9.6,1X,F6.4,1X,F9.6,1X,F6.4,1X,F9.6,1X,F7.4,1X,F9.6,
     +  1X,F6.4,1X,F9.6,1X,F7.4,1X,F9.6,1X,F7.4,1X,F8.6,1X,F7.4,1X,
     +  F9.6,1X,F7.4,1X,F9.6,1X,F6.4,1X,F9.6,1X,F6.4,1X,F9.6,1X,F6.4,
     +  1X,F9.6,1X,F7.4,1X,E8.2,1X,E10.3,1X,F9.6,1X,F6.4,1X,F8.6,1X,
     +  F7.3,1X,F8.5,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,1802
        read(1,'(A356)')ar__1
        read(ar__1,2)
     +  Nspec,JName,JD,Vmag,V_Ic,S_N,mu1,e_mu1,mu2,e_mu2,mu3,e_mu3,
     +  mu4,e_mu4,mu5,e_mu5,mu6,e_mu6,mu7,e_mu7,alphaw,e_alphaw,
     +  alphac,e_alphac,betat,e_betat,betac,e_betac,zeta1,e_zeta1,
     +  gamma1,e_gamma1,mu,e_mu,beta,e_beta,gamma,e_gamma,tau,e_tau,
     +  Notes
        if (idig(ar__1(62:70)).EQ.0) e_mu1 =  rNULL__
        if (idig(ar__1(80:88)).EQ.0) e_mu2 =  rNULL__
        if (idig(ar__1(97:105)).EQ.0) e_mu3 =  rNULL__
        if (idig(ar__1(114:122)).EQ.0) e_mu4 =  rNULL__
        if (idig(ar__1(132:140)).EQ.0) e_mu5 =  rNULL__
        if (idig(ar__1(149:157)).EQ.0) e_mu6 =  rNULL__
        if (idig(ar__1(167:175)).EQ.0) e_mu7 =  rNULL__
        if (idig(ar__1(202:210)).EQ.0) e_alphac =  rNULL__
        if (idig(ar__1(220:228)).EQ.0) e_betat =  rNULL__
        if (idig(ar__1(237:245)).EQ.0) e_betac =  rNULL__
        if (idig(ar__1(254:262)).EQ.0) e_zeta1 =  rNULL__
        if (idig(ar__1(271:279)).EQ.0) e_gamma1 =  rNULL__
        if (idig(ar__1(309:317)).EQ.0) e_beta =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Nspec,JName,JD,Vmag,V_Ic,S_N,mu1,e_mu1,mu2,e_mu2,mu3,e_mu3,
     +  mu4,e_mu4,mu5,e_mu5,mu6,e_mu6,mu7,e_mu7,alphaw,e_alphaw,
     +  alphac,e_alphac,betat,e_betat,betac,e_betac,zeta1,e_zeta1,
     +  gamma1,e_gamma1,mu,e_mu,beta,e_beta,gamma,e_gamma,tau,e_tau,
     +  Notes
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