FORTRAN Generation
(/./ftp/cats/I/40)

Conversion of standardized ReadMe file for file /./ftp/cats/I/40 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-26
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__
      parame++++Column 'RAh' at line 37: Right Ascension B1920 (hours), at Epoch
    '' can't be interpreted as Epoch column or value
ter  (rNULL__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. I/40                WASHINGTON 20 Catalog     (Morgan, 1933)
*================================================================================
*Results of observations with the nine-inch transit circle 1913-1926.
*Catalogue of 9989 standard and intermediary stars, Miscellaneous stars.
*     Morgan H.R.
*    <Publ. USNO, 2nd series, vol. XIII, Washington (1933)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! The catalog of (9989 + 582) stars.

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

      real*8        RA_        (nr__) ! (deg) Right Ascension B1920
      real*8        Dec        (nr__) ! (deg)     Declination B1920
      integer*4     Seq        (nr__) ! [1,10571] Running number
      character*8   DM         (nr__) ! Durchmusterung (BD or CD) identification
      character*2   Sp         (nr__) ! Spectral type, from HD
      character*3   NumSp      (nr__) ! Coded spectral type (1)
      real*4        Vmag       (nr__) ! (mag) ? Magnitudes (from Harvard Revised Photometry
*                                    or corrected BD)
      character*1   n_Vmag     (nr__) ! [v] for variable star
      real*4        ObsMag     (nr__) ! (mag) ? Observed magnitude
      integer*4     RAh        (nr__) ! (h) Right Ascension B1920 (hours), at Epoch
      integer*4     RAm        (nr__) ! (min) Right Ascension B1920 (minutes), at Epoch
      real*4        RAs        (nr__) ! (s) Right Ascension B1920 (seconds), at Epoch
      real*8        pmRA       (nr__) ! (s/a) ? Annual proper motion in RA (in Boss system)
      character*1   DE_        (nr__) ! Declination B1920 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination B1920 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination B1920 (minutes)
      real*4        DEs        (nr__) ! (arcsec) Declination B1920 (0.01arcsec)
      real*4        pmDE       (nr__) ! (arcsec/a) ? Annual proper motion in Dec (in Boss system)
      integer*4     o_RAs      (nr__) ! Number of observations in RA
      integer*4     o_DEs      (nr__) ! ? Number of observations in Dec (2)
      integer*4     EpRA_1900  (nr__) ! (0.01a) Mean Epoch of Right Ascension
      integer*4     EpDE_1900  (nr__) ! (0.01a) ? Mean Epoch of Declination (2)
      character*1   Note       (nr__) ! [*] indicates a note in the catalog
*Note (1): the numeric spectral type exists only for stars 1-10400;
*     it is coded on 3 bytes as follows:
*       -------------------------------
*       Byte#16     Byte#17    Byte#18
*       -------------------------------
*          R=0    a or 0=0
*        Oe5=1    b or 1=1
*          O=2    c or 2=2
*          B=2    d or 3=3        *=3
*          A=4    e or 4=4
*          F=5         5=5        e=5
*          G=6         6=6
*          K=7         7=7
*          M=8         8=8
*          N=9         9=9
*          S=-                    p=-
*       -------------------------------
*       Special cases:
*          Mb=83  Mc=88, Md=8 5, Me=8-5,
*          Np=9 -
*Note (2): the value is not specified when it is identical to the
*     corresponding number for RA.

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

C  Loading file 'catalog.dat'	! The catalog of (9989 + 582) stars.

C  Format for file interpretation

    1 format(
     +  I5,A8,A2,A3,F5.2,A1,F4.2,I2,I2,F6.3,F7.4,A1,I2,I2,F5.2,F6.3,
     +  I3,I3,I4,I4,A1)

C  Effective file loading

      open(unit=1,file='catalog.dat', status='old')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,10571
        read(1,'(A76)')ar__
        read(ar__,1)
     +  Seq(i__),DM(i__),Sp(i__),NumSp(i__),Vmag(i__),n_Vmag(i__),
     +  ObsMag(i__),RAh(i__),RAm(i__),RAs(i__),pmRA(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),pmDE(i__),o_RAs(i__),o_DEs(i__),
     +  EpRA_1900(i__),EpDE_1900(i__),Note(i__)
        if(ar__(19:23) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(25:28) .EQ. '') ObsMag(i__) = rNULL__
        if(ar__(39:45) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(56:61) .EQ. '') pmDE(i__) = rNULL__
        if(ar__(65:67) .EQ. '') o_DEs(i__) = iNULL__
        if(ar__(72:75) .EQ. '') EpDE_1900(i__) = iNULL__
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)
     +  Seq(i__),DM(i__),Sp(i__),NumSp(i__),Vmag(i__),n_Vmag(i__),
     +  ObsMag(i__),RAh(i__),RAm(i__),RAs(i__),pmRA(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),pmDE(i__),o_RAs(i__),o_DEs(i__),
     +  EpRA_1900(i__),EpDE_1900(i__),Note(i__)
        write(6,'(6H Pos: 2F8.4)') RA_(i__),Dec(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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