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

Conversion of standardized ReadMe file for file /./ftp/cats/II/158A/ 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-Sep-26
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/158A             uvby-beta Catalogue, 1989 version   (Hauck+ 1990)
*================================================================================
*uvby-beta Photoelectric Photometric Catalogue (1989 version)
*     Hauck B., Mermilliod M.
*    <Astron.Astrophys.Suppl. Ser. 86, 107 (1990)>
*    =1990A&AS...86..107H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'data'	! The uvby-beta measurements with references

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

      integer*8     LID         ! Code number (1)
      character*1   m_LID       ! [1-8DS] Remark on duplicity or
*                                        identification of components (1)
      character*1   VarFlag     ! [V] Remark on variability (1)
      real*4        Vmag        ! (mag) []? V magnitude (2)
      real*4        b_y         ! (mag) []? colour index (3)
      real*4        m1          ! (mag) []? colour index (3)
      real*4        c1          ! (mag) []? colour index (3)
      character*1   n_uvby      ! [S/*] Number of observations flag (4)
      integer*4     o_uvby      ! []? Number of measurements
      real*4        beta        ! (mag) ? Beta index (5)
      character*1   n_beta      ! [S/*] Number of observations flag (4)
      integer*4     o_beta      ! ? Number of observations in Beta index
      integer*4     RefNum      ! [1/450] Reference number (see file refs)
*Note (1): numerical designation for the star identification in the
*     Geneva coded numbering system is described by Mermilliod
*     (1978BICDS..14...32M), but an updated listing applicable
*     specifically to this catalog is given as file 'code'.
*     The number may be followed by a double-star flag (byte 12)
*     and/or a variability flag (byte 13) if applicable.
*     The flag meanings are as follows:
*     D         Measurement included >1 component of a multiple system
*     1, 2, ... Individual component of a multiple system was measured
*     V         One or more indices display slight variability
*Note (2): Magnitude in the UBV system, as reported in the source
*    reference and transformed from the measured y magnitude,
*    or possibly taken from other sources. Data precision can
*    vary within the field, since most data are reported to 0.01 mag,
*    but some are given to 0.001 mag.
*Note (3): the photometric color indices of the standard four-color
*    system, (see <GCPD/04> for a description of the Stroemgren system)
*    The m1 and c1 indices are defined as:
*        m1  =  (v - b) - (b - y)
*        c1  =  (u - v) - (v - b)
*    Data precision varies and trailing bytes may be blank if
*    the source publication reported values only to tenths or
*    hundredths of a magnitude.
*Note (4): the flag meanings are as follows:
*     blank   The number of observations reported in the source
*             reference is given
*     /       Number of observations not given in source reference
*             and is therefore recorded as 1
*     *       The number of observations reported is a minimum;
*             i.e., the actual number of observations is not given
*             in the source reference, but it is stated that at least
*             "o_" observations contributed to the published values.
*Note (5): the reddening-independent index of the standard HBeta
*     system (see <GCPD/??> for a description of the HBeta filter
*     centered on the HBeta line at 468.1 nm). The data precision varies,
*     in which case trailing bytes are blank.

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

C  Declarations for 'mean'	! The uvby-beta homogenized data

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

      integer*8     LID_1       ! Code number (see Note 1 above)
      character*1   m_LID_1     ! [1-8DS] Remark on duplicity or identification
*                                    of components (see Note 1 above)
      character*1   VarFlag_1   ! [V] Remark on variability (see Note 1 above)
      real*4        Vmag_1      ! (mag) []? V magnitude (see Note 2 above)
      real*4        b_y_1       ! (mag) []? colour index (see Note 3 above)
      real*4        m1_1        ! (mag) []? colour index (see Note 3 above)
      real*4        c1_1        ! (mag) []? colour index (see Note 3 above)
      character*1   n_uvby_1    ! [S/*] Flag on o_uvby (See Note 4 above)
      integer*4     o_uvby_1    ! []? Number of measurements
      real*4        beta_1      ! (mag) ? Beta index (See Note 5 above)
      character*1   n_beta_1    ! [S/*] Flag on o_beta (See Note 4 above)
      integer*4     o_beta_1    ! ? Number of observations in Beta index

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

C  Declarations for 'refs.dat'	! References with bibcodes

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

      integer*4     RefNum_1    ! [1/450] Reference number
      character*19  BibCode     ! 19-digit Bibliographical code
      character*64  Authors     ! First Author of the publication

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

C  Loading file 'data'	! The uvby-beta measurements with references

C  Format for file interpretation

    1 format(
     +  1X,I10,A1,A1,F6.3,2X,F6.3,2X,F6.3,2X,F6.3,1X,A1,I3,3X,F5.3,1X,
     +  A1,I3,16X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'data')
      write(6,*) '....Loading file: data'
      do i__=1,69190
        read(1,'(A80)')ar__
        read(ar__,1)
     +  LID,m_LID,VarFlag,Vmag,b_y,m1,c1,n_uvby,o_uvby,beta,n_beta,
     +  o_beta,RefNum
        if(ar__(14:19) .EQ. '') Vmag = rNULL__
        if(ar__(22:27) .EQ. '') b_y = rNULL__
        if(ar__(30:35) .EQ. '') m1 = rNULL__
        if(ar__(38:43) .EQ. '') c1 = rNULL__
        if(ar__(46:48) .EQ. '') o_uvby = iNULL__
        if(ar__(52:56) .EQ. '') beta = rNULL__
        if(ar__(59:61) .EQ. '') o_beta = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  LID,m_LID,VarFlag,Vmag,b_y,m1,c1,n_uvby,o_uvby,beta,n_beta,
     +  o_beta,RefNum
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'mean'	! The uvby-beta homogenized data

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'mean')
      write(6,*) '....Loading file: mean'
      do i__=1,44896
        read(1,'(A61)')ar__1
        read(ar__1,2)
     +  LID_1,m_LID_1,VarFlag_1,Vmag_1,b_y_1,m1_1,c1_1,n_uvby_1,
     +  o_uvby_1,beta_1,n_beta_1,o_beta_1
        if(ar__1(14:19) .EQ. '') Vmag_1 = rNULL__
        if(ar__1(22:27) .EQ. '') b_y_1 = rNULL__
        if(ar__1(30:35) .EQ. '') m1_1 = rNULL__
        if(ar__1(38:43) .EQ. '') c1_1 = rNULL__
        if(ar__1(46:48) .EQ. '') o_uvby_1 = iNULL__
        if(ar__1(52:56) .EQ. '') beta_1 = rNULL__
        if(ar__1(59:61) .EQ. '') o_beta_1 = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  LID_1,m_LID_1,VarFlag_1,Vmag_1,b_y_1,m1_1,c1_1,n_uvby_1,
     +  o_uvby_1,beta_1,n_beta_1,o_beta_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References with bibcodes

C  Format for file interpretation

    3 format(I3,1X,A19,1X,A64)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,416
        read(1,'(A88)')ar__2
        read(ar__2,3)RefNum_1,BibCode,Authors
c    ..............Just test output...........
        write(6,3)RefNum_1,BibCode,Authors
c    .......End.of.Just test output...........
      end do
      close(1)

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