FORTRAN Generation
(/./ftp/cats/II/68)

Conversion of standardized ReadMe file for file /./ftp/cats/II/68 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.5, on 2013-May-21
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. II/68               Dearborn Catalogue of faint red stars (Lee+ 1947)
*================================================================================
*Dearborn Observatory Catalogue of faint red stars
*     Lee O.J., Baldwin R.J., Hamlin D.W.
*    <Ann. Dearborn Obs., vol. V, part 1A (1943)>
*     Lee O.J., Bartlett T.J.
*    <Ann. Dearborn Obs., vol. V, part 1B (1944)>
*     Lee O.J., Gore G.D., Baldwin T.J.
*    <Ann. Dearborn Obs., vol. V, part 1C (1947)>
*    =1947AnDea...1....5L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! The Dearborn Observatory catalog

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

      real*8        RA_         ! (deg) Right Ascension 1900
      real*8        Dec         ! (deg)     Declination 1900
      integer*4     DO          ! [1/44076]+ Dearborn number
      character*1   n_DO        ! *[#*] a note exists in the file "notes.dat"
      integer*4     RAh         ! (h) Right Ascension 1900 (hours)
      real*4        RAm         ! (min) Right Ascension 1900 (minutes)
      character*1   DE_         ! Declination 1900 (sign)
      integer*4     DEd         ! (deg) Declination 1900 (degrees)
      integer*4     DEm         ! (arcmin) Declination 1900 (minutes)
      real*4        Rmag        ! (mag) *? Magnitude on red-sensitive emulsion
      character*1   n_Rmag      ! *[?*V] Uncertainty and variability flag
      character*4   SpType      ! Dearborn spectral type
      character*3   HDtype      ! *Spectral type from HD (catalog <III/135>)
*Note on n_DO: the '#' indicates a note from the original catalogue,
*     while the '*' indicates a note added at NASA Goddard Space Flight
*     Center by Nagy (1979)
*Note on Rmag: the magnitude was obtained through comparison with the
*     International Polar Sequence; its accuracy was estimated to 0.2mag.
*Note on n_Rmag: the following flags are used:
*    * denotes an approximate value (parentheses around the magnitude in
*      the published version)
*    V for known variables
*    ? for suspected variables
*Note on HDtype: only 5764 stars (13%) are in HD.

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

C  Declarations for 'notes.dat'	! Notes to the catalog

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

      integer*4     DO_1        ! [1/44076]+= Dearborn number
      character*1   Cont        ! [+] Indicates that there is a continuation
*                                      in the next record
      character*73  Text        ! Text of note

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

C  Loading file 'catalog.dat'	! The Dearborn Observatory catalog

C  Format for file interpretation

    1 format(I5,A1,I2,1X,F4.1,1X,A1,I2,1X,I2,2X,F4.1,A1,1X,A4,1X,A3)

C  Effective file loading

      open(unit=1,file='catalog.dat', status='old')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,44076
        read(1,'(A36)')ar__
        read(ar__,1)
     +  DO,n_DO,RAh,RAm,DE_,DEd,DEm,Rmag,n_Rmag,SpType,HDtype
        if(ar__(23:26) .EQ. '') Rmag = rNULL__
c       Derive coordinates RA_ and Dec from input data
c       (RA_ and Dec are set to rNULL_ when unknown)
        RA_ = RAh
        if(RAh .GE. 0) RA_=RAh*15.
        if(RAm .GE. 0) RA_=RA_+RAm/4.
        Dec = DEd
        if(DEm .GE. 0) Dec=Dec+DEm/60.
        if(DE_.EQ.'-'.AND.Dec.GE.0) Dec=-Dec
c    ..............Just test output...........
        write(6,1)
     +  DO,n_DO,RAh,RAm,DE_,DEd,DEm,Rmag,n_Rmag,SpType,HDtype
        write(6,'(6H Pos: 2F8.4)') RA_,Dec
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Notes to the catalog

C  Format for file interpretation

    2 format(I5,A1,1X,A73)

C  Effective file loading

      open(unit=1,file='notes.dat', status='old')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,101
        read(1,'(A80)')ar__1
        read(ar__1,2)DO_1,Cont,Text
c    ..............Just test output...........
        write(6,2)DO_1,Cont,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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