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

Conversion of standardized ReadMe file for file /./ftp/cats/V/125 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 2026-Oct-12
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/125       Photometry and Spectroscopy for Luminous Stars      (Reed 2005)
*================================================================================
*New estimates of the solar-neighborhood massive star birthrate and the
*galactic supernova rate.
*     Reed C.
*    <Astron. J. 125, 2531 (2003), Astron. J. 130, 1652 (2005)>
*    =2003AJ....125.2531R
*    +2005AJ....130.1652R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'obcat.dat'	! Catalog of star names/identifiers, positions, and
                              cross-references, ordered by increasing RA

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

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

      integer*4     ALS         ! Alma LS number (G1)
      character*25  Name        ! Source name
      character*8   DM          ! BD identifier:  BD, CD, or CP
      character*9   CPD         ! CPD identifier
      character*9   CD          ! Cordoba Durchmustering
      integer*4     SAO         ! ? SAO (Cat. I/131) number
      integer*4     HD          ! ? HD (Cat. III/135) number
      integer*4     HR          ! ? Bright Star (Cat. V/50) number
      character*10  OName       ! ?=- Other name
      real*4        mag         ! (mag) ?=99.9 magnitude, see n_mag
      character*1   n_mag       ! [PVN] Type of magnitude: V=pe, P=pg, N=none
      integer*4     RAh         ! (h) Right Ascension J2000 (hours)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) [0,60] Right Ascension J2000 (seconds)
      character*1   DE_         ! Declination J2000 (sign)
      integer*4     DEd         ! (deg) Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs         ! (arcsec) [0,60] Declination J2000 (seconds)
      real*8        GLON        ! (deg) Galactic longitude
      real*8        GLAT        ! (deg) Galactic latitude

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

C  Declarations for 'obmk.dat'	! Collation of MK classifications

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

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

      integer*4     ALS_1       ! Alma LS number (G1)
      character*25  Name_1      ! Source name
      character*11  DM_1        ! DM identification
      integer*4     HD_1        ! ? HD (Cat. III/135) number
      character*8   TC          ! Temperature Class
      character*8   LC          ! Luminosity Class
      character*8   Pec         ! Spectral-luminosity qualifier (pecularities)
      character*20  Disp        ! Dispersion description
      character*20  Notes       ! ?=- Remarks
      integer*4     RAh_1       ! (h) Right ascension (J2000.0)
      integer*4     RAm_1       ! (min) Right ascension (J2000.0)
      integer*4     RAs_1       ! (s) [0/60] Right ascension (J2000.0)
      character*1   DE__1       ! Declination sign (J2000.0)
      integer*4     DEd_1       ! (deg) Declination (J2000.0)
      integer*4     DEm_1       ! (arcmin) Declination (J2000.0)
      integer*4     DEs_1       ! (arcsec) [0/60] Declination (J2000.0)
      character*19  BibCode     ! BibCode of reference
      character*25  Author      ! First author
      character*10  Rem         ! Remarks and other identifications

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

C  Declarations for 'obubvbet.dat'	! Collation of UBV-beta data

      integer*4 nr__2
      parameter (nr__2=37962)	! Number of records
      character*188 ar__2  	! Full-size record

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

      integer*4     ALS_2       ! Alma LS number (G1)
      character*1   n_ALS       ! [*] indicates a note detailed in notes.dat
      character*26  Name_2      ! Source name
      character*11  DM_2        ! DM identification
      integer*4     HD_2        ! ? HD (Cat. III/135) number
      real*4        Vmag        ! ?=99.99 V magnitude
      real*4        B_V         ! (mag) ?=99.99 B-V color index
      real*4        U_B         ! (mag) ?=99.99 U-B color index
      integer*4     o_Vmag      ! Number of UBV observations
      real*4        Hbeta       ! (mag) ?=99.990 Hbeta index
      integer*4     o_Hbeta     ! Number of Hbeta observations
      character*20  Notes_1     ! Short notes about the photometry
      integer*4     RAh_2       ! (h) Right ascension (J2000.0)
      integer*4     RAm_2       ! (min) Right ascension (J2000.0)
      integer*4     RAs_2       ! (s) [0/60] Right ascension (J2000.0)
      character*1   DE__2       ! Declination sign (J2000.0)
      integer*4     DEd_2       ! (deg) Declination (J2000.0)
      integer*4     DEm_2       ! (arcmin) Declination (J2000.0)
      integer*4     DEs_2       ! (arcsec) [0/60] Declination (J2000.0)
      character*19  BibCode_1   ! BibCode
      character*25  Author_1    ! First author
      character*10  Rem_1       ! Remarks/other identifications

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

