FORTRAN Generation
(/./ftp/cats/J/A_A/521/A40)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/521/A40 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-19
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/521/A40    Stroemgren photometry of Milky Way stars    (Arnadottir+, 2010)
*================================================================================
*The ability of intermediate-band Stroemgren photometry to correctly identify
*dwarf, subgiant, and giant stars and provide stellar metallicities and surface
*gravities
*    Arnadottir A.S., Feltzing S., Lundstroem I.
*   <Astron. Astrophys. 521, A40 (2010)>
*   =2010A&A...521A..40A
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Dwarf stars with both Stroemgren photometry and
                              [Fe/H] based on high resolution, high S/N
                              spectroscopy

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

      integer*4     HIP         ! ? HIP number
      character*11  Name        ! Other name
      character*4   r_b_y       ! Reference for uvby data, in refs.dat file
      real*4        Vmag        ! (mag) V magnitude
      real*4        b_y         ! (mag) Stroemgren b-y colour index
      real*4        m1          ! (mag) Stroemgren m1 index
      real*4        c1          ! (mag) Stroemgren c1 index
      character*1   l_E_B_V     ! Limit flag on E(B-V)
      real*4        E_B_V       ! (mag) Color excess
      real*4        V0mag       ! (mag) Dereddened V magnitude
      real*4        v_b_y_0     ! (mag) Dereddened b-y colour index
      real*4        m1_0        ! (mag) Dereddened m1 index
      real*4        c1_0        ! (mag) Dereddened c1 index
      real*4        v_Fe_H_     ! ([Sun]) Average metallicity
      real*4        range       ! ([Sun]) ?=- Full range (+/-) of [Fe/H] if the star was
*                                      found in more than one study
      integer*4     Nref        ! Number of references for [Fe/H]
      character*18  r__Fe_H_    ! References for [Fe/H], in refs.dat file

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

C  Declarations for 'refs.dat'	! References

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

      character*4   Ref         ! Reference code
      character*19  BibCode     ! BibCode
      character*21  Aut         ! Author's name
      character*19  Com         ! Comments

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

C  Loading file 'table2.dat'	! Dwarf stars with both Stroemgren photometry and
*                              [Fe/H] based on high resolution, high S/N
*                              spectroscopy

C  Format for file interpretation

    1 format(
     +  I6,1X,A11,1X,A4,1X,F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,A1,F5.3,1X,
     +  F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.2,1X,F4.2,1X,I1,1X,A18)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,459
        read(1,'(A114)')ar__
        read(ar__,1)
     +  HIP,Name,r_b_y,Vmag,b_y,m1,c1,l_E_B_V,E_B_V,V0mag,v_b_y_0,
     +  m1_0,c1_0,v_Fe_H_,range,Nref,r__Fe_H_
        if(ar__(1:6) .EQ. '') HIP = iNULL__
        if (idig(ar__(90:93)).EQ.0) range =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  HIP,Name,r_b_y,Vmag,b_y,m1,c1,l_E_B_V,E_B_V,V0mag,v_b_y_0,
     +  m1_0,c1_0,v_Fe_H_,range,Nref,r__Fe_H_
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    2 format(A4,1X,A19,1X,A21,1X,A19)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,19
        read(1,'(A66)')ar__1
        read(ar__1,2)Ref,BibCode,Aut,Com
c    ..............Just test output...........
        write(6,2)Ref,BibCode,Aut,Com
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