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

Conversion of standardized ReadMe file for file /./ftp/cats/II/122B 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-Sep-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        (nr__) ! Code number (see details in file "codes.txt")
      character*1   Rem        (nr__) ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var        (nr__) ! [V] Remark on variability
      real*4        Vmag       (nr__) ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V        (nr__) ! (mag) ? B-V colour index
      real*4        U_B        (nr__) ! (mag) ? U-B colour index
      character*1   n_UBV      (nr__) ! [S/*] Flag on the number of measurements:
*                                  S = Standard star
*                                  / = Number is unknown
*                                  * = a minimum number of measurements is given
      integer*4     o_UBV      (nr__) ! ? Number of measurements
      integer*4     r_UBV      (nr__) ! 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      (nr__1) ! Code number (see details in file "codes.txt")
      character*1   Rem_1      (nr__1) ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var_1      (nr__1) ! [V] Remark on variability
      real*4        Vmag_1     (nr__1) ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V_1      (nr__1) ! (mag) ? B-V colour index
      real*4        U_B_1      (nr__1) ! (mag) ? U-B colour index
      character*1   n_UBV_1    (nr__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    (nr__1) ! ? Number of measurements
      integer*4     r_UBV_1    (nr__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      (nr__2) ! Code number (see details in file "codes.txt")
      character*1   Rem_2      (nr__2) ! [1-8DQSTU] Remark on duplicity or
*                                      identification of components (1)
      character*1   Var_2      (nr__2) ! [V] Remark on variability
      real*4        Vmag_2     (nr__2) ! (mag) [-1.5/21.5]? V magnitude
      real*4        B_V_2      (nr__2) ! (mag) ? B-V colour index
      real*4        U_B_2      (nr__2) ! (mag) ? U-B colour index
      character*1   n_UBV_2    (nr__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    (nr__2) ! ? Number of measurements
      integer*4     r_UBV_2    (nr__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 :50 ajdKW 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        (nr__3) ! [1/73005] Reference number,
*                                        repeated for a continuation record (1)
      character*72  Text       (nr__3) ! 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      (nr__4) ! Code number (see details in file "codes.txt")
      character*1   Rem_3      (nr__4) ! [1-8DQSTU] Duplicity as in file "ubv"
      real*4        Vmag_3     (nr__4) ! (mag) ? V magnitude
      real*4        B_V_3      (nr__4) ! (mag) ? B-V color
      real*4        U_B_3      (nr__4) ! (mag) ? U-B color
      character*1   n_UBV_3    (nr__4) ! [S/*] Flag on the number of measurements,
*                                       as in file "ubv"
      integer*4     o_UBV_3    (nr__4) ! ? Number of measurements
      integer*4     r_UBV_3    (nr__4) ! ? Reference key (>2000 for non-Johnson filters,
*                                   see file refs)
      character*1   f_UBV      (nr__4) ! [*] '*' indicates a known error
      character*32  Comment    (nr__4) ! 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(i__),Rem(i__),Var(i__),Vmag(i__),B_V(i__),U_B(i__),
     +  n_UBV(i__),o_UBV(i__),r_UBV(i__)
        if(ar__(15:20) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(22:27) .EQ. '') B_V(i__) = rNULL__
        if(ar__(29:34) .EQ. '') U_B(i__) = rNULL__
        if(ar__(38:40) .EQ. '') o_UBV(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  LID(i__),Rem(i__),Var(i__),Vmag(i__),B_V(i__),U_B(i__),
     +  n_UBV(i__),o_UBV(i__),r_UBV(i__)
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(i__),Rem_1(i__),Var_1(i__),Vmag_1(i__),B_V_1(i__),
     +  U_B_1(i__),n_UBV_1(i__),o_UBV_1(i__),r_UBV_1(i__)
        if(ar__1(15:20) .EQ. '') Vmag_1(i__) = rNULL__
        if(ar__1(22:27) .EQ. '') B_V_1(i__) = rNULL__
        if(ar__1(29:34) .EQ. '') U_B_1(i__) = rNULL__
        if(ar__1(38:40) .EQ. '') o_UBV_1(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  LID_1(i__),Rem_1(i__),Var_1(i__),Vmag_1(i__),B_V_1(i__),
     +  U_B_1(i__),n_UBV_1(i__),o_UBV_1(i__),r_UBV_1(i__)
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(i__),Rem_2(i__),Var_2(i__),Vmag_2(i__),B_V_2(i__),
     +  U_B_2(i__),n_UBV_2(i__),o_UBV_2(i__),r_UBV_2(i__)
        if(ar__2(15:20) .EQ. '') Vmag_2(i__) = rNULL__
        if(ar__2(22:27) .EQ. '') B_V_2(i__) = rNULL__
        if(ar__2(29:34) .EQ. '') U_B_2(i__) = rNULL__
        if(ar__2(38:40) .EQ. '') o_UBV_2(i__) = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  LID_2(i__),Rem_2(i__),Var_2(i__),Vmag_2(i__),B_V_2(i__),
     +  U_B_2(i__),n_UBV_2(i__),o_UBV_2(i__),r_UBV_2(i__)
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(i__),Text(i__)
c    ..............Just test output...........
        write(6,4)Ref(i__),Text(i__)
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(i__),Rem_3(i__),Vmag_3(i__),B_V_3(i__),U_B_3(i__),
     +  n_UBV_3(i__),o_UBV_3(i__),r_UBV_3(i__),f_UBV(i__),Comment(i__)
        if(ar__4(14:19) .EQ. '') Vmag_3(i__) = rNULL__
        if(ar__4(21:26) .EQ. '') B_V_3(i__) = rNULL__
        if(ar__4(28:33) .EQ. '') U_B_3(i__) = rNULL__
        if(ar__4(36:38) .EQ. '') o_UBV_3(i__) = iNULL__
        if(ar__4(41:45) .EQ. '') r_UBV_3(i__) = iNULL__
c    ..............Just test output...........
        write(6,5)
     +  LID_3(i__),Rem_3(i__),Vmag_3(i__),B_V_3(i__),U_B_3(i__),
     +  n_UBV_3(i__),o_UBV_3(i__),r_UBV_3(i__),f_UBV(i__),Comment(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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