C  Declarations for 'radvel.dat'	! *Radial velocity data

      integer*4 nr__3
      parameter (nr__3=1072)	! Number of records
      character*148 ar__3  	! Full-size record

C  Position composed of: GLON GLAT
      integer*4     ALS_3       ! [1/5132] LSS Number (G1)
      character*1   n_ALS_1     ! [*] indicates a remark detailed in notes.dat
      integer*4     HD_3        ! ?HD number
      character*9   CD_1        ! CD (Cat. I/114) designation
      real*4        RV          ! (km/s) Radial velocity
      real*4        e_RV        ! (km/s) Standard deviation for RV
      integer*4     o_RV        ! Number of observations of RV
      character*20  Disp_1      ! *Dispersion
      character*9   Notes_2     ! Variable type or other note
      real*4        Pmag        ! (mag) LSS photographic magnitude
      integer*4     publ        ! (yr) Year of publication
      character*24  auth        ! First author
      character*20  ref         ! Reference
      real*4        GLON_1      ! (deg) Galactic longitude
      real*4        GLAT_1      ! (deg) Galactic latitude
      character*8   name_3      ! Alternate name of star
*Note on Disp:
*  The format of the majority of the dispersions is: type of instrument
*  used, dispersion in A/mm and the wavelength at which the dispersion
*  applies. These records incorporate a number of abbreviations, as follows:
*        A       Angstrom
*        d       Hydrogen delta
*        g       Hydrogen gamma
*        m/A     microns per Angstrom
*        Cass    Cassegrain spectrum
*        1P      1-prism
*        2P      2-prism
*        3P      3-prism
*        C       Coude spectrum
*        G       Grating spectrum (reflection or transmission not specified)
*        IT      Image tube spectrum
*        OP      Objective-prism
*        P       Prism
*        RG      Reflection grating
*        S       Slit
*        TG      Transmission grating
*        TP      Thin prism

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

C  Declarations for 'notes.dat'	! Remarks on individual stars

      integer*4 nr__4
      parameter (nr__4=909)	! Number of records
      character*80 ar__4  	! Full-size record

      integer*4     ALS_4       ! ALS number (G1)
      integer*4     ALS2        ! ? Second ALS number for binaries
      character*68  Text        ! Text of the note (2)
*Note (2): For stars from the original Case-Hamburg (CH) catalog, the
*    note began with the photographic magnitude(s) given in the CH
*    catalog, otherwise the photoelectric B magnitude, in parentheses.

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

C  Loading file 'obcat.dat'	! Catalog of star names/identifiers, positions, and
*                              cross-references, ordered by increasing RA

C  Format for file interpretation

    1 format(
     +  1X,I5,1X,A25,1X,A8,1X,A9,1X,A9,1X,I6,1X,I6,1X,I4,1X,A10,1X,
     +  F5.1,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,F8.2,
     +  1X,F8.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'obcat.dat')
      write(6,*) '....Loading file: obcat.dat'
      do i__=1,18693
        read(1,'(A138)')ar__
        read(ar__,1)
     +  ALS,Name,DM,CPD,CD,SAO,HD,HR,OName,mag,n_mag,RAh,RAm,RAs,DE_,
     +  DEd,DEm,DEs,GLON,GLAT
        if(ar__(63:68) .EQ. '') SAO = iNULL__
        if(ar__(70:75) .EQ. '') HD = iNULL__
        if(ar__(77:80) .EQ. '') HR = iNULL__
        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)
     +  ALS,Name,DM,CPD,CD,SAO,HD,HR,OName,mag,n_mag,RAh,RAm,RAs,DE_,
     +  DEd,DEm,DEs,GLON,GLAT
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'obmk.dat'	! Collation of MK classifications

