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

Conversion of standardized ReadMe file for file /./ftp/cats/I/206 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-Mar-28
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. I/206         Bright Stars Supplement to PPM (Bastian+ 1993)
*================================================================================
*The Bright Stars Supplement to the PPM and PPM South Catalogue, Revised Edition
*     Bastian U., Roeser S.
*    <Astronomisches Rechen-Institut, Heidelberg (1993)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'ppmb'	! The Bright Star Supplement

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

C  J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs (Epoch=J2000.0,)
      real*8        RAdeg       ! (deg) Right Ascension J2000.0, Epoch=J2000.0,
      real*8        DEdeg       ! (deg)     Declination J2000.0, Epoch=J2000.0,
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     PPM         ! [400001/400321]+ PPM number
      character*9   DM          ! Durchmusterung, here empty
      real*4        Mag         ! (mag) Visual magnitude
      character*2   Sp          ! Spectral type (blank)
      integer*4     RAh         ! (h) Right Ascension for the Equinox=J2000.0 and
*                                     Epoch=J2000.0, on the system of FK5
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) Right Ascension J2000 (seconds)
      character*1   DE_         ! Declination J2000 (sign)
      integer*4     DEd         ! (deg) Declination for the equinox and epoch
*                                     J2000.0, on the system of FK5
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes)
      real*4        DEs         ! (arcsec) Declination J2000 (seconds)
      real*8        pmRA        ! (s/a) Proper motion in right ascension
      real*4        pmDE        ! (arcsec/a) Proper motion in declination
      integer*4     Npos        ! [0] Number of individual positions used
      integer*4     e_RA        ! (10mas) [99] Mean error of RA multiplied by cos(DE)
      integer*4     e_DE        ! (10mas) [99] Mean error of DE
      real*4        e_pmRA      ! (mas/a) [9.9] Mean error of pmRA
*                                         multiplied by cos(DE)
      real*4        e_pmDE      ! (mas/a) [9.9] Mean error of proper motion in DE
      real*4        EpRA_1900   ! (a) [50] Weighted mean epoch for RA, given in
*                                      years since 1900
      real*4        EpDE_1900   ! (a) [50] Weighted mean epoch for DE, given in
*                                     years since 1900
      character*1   Flag1       ! [B] 'B' for Bright star
      character*1   Flag2       ! [D] 'D' for double star
      character*1   Flag5       ! [R] 'R' for Remark (only No 400148)
*                                        explained in file descrip

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

C  Loading file 'ppmb'	! The Bright Star Supplement

C  Format for file interpretation

    1 format(
     +  1X,I6,2X,A9,1X,F4.1,1X,A2,1X,I2,1X,I2,1X,F6.3,2X,A1,I2,1X,I2,
     +  1X,F5.2,2X,F7.4,1X,F6.3,1X,I2,1X,I2,1X,I2,1X,F4.1,1X,F4.1,1X,
     +  F5.2,1X,F5.2,26X,A1,A1,2X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ppmb')
      write(6,*) '....Loading file: ppmb'
      do i__=1,275
        read(1,'(A131)')ar__
        read(ar__,1)
     +  PPM,DM,Mag,Sp,RAh,RAm,RAs,DE_,DEd,DEm,DEs,pmRA,pmDE,Npos,e_RA,
     +  e_DE,e_pmRA,e_pmDE,EpRA_1900,EpDE_1900,Flag1,Flag2,Flag5
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  PPM,DM,Mag,Sp,RAh,RAm,RAs,DE_,DEd,DEm,DEs,pmRA,pmDE,Npos,e_RA,
     +  e_DE,e_pmRA,e_pmDE,EpRA_1900,EpDE_1900,Flag1,Flag2,Flag5
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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