FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog into FORTRAN code for loading all data files into arrays.

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.5, on 2013-Jun-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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. J/ApJ/636/821       Abundances of Baade's Window K giants     (Fulbright+, 2006)
*================================================================================
*Abundances of Baade's Window giants from Keck HIRES spectra.
*I. Stellar parameters and [Fe/H] values.
*    Fulbright J.P., McWilliam A., Rich R.M.
*   <Astrophys. J., 636, 821-841 (2006)>
*   =2006ApJ...636..821F    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'stars.dat'	! Star list

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

      real*8        RA_        (nr__) ! (deg) Right Ascension J2000.0
      real*8        Dec        (nr__) ! (deg)     Declination J2000.0
      character*21  Star       (nr__) ! Star name
      integer*4     RAh        (nr__) ! (h) ? Simbad Hour of Right Ascension (J2000.0)
      integer*4     RAm        (nr__) ! (min) ? Simbad Minute of Right Ascension (J2000.0)
      real*4        RAs        (nr__) ! (s) ? Simbad Second of Right Ascension (J2000.0)
      character*1   DE_        (nr__) ! Simbad Sign of the Declination (J2000.0)
      integer*4     DEd        (nr__) ! (deg) ? Simbad Degree of Declination (J2000.0)
      integer*4     DEm        (nr__) ! (arcmin) ? Simbad Arcminute of Declination (J2000.0)
      integer*4     DEs        (nr__) ! (arcsec) ? Simbad Arcsecond of Declination (J2000.0)
      real*4        Bmag       (nr__) ! (mag) ? Simbad B band magnitude
      real*4        Vmag       (nr__) ! (mag) ? Simbad V band magnitude
      character*9   SpType     (nr__) ! Simbad MK spectral type
      character*21  SName      (nr__) ! Simbad name

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

C  Declarations for 'table3.dat'	! Final line list

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

      real*8        lambda     (nr__1) ! (0.1nm) Wavelength in Angstroms
      character*5   Ion        (nr__1) ! Ion designation
      real*4        EP         (nr__1) ! (eV) Excitation potential
      real*4        EWaBoo     (nr__1) ! (0.1pm) ? Measured {alpha} Boo equivalent width (1)
      real*4        EWSun      (nr__1) ! (0.1pm) ? Measured solar equivalent width (1)
      character*1   Qual       (nr__1) ! [A-E] A subjective quality assessment of the line
*                                     (A the highest quality and E the lowest)
*Note (1): In milli-Angstroms.

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

C  Declarations for 'table4.dat'	! Line list

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

      real*8        lambda_1   (nr__2) ! (0.1nm) Wavelength in Angstroms
      character*4   Ion_1      (nr__2) ! Ion designation
      real*4        EP_1       (nr__2) ! (eV) Excitation potential
      real*4        log_gf     (nr__2) ! ([-]) Log of the oscillator strength
      real*4        EW         (nr__2) ! (0.1pm) Measured solar equivalent width (1)
      character*4   Ref        (nr__2) ! Reference(s) (2)
*Note (1): In milli-Angstroms.
*Note (2): References as follows:
*      1 = Bard & Kock (1994A&A...282.1014B) and
*          Bard et al. (1991A&A...248..315B)
*      2 = Blackwell et al. (1982MNRAS.199...43B, 1982MNRAS.201..595B,
*          1984A&A...132..236B, 1986MNRAS.220..549B, 1995A&A...296..217B)
*      3 = O'Brian et al. (1991, J. Opt. Soc. Am. B, 8, 1185)

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

C  Declarations for 'table5.dat'	! Continuum regions

      integer*4 nr__3
      parameter (nr__3=208)	! Number of records
      character*52 ar__3  	! Full-size record

      real*8        lambdaS    (nr__3) ! (0.1nm) Starting wavelength in Angstroms
      real*8        lambdaE    (nr__3) ! (0.1nm) Ending wavelength in Angstroms
      real*4        FSun       (nr__3) ! Mean relative solar flux value
      real*4        F_aBoo     (nr__3) ! Mean relative {alpha} Boo (HR 5340) flux value
      real*4        F_muLeo    (nr__3) ! Mean relative {mu} Leo (HR 3905) flux value
      real*4        F_I_025    (nr__3) ! Mean relative Cl* NGC 6522 I-025 flux value
      real*4        F_IV_003   (nr__3) ! Mean relative Cl* NGC 6522 IV-003 flux value

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

C  Declarations for 'table6.dat'	! Equivalent width measurements

      integer*4 nr__4
      parameter (nr__4=6688)	! Number of records
      character*38 ar__4  	! Full-size record

      character*20  Star_1     (nr__4) ! Star name
      real*8        lambda_2   (nr__4) ! Wavelength in Angstroms
      character*5   Ion_2      (nr__4) ! Ion designation
      integer*4     EW_1       (nr__4) ! (0.1pm) ? Star equivalent width for Ion (m{AA})

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

