FORTRAN Generation
(/./ftp/cats/II/122B)

Conversion of standardized ReadMe file for file /./ftp/cats/II/122B 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 2017-Nov-21
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/122B             UBV Photoelectric Catalog: data 1953-1985  (Mermilliod 1987)
*================================================================================
*UBV Photoelectric Photometry Catalogue (1986): I. The Original data
*     Mermilliod J.C.
*    <Astron. Astrophys. Suppl. Ser. 71, 413 (1987)>
*    =1987A&AS...71..413M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'ubv.dat'	! Measurements in Johnson UBV system

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

      integer*8     LID         ! Code number (see details in file "codes.txt")
      character*1   Rem         ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var         ! [V] Remark on variability
      real*4        Vmag        ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V         ! (mag) ? B-V colour index
      real*4        U_B         ! (mag) ? U-B colour index
      character*1   n_UBV       ! [S/*] Flag on the number of measurements:
*                                  S = Standard star
*                                  / = Number is unknown
*                                  * = a minimum number of measurements is given
      integer*4     o_UBV       ! ? Number of measurements
      integer*4     r_UBV       ! Reference key (>2000 for non-Johnson filters,
*                                  see file refs)
*Note (1): the components are indicated by an extra digit;
*     "D" stands for double
*     "Q" for obvious misidentifications (two incompatible measurements
*         of the same star in the same paper)
*     "S" to "U" designates supplementary stars (example in Praesepe,
*         KW 250 and KW 250s both exist)

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

C  Declarations for 'ubva.dat'	! *Measurements in closely related UBV filters

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

      integer*8     LID_1       ! Code number (see details in file "codes.txt")
      character*1   Rem_1       ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var_1       ! [V] Remark on variability
      real*4        Vmag_1      ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V_1       ! (mag) ? B-V colour index
      real*4        U_B_1       ! (mag) ? U-B colour index
      character*1   n_UBV_1     ! [S/*] Flag on the number of measurements:
*                                  S = Standard star
*                                  / = Number is unknown
*                                  * = a minimum number of measurements is given
      integer*4     o_UBV_1     ! ? Number of measurements
      integer*4     r_UBV_1     ! Reference key (>2000 for non-Johnson filters,
*                                  see file refs)
*Note (1): the components are indicated by an extra digit;
*     "D" stands for double
*     "Q" for obvious misidentifications (two incompatible measurements
*         of the same star in the same paper)
*     "S" to "U" designates supplementary stars (example in Praesepe,
*         KW 250 and KW 250s both exist)

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

C  Declarations for 'merged.dat'	! Merged data from ubv and ubva

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

      integer*8     LID_2       ! Code number (see details in file "codes.txt")
      character*1   Rem_2       ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var_2       ! [V] Remark on variability
      real*4        Vmag_2      ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V_2       ! (mag) ? B-V colour index
      real*4        U_B_2       ! (mag) ? U-B colour index
      character*1   n_UBV_2     ! [S/*] Flag on the number of measurements:
*                                  S = Standard star
*                                  / = Number is unknown
*                                  * = a minimum number of measurements is given
      integer*4     o_UBV_2     ! ? Number of measurements
      integer*4     r_UBV_2     ! Reference key (>2000 for non-Johnson filters,
*                                  see file refs)
*Note (1): the components are indicated by an extra digit;
*     "D" stands for double
*     "Q" for obvious misidentifications (two incompatible measurements
*         of the same star in the same paper)
*     "S" to "U" designates supplementary stars (example in Praesepe,
*         KW 250 and KW 250s both exist)

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

C  Declarations for 'refs.dat'	! References ordered by Number

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

      integer*4     Ref         ! [1/73005] Reference number,
*                                        repeated for a continuation record (1)
      character*72  Text        ! Full reference
*Note (1): the first two digits of the reference number is related to
*    the used UBV system:
*    02xxx   BV from Cape UcBV system (Nicolet 1975; Catalogue II/27)
*    14xxx   UBV(E) data from Eggen
*    37xxx   UBViyz, Jennens and Helfer (1975)
*    08xxx   UBV(RI), Johnson standards (Johnson and Morgan 1953) (*)
*    68XXX   UBV(RI), Kunkel and Rydgren (1979) (*)
*    72XXX   UBV(RI), Moffet and Barnes (1979) (*)
*    73XXX   UBV(RI), Neckel and Chini (1980) (*)
*    (*)     Various UBVRI systems, see Lanz 1986; Catalogue II/116

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

C  Declarations for 'dubious.dat'	! Stars showing significant differences in UBV
                                   but not known to be variable

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

      integer*8     LID_3       ! Code number (see details in file "codes.txt")
      character*1   Rem_3       ! [1-8DQSTU] Duplicity as in file "ubv"
      real*4        Vmag_3      ! (mag) ? V magnitude
      real*4        B_V_3       ! (mag) ? B-V color
      real*4        U_B_3       ! (mag) ? U-B color
      character*1   n_UBV_3     ! [S/*] Flag on the number of measurements,
*                                       as in file "ubv"
      integer*4     o_UBV_3     ! ? Number of measurements
      integer*4     r_UBV_3     ! ? Reference key (>2000 for non-Johnson filters,
*                                   see file refs)
      character*1   f_UBV       ! [*] '*' indicates a known error
      character*32  Comment     ! Comment on inconsistency

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

C  Loading file 'ubv.dat'	! Measurements in Johnson UBV system

C  Format for file interpretation

    1 format(1X,I10,A1,A1,1X,F6.3,1X,F6.3,1X,F6.3,2X,A1,I3,3X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ubv.dat')
      write(6,*) '....Loading file: ubv.dat'
      do i__=1,109293
        read(1,'(A48)')ar__
        read(ar__,1)LID,Rem,Var,Vmag,B_V,U_B,n_UBV,o_UBV,r_UBV
        if(ar__(15:20) .EQ. '') Vmag = rNULL__
        if(ar__(22:27) .EQ. '') B_V = rNULL__
        if(ar__(29:34) .EQ. '') U_B = rNULL__
        if(ar__(38:40) .EQ. '') o_UBV = iNULL__
c    ..............Just test output...........
        write(6,1)LID,Rem,Var,Vmag,B_V,U_B,n_UBV,o_UBV,r_UBV
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'ubva.dat'	! *Measurements in closely related UBV filters

C  Format for file interpretation

    2 format(1X,I10,A1,A1,1X,F6.3,1X,F6.3,1X,F6.3,2X,A1,I3,3X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ubva.dat')
      write(6,*) '....Loading file: ubva.dat'
      do i__=1,27425
        read(1,'(A48)')ar__1
        read(ar__1,2)
     +  LID_1,Rem_1,Var_1,Vmag_1,B_V_1,U_B_1,n_UBV_1,o_UBV_1,r_UBV_1
        if(ar__1(15:20) .EQ. '') Vmag_1 = rNULL__
        if(ar__1(22:27) .EQ. '') B_V_1 = rNULL__
        if(ar__1(29:34) .EQ. '') U_B_1 = rNULL__
        if(ar__1(38:40) .EQ. '') o_UBV_1 = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  LID_1,Rem_1,Var_1,Vmag_1,B_V_1,U_B_1,n_UBV_1,o_UBV_1,r_UBV_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'merged.dat'	! Merged data from ubv and ubva

C  Format for file interpretation

    3 format(1X,I10,A1,A1,1X,F6.3,1X,F6.3,1X,F6.3,2X,A1,I3,3X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'merged.dat')
      write(6,*) '....Loading file: merged.dat'
      do i__=1,136717
        read(1,'(A48)')ar__2
        read(ar__2,3)
     +  LID_2,Rem_2,Var_2,Vmag_2,B_V_2,U_B_2,n_UBV_2,o_UBV_2,r_UBV_2
        if(ar__2(15:20) .EQ. '') Vmag_2 = rNULL__
        if(ar__2(22:27) .EQ. '') B_V_2 = rNULL__
        if(ar__2(29:34) .EQ. '') U_B_2 = rNULL__
        if(ar__2(38:40) .EQ. '') o_UBV_2 = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  LID_2,Rem_2,Var_2,Vmag_2,B_V_2,U_B_2,n_UBV_2,o_UBV_2,r_UBV_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References ordered by Number

C  Format for file interpretation

    4 format(I5,3X,A72)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,4986
        read(1,'(A80)')ar__3
        read(ar__3,4)Ref,Text
c    ..............Just test output...........
        write(6,4)Ref,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'dubious.dat'	! Stars showing significant differences in UBV
*                                   but not known to be variable

C  Format for file interpretation

    5 format(
     +  1X,I10,A1,1X,F6.3,1X,F6.3,1X,F6.3,1X,A1,I3,2X,I5,1X,A1,1X,A32)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dubious.dat')
      write(6,*) '....Loading file: dubious.dat'
      do i__=1,3700
        read(1,'(A80)')ar__4
        read(ar__4,5)
     +  LID_3,Rem_3,Vmag_3,B_V_3,U_B_3,n_UBV_3,o_UBV_3,r_UBV_3,f_UBV,
     +  Comment
        if(ar__4(14:19) .EQ. '') Vmag_3 = rNULL__
        if(ar__4(21:26) .EQ. '') B_V_3 = rNULL__
        if(ar__4(28:33) .EQ. '') U_B_3 = rNULL__
        if(ar__4(36:38) .EQ. '') o_UBV_3 = iNULL__
        if(ar__4(41:45) .EQ. '') r_UBV_3 = iNULL__
c    ..............Just test output...........
        write(6,5)
     +  LID_3,Rem_3,Vmag_3,B_V_3,U_B_3,n_UBV_3,o_UBV_3,r_UBV_3,f_UBV,
     +  Comment
c    .......End.of.Just test output...........
      end do
      close(1)

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