FORTRAN Generation
(/./ftp/cats/V/50)

Conversion of standardized ReadMe file for file /./ftp/cats/V/50 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.81 (2015-09-23), on 2017-Dec-17
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. V/50           Bright Star Catalogue, 5th Revised Ed.     (Hoffleit+, 1991)
*================================================================================
*The Bright Star Catalogue,  5th Revised Ed. (Preliminary Version)
*     Hoffleit D., Warren Jr W.H.
*    <Astronomical Data Center, NSSDC/ADC (1991)>
*    =1964BS....C......0H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog'	! The main part of the Catalogue

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

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

      integer*4     HR         (nr__) ! [1/9110]+ Harvard Revised Number
*                                    = Bright Star Number
      character*10  Name       (nr__) ! Name, generally Bayer and/or Flamsteed name
      character*11  DM         (nr__) ! Durchmusterung Identification (zone in
*                                    bytes 17-19)
      integer*4     HD         (nr__) ! [1/225300]? Henry Draper Catalog Number
      integer*4     SAO        (nr__) ! [1/258997]? SAO Catalog Number
      integer*4     FK5        (nr__) ! ? FK5 star Number
      character*1   IRflag     (nr__) ! [I] I if infrared source
      character*1   r_IRflag   (nr__) ! *[ ':] Coded reference for infrared source
      character*1   Multiple   (nr__) ! *[AWDIRS] Double or multiple-star code
      character*5   ADS        (nr__) ! Aitken's Double Star Catalog (ADS) designation
      character*2   ADScomp    (nr__) ! ADS number components
      character*9   VarID      (nr__) ! Variable star identification
      integer*4     RAh1900    (nr__) ! (h) ?Hours RA, equinox B1900, epoch 1900.0 (1)
      integer*4     RAm1900    (nr__) ! (min) ?Minutes RA, equinox B1900, epoch 1900.0 (1)
      real*4        RAs1900    (nr__) ! (s) ?Seconds RA, equinox B1900, epoch 1900.0 (1)
      character*1   DE_1900    (nr__) ! ?Sign Dec, equinox B1900, epoch 1900.0 (1)
      integer*4     DEd1900    (nr__) ! (deg) ?Degrees Dec, equinox B1900, epoch 1900.0 (1)
      integer*4     DEm1900    (nr__) ! (arcmin) ?Minutes Dec, equinox B1900, epoch 1900.0 (1)
      integer*4     DEs1900    (nr__) ! (arcsec) ?Seconds Dec, equinox B1900, epoch 1900.0 (1)
      integer*4     RAh        (nr__) ! (h) ?Hours RA, equinox J2000, epoch 2000.0 (1)
      integer*4     RAm        (nr__) ! (min) ?Minutes RA, equinox J2000, epoch 2000.0 (1)
      real*4        RAs        (nr__) ! (s) ?Seconds RA, equinox J2000, epoch 2000.0 (1)
      character*1   DE_        (nr__) ! ?Sign Dec, equinox J2000, epoch 2000.0 (1)
      integer*4     DEd        (nr__) ! (deg) ?Degrees Dec, equinox J2000, epoch 2000.0 (1)
      integer*4     DEm        (nr__) ! (arcmin) ?Minutes Dec, equinox J2000, epoch 2000.0 (1)
      integer*4     DEs        (nr__) ! (arcsec) ?Seconds Dec, equinox J2000, epoch 2000.0 (1)
      real*4        GLON       (nr__) ! (deg) ?Galactic longitude (1)
      real*4        GLAT       (nr__) ! (deg) ?Galactic latitude (1)
      real*4        Vmag       (nr__) ! (mag) ?Visual magnitude (1)
      character*1   n_Vmag     (nr__) ! *[ HR] Visual magnitude code
      character*1   u_Vmag     (nr__) ! [ :?] Uncertainty flag on V
      real*4        B_V        (nr__) ! (mag) ? B-V color in the UBV system
      character*1   u_B_V      (nr__) ! [ :?] Uncertainty flag on B-V
      real*4        U_B        (nr__) ! (mag) ? U-B color in the UBV system
      character*1   u_U_B      (nr__) ! [ :?] Uncertainty flag on U-B
      real*4        R_I        (nr__) ! (mag) ? R-I   in system specified by n_R-I
      character*1   n_R_I      (nr__) ! [CE:?D] Code for R-I system (Cousin, Eggen)
      character*20  SpType     (nr__) ! Spectral type
      character*1   n_SpType   (nr__) ! [evt] Spectral type code
      real*4        pmRA       (nr__) ! (arcsec/yr) *?Annual proper motion in RA J2000, FK5 system
      real*4        pmDE       (nr__) ! (arcsec/yr) ?Annual proper motion in Dec J2000, FK5 system
      character*1   n_Parallax (nr__) ! [D] D indicates a dynamical parallax,
*                                    otherwise a trigonometric parallax
      real*4        Parallax   (nr__) ! (arcsec) ? Trigonometric parallax (unless n_Parallax)
      integer*4     RadVel     (nr__) ! (km/s) ? Heliocentric Radial Velocity
      character*4   n_RadVel   (nr__) ! *[V?SB123O ] Radial velocity comments
      character*2   l_RotVel   (nr__) ! [<=> ] Rotational velocity limit characters
      integer*4     RotVel     (nr__) ! (km/s) ? Rotational velocity, v sin i
      character*1   u_RotVel   (nr__) ! [ :v] uncertainty and variability flag on
*                                    RotVel
      real*4        Dmag       (nr__) ! (mag) ? Magnitude difference of double,
*                                    or brightest multiple
      real*4        Sep        (nr__) ! (arcsec) ? Separation of components in Dmag
*                                    if occultation binary.
      character*4   MultID     (nr__) ! Identifications of components in Dmag
      integer*4     MultCnt    (nr__) ! ? Number of components assigned to a multiple
      character*1   NoteFlag   (nr__) ! [*] a star indicates that there is a note
*                                    (see file notes)
*Note (1): These fields are all blanks for stars removed from
*    the Bright Star Catalogue (see notes).
*Note on r_IRflag:
*  Blank if from NASA merged Infrared Catalogue, Schmitz et al., 1978;
*      ' if from Engles et al. 1982
*      : if uncertain identification
*Note on Multiple:
*      A = Astrometric binary
*      D = Duplicity discovered by occultation;
*      I = Innes, Southern Double Star Catalogue (1927)
*      R = Rossiter, Michigan Publ. 9, 1955
*      S = Duplicity discovered by speckle interferometry.
*      W = Worley (1978) update of the IDS;
*Note on n_Vmag:
*  blank = V on UBV Johnson system;
*      R = HR magnitudes reduced to the UBV system;
*      H = original HR magnitude.
*Note on pmRA:
*     As usually assumed, the proper motion in RA is the projected
*     motion (cos(DE).d(RA)/dt), i.e. the total proper motion is
*     sqrt(pmRA^2^+pmDE^2^)
*Note on n_RadVel:
*     V  = variable radial velocity;
*     V? = suspected variable radial velocity;
*     SB, SB1, SB2, SB3 = spectroscopic binaries,
*                         single, double or triple lined spectra;
*      O = orbital data available.

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

C  Declarations for 'notes'	! Remarks

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

      integer*4     HR_1       (nr__1) ! [1/9110]+= Harvard Revised (HR)
      integer*4     Count      (nr__1) ! Note counter (sequential for a star)
      character*4   Category   (nr__1) ! *[A-Z: ] Remark category abbreviation:
      character*120 Remark     (nr__1) ! Remarks in free form text
*Note on Category: the following abbreviations are used:
*    C   - Colors;
*    D   - Double and multiple stars;
*    DYN - Dynamical parallaxes;
*    G   - Group membership;
*    M   - Miscellaneous.
*    N   - Star names;
*    P   - Polarization;
*    R   - Stellar radii or diameters;
*    RV  - Radial and/or rotational velocities;
*    S   - Spectra;
*    SB  - Spectroscopic binaries;
*    VAR - Variability;
*    The category abbreviation is always followed by a colon (:).

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

C  Loading file 'catalog'	! The main part of the Catalogue

C  Format for file interpretation

    1 format(
     +  I4,A10,A11,I6,I6,I4,A1,A1,A1,A5,A2,A9,I2,I2,F4.1,A1,I2,I2,I2,
     +  I2,I2,F4.1,A1,I2,I2,I2,F6.2,F6.2,F5.2,A1,A1,F5.2,A1,F5.2,A1,
     +  F5.2,A1,A20,A1,F6.3,F6.3,A1,F5.3,I4,A4,A2,I3,A1,F4.1,F6.1,A4,
     +  I2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog')
      write(6,*) '....Loading file: catalog'
      do i__=1,9110
        read(1,'(A197)')ar__
        read(ar__,1)
     +  HR(i__),Name(i__),DM(i__),HD(i__),SAO(i__),FK5(i__),
     +  IRflag(i__),r_IRflag(i__),Multiple(i__),ADS(i__),ADScomp(i__),
     +  VarID(i__),RAh1900(i__),RAm1900(i__),RAs1900(i__),
     +  DE_1900(i__),DEd1900(i__),DEm1900(i__),DEs1900(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  GLON(i__),GLAT(i__),Vmag(i__),n_Vmag(i__),u_Vmag(i__),
     +  B_V(i__),u_B_V(i__),U_B(i__),u_U_B(i__),R_I(i__),n_R_I(i__),
     +  SpType(i__),n_SpType(i__),pmRA(i__),pmDE(i__),n_Parallax(i__),
     +  Parallax(i__),RadVel(i__),n_RadVel(i__),l_RotVel(i__),
     +  RotVel(i__),u_RotVel(i__),Dmag(i__),Sep(i__),MultID(i__),
     +  MultCnt(i__),NoteFlag(i__)
        if(ar__(26:31) .EQ. '') HD(i__) = iNULL__
        if(ar__(32:37) .EQ. '') SAO(i__) = iNULL__
        if(ar__(38:41) .EQ. '') FK5(i__) = iNULL__
        if(ar__(61:62) .EQ. '') RAh1900(i__) = iNULL__
        if(ar__(63:64) .EQ. '') RAm1900(i__) = iNULL__
        if(ar__(65:68) .EQ. '') RAs1900(i__) = rNULL__
        if(ar__(70:71) .EQ. '') DEd1900(i__) = iNULL__
        if(ar__(72:73) .EQ. '') DEm1900(i__) = iNULL__
        if(ar__(74:75) .EQ. '') DEs1900(i__) = iNULL__
        if(ar__(76:77) .EQ. '') RAh(i__) = iNULL__
        if(ar__(78:79) .EQ. '') RAm(i__) = iNULL__
        if(ar__(80:83) .EQ. '') RAs(i__) = rNULL__
        if(ar__(85:86) .EQ. '') DEd(i__) = iNULL__
        if(ar__(87:88) .EQ. '') DEm(i__) = iNULL__
        if(ar__(89:90) .EQ. '') DEs(i__) = iNULL__
        if(ar__(91:96) .EQ. '') GLON(i__) = rNULL__
        if(ar__(97:102) .EQ. '') GLAT(i__) = rNULL__
        if(ar__(103:107) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(110:114) .EQ. '') B_V(i__) = rNULL__
        if(ar__(116:120) .EQ. '') U_B(i__) = rNULL__
        if(ar__(122:126) .EQ. '') R_I(i__) = rNULL__
        if(ar__(149:154) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(155:160) .EQ. '') pmDE(i__) = rNULL__
        if(ar__(162:166) .EQ. '') Parallax(i__) = rNULL__
        if(ar__(167:170) .EQ. '') RadVel(i__) = iNULL__
        if(ar__(177:179) .EQ. '') RotVel(i__) = iNULL__
        if(ar__(181:184) .EQ. '') Dmag(i__) = rNULL__
        if(ar__(185:190) .EQ. '') Sep(i__) = rNULL__
        if(ar__(195:196) .EQ. '') MultCnt(i__) = iNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  HR(i__),Name(i__),DM(i__),HD(i__),SAO(i__),FK5(i__),
     +  IRflag(i__),r_IRflag(i__),Multiple(i__),ADS(i__),ADScomp(i__),
     +  VarID(i__),RAh1900(i__),RAm1900(i__),RAs1900(i__),
     +  DE_1900(i__),DEd1900(i__),DEm1900(i__),DEs1900(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  GLON(i__),GLAT(i__),Vmag(i__),n_Vmag(i__),u_Vmag(i__),
     +  B_V(i__),u_B_V(i__),U_B(i__),u_U_B(i__),R_I(i__),n_R_I(i__),
     +  SpType(i__),n_SpType(i__),pmRA(i__),pmDE(i__),n_Parallax(i__),
     +  Parallax(i__),RadVel(i__),n_RadVel(i__),l_RotVel(i__),
     +  RotVel(i__),u_RotVel(i__),Dmag(i__),Sep(i__),MultID(i__),
     +  MultCnt(i__),NoteFlag(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes'	! Remarks

C  Format for file interpretation

    2 format(1X,I4,I2,A4,1X,A120)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes')
      write(6,*) '....Loading file: notes'
      do i__=1,9190
        read(1,'(A132)')ar__1
        read(ar__1,2)HR_1(i__),Count(i__),Category(i__),Remark(i__)
c    ..............Just test output...........
        write(6,2)HR_1(i__),Count(i__),Category(i__),Remark(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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