C  Loading file 'stars.dat'	! Star list

C  Format for file interpretation

    1 format(
     +  A21,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,F6.3,1X,F6.3,1X,
     +  A9,2X,A21)

C  Effective file loading

      open(unit=1,file='stars.dat', status='old')
      write(6,*) '....Loading file: stars.dat'
      do i__=1,44
        read(1,'(A88)')ar__
        read(ar__,1)
     +  Star(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bmag(i__),Vmag(i__),SpType(i__),SName(i__)
        if(ar__(22:23) .EQ. '') RAh(i__) = iNULL__
        if(ar__(25:26) .EQ. '') RAm(i__) = iNULL__
        if(ar__(28:31) .EQ. '') RAs(i__) = rNULL__
        if(ar__(34:35) .EQ. '') DEd(i__) = iNULL__
        if(ar__(37:38) .EQ. '') DEm(i__) = iNULL__
        if(ar__(40:41) .EQ. '') DEs(i__) = iNULL__
        if(ar__(43:48) .EQ. '') Bmag(i__) = rNULL__
        if(ar__(50:55) .EQ. '') Vmag(i__) = rNULL__
c       Derive coordinates RA_ and Dec from input data
c       (RA_ and Dec are set to rNULL_ when unknown)
        RA_(i__) = RAh(i__)
        if(RAh(i__) .GE. 0) RA_(i__)=RAh(i__)*15.
        if(RAm(i__) .GE. 0) RA_(i__)=RA_(i__)+RAm(i__)/4.
        if(RAs(i__) .GE. 0) RA_(i__)=RA_(i__)+RAs(i__)/240.
        Dec(i__) = DEd(i__)
        if(DEm(i__) .GE. 0) Dec(i__)=Dec(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) Dec(i__)=Dec(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.Dec(i__).GE.0) Dec(i__)=-Dec(i__)
c    ..............Just test output...........
        write(6,1)
     +  Star(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bmag(i__),Vmag(i__),SpType(i__),SName(i__)
        write(6,'(6H Pos: 2F8.4)') RA_(i__),Dec(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Final line list

C  Format for file interpretation

    2 format(F7.2,1X,A5,1X,F4.2,1X,F5.1,1X,F5.1,1X,A1)

C  Effective file loading

      open(unit=1,file='table3.dat', status='old')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,159
        read(1,'(A32)')ar__1
        read(ar__1,2)
     +  lambda(i__),Ion(i__),EP(i__),EWaBoo(i__),EWSun(i__),Qual(i__)
        if(ar__1(20:24) .EQ. '') EWaBoo(i__) = rNULL__
        if(ar__1(26:30) .EQ. '') EWSun(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  lambda(i__),Ion(i__),EP(i__),EWaBoo(i__),EWSun(i__),Qual(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Line list

C  Format for file interpretation

    3 format(F8.3,1X,A4,1X,F5.3,1X,F6.3,1X,F5.1,1X,A4)

C  Effective file loading

      open(unit=1,file='table4.dat', status='old')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,53
        read(1,'(A37)')ar__2
        read(ar__2,3)
     +  lambda_1(i__),Ion_1(i__),EP_1(i__),log_gf(i__),EW(i__),
     +  Ref(i__)
c    ..............Just test output...........
        write(6,3)
     +  lambda_1(i__),Ion_1(i__),EP_1(i__),log_gf(i__),EW(i__),
     +  Ref(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Continuum regions

C  Format for file interpretation

    4 format(F8.3,1X,F8.3,1X,F6.4,1X,F6.4,1X,F6.4,1X,F6.4,1X,F6.4)

C  Effective file loading

      open(unit=1,file='table5.dat', status='old')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,208
        read(1,'(A52)')ar__3
        read(ar__3,4)
     +  lambdaS(i__),lambdaE(i__),FSun(i__),F_aBoo(i__),F_muLeo(i__),
     +  F_I_025(i__),F_IV_003(i__)
c    ..............Just test output...........
        write(6,4)
     +  lambdaS(i__),lambdaE(i__),FSun(i__),F_aBoo(i__),F_muLeo(i__),
     +  F_I_025(i__),F_IV_003(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Equivalent width measurements

C  Format for file interpretation

    5 format(A20,1X,F7.2,1X,A5,1X,I3)

C  Effective file loading

      open(unit=1,file='table6.dat', status='old')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,6688
        read(1,'(A38)')ar__4
        read(ar__4,5)Star_1(i__),lambda_2(i__),Ion_2(i__),EW_1(i__)
        if(ar__4(36:38) .EQ. '') EW_1(i__) = iNULL__
c    ..............Just test output...........
        write(6,5)Star_1(i__),lambda_2(i__),Ion_2(i__),EW_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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