C  Format for file interpretation

    2 format(
     +  1X,I5,1X,A25,1X,A11,1X,I6,1X,A8,1X,A8,1X,A8,1X,A20,1X,A20,4X,
     +  I2,1X,I2,I2,3X,A1,I2,1X,I2,I2,1X,A19,1X,A25,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'obmk.dat')
      write(6,*) '....Loading file: obmk.dat'
      do i__=1,22885
        read(1,'(A199)')ar__1
        read(ar__1,2)
     +  ALS_1,Name_1,DM_1,HD_1,TC,LC,Pec,Disp,Notes,RAh_1,RAm_1,RAs_1,
     +  DE__1,DEd_1,DEm_1,DEs_1,BibCode,Author,Rem
        if(ar__1(46:51) .EQ. '') HD_1 = iNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  ALS_1,Name_1,DM_1,HD_1,TC,LC,Pec,Disp,Notes,RAh_1,RAm_1,RAs_1,
     +  DE__1,DEd_1,DEm_1,DEs_1,BibCode,Author,Rem
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'obubvbet.dat'	! Collation of UBV-beta data

C  Format for file interpretation

    3 format(
     +  1X,I5,A1,A26,1X,A11,1X,I6,1X,F5.2,3X,F5.2,1X,F5.2,2X,I3,1X,
     +  F6.3,1X,I3,1X,A20,4X,I2,1X,I2,I2,3X,A1,I2,1X,I2,I2,1X,A19,1X,
     +  A25,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'obubvbet.dat')
      write(6,*) '....Loading file: obubvbet.dat'
      do i__=1,37962
        read(1,'(A188)')ar__2
        read(ar__2,3)
     +  ALS_2,n_ALS,Name_2,DM_2,HD_2,Vmag,B_V,U_B,o_Vmag,Hbeta,
     +  o_Hbeta,Notes_1,RAh_2,RAm_2,RAs_2,DE__2,DEd_2,DEm_2,DEs_2,
     +  BibCode_1,Author_1,Rem_1
        if(ar__2(47:52) .EQ. '') HD_2 = iNULL__
        RAdeg_2 = rNULL__
        DEdeg_2 = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2 .GT. -180) RAdeg_2=RAh_2*15.
        if(RAm_2 .GT. -180) RAdeg_2=RAdeg_2+RAm_2/4.
        if(RAs_2 .GT. -180) RAdeg_2=RAdeg_2+RAs_2/240.
        if(DEd_2 .GE. 0) DEdeg_2=DEd_2
        if(DEm_2 .GE. 0) DEdeg_2=DEdeg_2+DEm_2/60.
        if(DEs_2 .GE. 0) DEdeg_2=DEdeg_2+DEs_2/3600.
        if(DE__2.EQ.'-'.AND.DEdeg_2.GE.0) DEdeg_2=-DEdeg_2
c    ..............Just test output...........
        write(6,3)
     +  ALS_2,n_ALS,Name_2,DM_2,HD_2,Vmag,B_V,U_B,o_Vmag,Hbeta,
     +  o_Hbeta,Notes_1,RAh_2,RAm_2,RAs_2,DE__2,DEd_2,DEm_2,DEs_2,
     +  BibCode_1,Author_1,Rem_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'radvel.dat'	! *Radial velocity data

C  Format for file interpretation

    4 format(
     +  I4,A1,1X,I6,1X,A9,1X,F6.1,1X,F5.1,1X,I2,1X,A20,1X,A9,1X,F4.1,
     +  1X,I4,1X,A24,1X,A20,1X,F6.2,1X,F6.2,1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'radvel.dat')
      write(6,*) '....Loading file: radvel.dat'
      do i__=1,1072
        read(1,'(A148)')ar__3
        read(ar__3,4)
     +  ALS_3,n_ALS_1,HD_3,CD_1,RV,e_RV,o_RV,Disp_1,Notes_2,Pmag,publ,
     +  auth,ref,GLON_1,GLAT_1,name_3
        if(ar__3(7:12) .EQ. '') HD_3 = iNULL__
c    ..............Just test output...........
        write(6,4)
     +  ALS_3,n_ALS_1,HD_3,CD_1,RV,e_RV,o_RV,Disp_1,Notes_2,Pmag,publ,
     +  auth,ref,GLON_1,GLAT_1,name_3
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Remarks on individual stars

C  Format for file interpretation

    5 format(I5,1X,I5,1X,A68)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,909
        read(1,'(A80)')ar__4
        read(ar__4,5)ALS_4,ALS2,Text
        if(ar__4(7:11) .EQ. '') ALS2 = iNULL__
c    ..............Just test output...........
        write(6,5)ALS_4,ALS2,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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