FORTRAN Generation
(/./ftp/cats/J/A_A/510/A54)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/510/A54 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-May-24
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/A+A/510/A54      NaI and CaII interstellar absorption    (Welsh+, 2010)
*================================================================================
*New 3-D density maps of NaI and CaII interstellar absorption within 300pc.
*    Welsh B.Y., Lallement R., Vergely J.-L., Raimond S.
*   <Astron. Astrophys. 510, A54 (2010)>
*   =2010A&A...510A..54W
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! NaI and CaII absorption measurements

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

      character*10  Name       (nr__) ! HD or HIP number of the observed star
      real*4        GLON       (nr__) ! (deg) Galactic longitude of star
      real*4        GLAT       (nr__) ! (deg) Galactic latitude of star
      character*1   l_Dist     (nr__) ! Limit glag on Dist
      integer*4     Dist       (nr__) ! (pc) ? Distance to star
      character*1   l_EWD1     (nr__) ! Limit flag on EWD1
      real*4        EWD1       (nr__) ! (0.1nm) ? Equivalent width of the NaI D1 line
      character*1   l_EWD2     (nr__) ! Limit flag on EWD2
      real*4        EWD2       (nr__) ! (0.1nm) ? Equivalent width of the NaI D2 line
      character*1   l_N_NaI    (nr__) ! Limit flag on log[N(NaI)]
      real*4        N_NaI      (nr__) ! ([cm-2]) ? Log of total NaI column density
      character*10  n_N_NaI    (nr__) ! Observatory (with date) where new data was taken
      integer*4     r_N_NaI    (nr__) ! ? Published reference for NaI data
      character*1   l_EWCaII   (nr__) ! Limit flag on EWCaII
      real*4        EWCaII     (nr__) ! (0.1nm) ? Equivalent width of the CaII K-line
      character*1   l_N_CaII   (nr__) ! Limit flag on log[N(CaII)]
      real*4        N_CaII     (nr__) ! ([cm-2]) ? Log of total CaII column density
      character*12  n_N_CaII   (nr__) ! Observatory (with date) where new data was taken
      integer*4     r_N_CaII   (nr__) ! ? Published reference for CaII data

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref        (nr__1) ! Reference code
      character*19  BibCode    (nr__1) ! BibCode
      character*19  Aut        (nr__1) ! Author's name
      character*107 Com        (nr__1) ! Comments

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

C  Loading file 'table1.dat'	! NaI and CaII absorption measurements

C  Format for file interpretation

    1 format(
     +  A10,1X,F5.1,1X,F5.1,1X,A1,I3,1X,A1,F6.2,1X,A1,F6.2,1X,A1,F5.2,
     +  1X,A10,1X,I3,1X,A1,F6.2,1X,A1,F5.2,1X,A12,I3)

C  Effective file loading

      open(unit=1,file='table1.dat', status='old')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,1851
        read(1,'(A96)')ar__
        read(ar__,1)
     +  Name(i__),GLON(i__),GLAT(i__),l_Dist(i__),Dist(i__),
     +  l_EWD1(i__),EWD1(i__),l_EWD2(i__),EWD2(i__),l_N_NaI(i__),
     +  N_NaI(i__),n_N_NaI(i__),r_N_NaI(i__),l_EWCaII(i__),
     +  EWCaII(i__),l_N_CaII(i__),N_CaII(i__),n_N_CaII(i__),
     +  r_N_CaII(i__)
        if(ar__(25:27) .EQ. '') Dist(i__) = iNULL__
        if(ar__(30:35) .EQ. '') EWD1(i__) = rNULL__
        if(ar__(38:43) .EQ. '') EWD2(i__) = rNULL__
        if(ar__(46:50) .EQ. '') N_NaI(i__) = rNULL__
        if(ar__(63:65) .EQ. '') r_N_NaI(i__) = iNULL__
        if(ar__(68:73) .EQ. '') EWCaII(i__) = rNULL__
        if(ar__(76:80) .EQ. '') N_CaII(i__) = rNULL__
        if(ar__(94:96) .EQ. '') r_N_CaII(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),GLON(i__),GLAT(i__),l_Dist(i__),Dist(i__),
     +  l_EWD1(i__),EWD1(i__),l_EWD2(i__),EWD2(i__),l_N_NaI(i__),
     +  N_NaI(i__),n_N_NaI(i__),r_N_NaI(i__),l_EWCaII(i__),
     +  EWCaII(i__),l_N_CaII(i__),N_CaII(i__),n_N_CaII(i__),
     +  r_N_CaII(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    2 format(I3,1X,A19,1X,A19,A107)

C  Effective file loading

      open(unit=1,file='refs.dat', status='old')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,104
        read(1,'(A150)')ar__1
        read(ar__1,2)Ref(i__),BibCode(i__),Aut(i__),Com(i__)
c    ..............Just test output...........
        write(6,2)Ref(i__),BibCode(i__),Aut(i__),Com(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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