FORTRAN Generation
(/./ftp/cats/II/20A)

Conversion of standardized ReadMe file for file /./ftp/cats/II/20A 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 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. II/20A         UBV Photometry of O and B Stars in Vela    (Denoyelle 1977)
*================================================================================
*The Spatial Distribution of Young Stars in Vela
*     Denoyelle J.
*    <Astron.  Astrophys. Suppl. Ser., 27, 343 (1977)>
*    =1977A&AS...27..343D
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'data.dat'	! Results (table 3 of the paper)

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

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

      integer*4     m_Seq      (nr__) ! [1/5]? Multiplicity index to star
      integer*4     Seq        (nr__) ! [1/358] Running number
      integer*4     HD         (nr__) ! ? HD number
      character*8   CPD        (nr__) ! ? Cape Photographic Durchmusterung (or CD)
      character*1   n_CPD      (nr__) ! [ *] * = Cordoba Durchmusterung designation
      integer*4     RAh        (nr__) ! (h) Right Ascension (1950) hours
      real*4        RAm        (nr__) ! (min) Right Ascension (1950) minutes
      character*1   DE_        (nr__) ! Declination (1950) sign
      integer*4     DEd        (nr__) ! (deg) Declination (1950) degrees
      integer*4     DEm        (nr__) ! (arcmin) Declination (1950) arcminutes
      real*4        GLON       (nr__) ! (deg) Galactic longitude
      real*4        GLAT       (nr__) ! (deg) Galactic latitude
      real*4        Vmag       (nr__) ! (mag) [2.4/14.5]?=99.99 V magnitude
      character*1   u_Vmag     (nr__) ! [ ()] Uncertainty flag for V
      real*4        B_V        (nr__) ! (mag) ?=99.99 (B-V) color index
      character*1   u_B_V      (nr__) ! [ (] Uncertainty flag for B-V
      real*4        U_B        (nr__) ! (mag) ?=99.99 (U-B) color index
      character*1   u_U_B      (nr__) ! [ (] Uncertainty flag for U-B
      character*9   Sp         (nr__) ! MK or HD spectral classification
      integer*4     r_Sp       (nr__) ! [1,8]? Number of the source for MK Dp.
      character*1   em         (nr__) ! [ E] E = H{alpha} emission noted on red plates
      character*4   Sp2        (nr__) ! Spectral type obtained from Q method
      real*4        Q          (nr__) ! (mag) ?=- Q parameter = (U-B)-0.72 (B-V)
      real*4        E_B_V      (nr__) ! (mag) ?=- (B-V) colour excess
      real*4        A_V        (nr__) ! (mag) ?=- A(V) parameter = 3E(B-V)
      real*4        m_M        (nr__) ! (mag) ?=- Distance modulus
      integer*4     R          (nr__) ! (pc) ?=- Distance of the star
      integer*4     Z          (nr__) ! (pc) Distance from the galactic plane [R*sin(GLAT)]
      integer*4     Nobs       (nr__) ! Number of observations
      character*1   rem        (nr__) ! [ *] comment in file "remarks.dat"

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

C  Declarations for 'remarks.dat'	! Original remarks (added in July 2016)

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

      integer*4     m_Seq_1    (nr__1) ! [1/5]? Multiplicity index to star
      integer*4     Seq_1      (nr__1) ! [1/358] Running number
      character*209 Text       (nr__1) ! Text of note (original notes in "remarks.dat",
*                                  notes added at CDS about problematic star
*                                  identification in "notes.dat")

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

C  Declarations for 'position.dat'	! Accurate positions of the stars (added July 2016)

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

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

      integer*4     m_Seq_2    (nr__2) ! [1/5]? Multiplicity index to star
      integer*4     Seq_2      (nr__2) ! [1/358] Running number
      character*1   f_Sname    (nr__2) ! [*] Flag for insecure identification
      integer*4     RAh_1      (nr__2) ! (h) ? Right Ascension J2000, Ep=J2000 (hours)
      integer*4     RAm_1      (nr__2) ! (min) ? Right Ascension J2000, Ep=J2000 (minutes)
      real*4        RAs        (nr__2) ! (s) ? Right Ascension J2000, Ep=J2000 (seconds)
      character*1   DE__1      (nr__2) ! Declination J2000, Ep=J2000 (sign)
      integer*4     DEd_1      (nr__2) ! (deg) ? Declination J2000, Ep=J2000 (degrees)
      integer*4     DEm_1      (nr__2) ! (arcmin) ? Declination J2000, Ep=J2000 (minutes)
      real*4        DEs        (nr__2) ! (arcsec) ? Declination J2000, Ep=J2000 (seconds)
      character*17  Sname      (nr__2) ! Name understandable by Simbad
      character*30  Name2      (nr__2) ! Other name

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

C  Declarations for 'notes.dat'	! Remarks about star identifications in the course
                             of position retrieval (added in July 2016)

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

      integer*4     m_Seq_3    (nr__3) ! [1/5]? Multiplicity index to star
      integer*4     Seq_3      (nr__3) ! [1/358] Running number
      character*209 Text_1     (nr__3) ! Text of note (original notes in "remarks.dat",
*                                  notes added at CDS about problematic star
*                                  identification in "notes.dat")

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

C  Loading file 'data.dat'	! Results (table 3 of the paper)

C  Format for file interpretation

    1 format(
     +  I1,I3,1X,I6,1X,A8,A1,I2,1X,F4.1,A1,I2,1X,I2,1X,F6.2,2X,F5.2,
     +  1X,F5.2,A1,1X,F5.2,A1,1X,F5.2,A1,A9,I1,1X,A1,A4,1X,F5.2,2X,
     +  F4.2,2X,F4.2,3X,F4.1,1X,I5,2X,I4,2X,I2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'data.dat')
      write(6,*) '....Loading file: data.dat'
      do i__=1,381
        read(1,'(A127)')ar__
        read(ar__,1)
     +  m_Seq(i__),Seq(i__),HD(i__),CPD(i__),n_CPD(i__),RAh(i__),
     +  RAm(i__),DE_(i__),DEd(i__),DEm(i__),GLON(i__),GLAT(i__),
     +  Vmag(i__),u_Vmag(i__),B_V(i__),u_B_V(i__),U_B(i__),u_U_B(i__),
     +  Sp(i__),r_Sp(i__),em(i__),Sp2(i__),Q(i__),E_B_V(i__),A_V(i__),
     +  m_M(i__),R(i__),Z(i__),Nobs(i__),rem(i__)
        if(ar__(1:1) .EQ. '') m_Seq(i__) = iNULL__
        if(ar__(6:11) .EQ. '') HD(i__) = iNULL__
        if(ar__(79:79) .EQ. '') r_Sp(i__) = iNULL__
        if (idig(ar__(87:91)).EQ.0) Q(i__) =  rNULL__
        if (idig(ar__(94:97)).EQ.0) E_B_V(i__) =  rNULL__
        if (idig(ar__(100:103)).EQ.0) A_V(i__) =  rNULL__
        if (idig(ar__(107:110)).EQ.0) m_M(i__) =  rNULL__
        if (R(i__) .EQ. 45) R(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(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  m_Seq(i__),Seq(i__),HD(i__),CPD(i__),n_CPD(i__),RAh(i__),
     +  RAm(i__),DE_(i__),DEd(i__),DEm(i__),GLON(i__),GLAT(i__),
     +  Vmag(i__),u_Vmag(i__),B_V(i__),u_B_V(i__),U_B(i__),u_U_B(i__),
     +  Sp(i__),r_Sp(i__),em(i__),Sp2(i__),Q(i__),E_B_V(i__),A_V(i__),
     +  m_M(i__),R(i__),Z(i__),Nobs(i__),rem(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 'remarks.dat'	! Original remarks (added in July 2016)

C  Format for file interpretation

    2 format(I1,I3,1X,A209)

C  Effective file loading

      open(unit=1,status='old',file=
     +'remarks.dat')
      write(6,*) '....Loading file: remarks.dat'
      do i__=1,120
        read(1,'(A214)')ar__1
        read(ar__1,2)m_Seq_1(i__),Seq_1(i__),Text(i__)
        if(ar__1(1:1) .EQ. '') m_Seq_1(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)m_Seq_1(i__),Seq_1(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'position.dat'	! Accurate positions of the stars (added July 2016)

C  Format for file interpretation

    3 format(
     +  I1,I3,A1,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,2X,A17,1X,
     +  A30)

C  Effective file loading

      open(unit=1,status='old',file=
     +'position.dat')
      write(6,*) '....Loading file: position.dat'
      do i__=1,381
        read(1,'(A79)')ar__2
        read(ar__2,3)
     +  m_Seq_2(i__),Seq_2(i__),f_Sname(i__),RAh_1(i__),RAm_1(i__),
     +  RAs(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),DEs(i__),Sname(i__),
     +  Name2(i__)
        if(ar__2(1:1) .EQ. '') m_Seq_2(i__) = iNULL__
        if(ar__2(7:8) .EQ. '') RAh_1(i__) = iNULL__
        if(ar__2(10:11) .EQ. '') RAm_1(i__) = iNULL__
        if(ar__2(13:17) .EQ. '') RAs(i__) = rNULL__
        if(ar__2(20:21) .EQ. '') DEd_1(i__) = iNULL__
        if(ar__2(23:24) .EQ. '') DEm_1(i__) = iNULL__
        if(ar__2(26:29) .EQ. '') DEs(i__) = rNULL__
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = 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(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  m_Seq_2(i__),Seq_2(i__),f_Sname(i__),RAh_1(i__),RAm_1(i__),
     +  RAs(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),DEs(i__),Sname(i__),
     +  Name2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Remarks about star identifications in the course
*                             of position retrieval (added in July 2016)

C  Format for file interpretation

    4 format(I1,I3,1X,A209)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,44
        read(1,'(A214)')ar__3
        read(ar__3,4)m_Seq_3(i__),Seq_3(i__),Text_1(i__)
        if(ar__3(1:1) .EQ. '') m_Seq_3(i__) = iNULL__
c    ..............Just test output...........
        write(6,4)m_Seq_3(i__),Seq_3(i__),Text_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end