FORTRAN Generation
(/./ftp/cats/II/164)

Conversion of standardized ReadMe file for file /./ftp/cats/II/164 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-22
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*t  iNuLL^_
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. II/164              DDO Photoelectric Photometric Catalog   (Mermilliod+ 1989)
*================================================================================
*Catalogue of DDO Photometry 88
*     Mermilliod J.C., Nitschelm C.
*    <Astron. Astrophys. Suppl. Ser. 81, 401 (1989)>
*    =1989A&AS...81..401M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'mean.dat'	! Catalog of homogeneous data

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

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

      character*10  LID         ! Lausanne identification code (G1)
      character*1   m_LID       ! [D1239] Remarks on duplicity and variability
      character*1   f_LID       ! [V] Variability flag
      integer*4     HR          ! ? Number in the Bright Star Catalog <V/50>
      integer*4     HD          ! ? Number in Henry Draper Catalog <III/115>
      character*9   DM          ! Durchmusterung designation (BD, CD, CPD)
      character*12  Oname       ! Other designation
      integer*4     RAh         ! (h) ? Right Ascension B1950 (hours)
      integer*4     RAm         ! (min) ? Right Ascension B1950 (minutes)
      integer*4     RAs         ! (s) ? Right Ascension B1950 (seconds)
      character*1   DE_         ! Declination B1950 (sign)
      integer*4     DEd         ! (deg) ? Declination B1950 (degrees)
      real*4        DEm         ! (arcmin) ? Declination B1950 (minutes)
      real*4        m48         ! (mag) ? Magnitude in the filter 48 of DDO system
      real*4        C_48_51     ! (mag) ? Colour index in DDO system
      real*4        C_45_48     ! (mag) ? Colour index in DDO system
      real*4        C_42_45     ! (mag) ? Colour index in DDO system
      real*4        C_41_42     ! (mag) ? Colour index in DDO system
      real*4        C_38_41     ! (mag) ? Colour index in DDO system
      real*4        C_35_38     ! (mag) ? Colour index in DDO system
      character*1   l_Nobs      ! [>S] Limit flag on Nobs, or 'S' for standard
      integer*4     Nobs        ! ? Number of measurements (blank for standard)

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

C  Declarations for 'obs.dat'	! Catalog of individual observations

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

      character*10  LID_1       ! Lausanne identification code (G1)
      character*1   m_LID_1     ! [D1239] Remarks on duplicity
      character*1   f_LID_1     ! [V] Variability flag
      real*4        m48_1       ! (mag) ? Magnitude in the filter 48 of DDO system
      real*4        C_48_51_1   ! (mag) ? Colour index in DDO system
      real*4        C_45_48_1   ! (mag) ? Colour index in DDO system
      real*4        C_42_45_1   ! (mag) ? Colour index in DDO system
      real*4        C_41_42_1   ! (mag) ? Colour index in DDO system
      real*4        C_38_41_1   ! (mag) ? Colour index in DDO system
      real*4        C_35_38_1   ! (mag) ? Colour index in DDO system
      character*1   l_Nobs_1    ! [>S*] Limit flag on Nobs, 'S' for standard
*                                        '*' for an estimated number
      integer*4     Nobs_1      ! ? Number of measurements (blank for standard)
      integer*4     r_m48       ! Reference of the observation in "refs.dat"

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

C  Declarations for 'refs.dat'	! References (contains 76 empty lines)

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

      integer*4     Ref         ! [12001/12081] Reference number
      character*72  Text        ! Text of reference (includes the bibcode)

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

C  Loading file 'mean.dat'	! Catalog of homogeneous data

C  Format for file interpretation

    1 format(
     +  1X,A10,A1,A1,1X,I4,1X,I6,1X,A9,1X,A12,I2,1X,I2,1X,I2,1X,A1,I2,
     +  1X,F4.1,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,
     +  F6.3,4X,A1,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'mean.dat')
      write(6,*) '....Loading file: mean.dat'
      do i__=1,6139
        read(1,'(A122)')ar__
        read(ar__,1)
     +  LID,m_LID,f_LID,HR,HD,DM,Oname,RAh,RAm,RAs,DE_,DEd,DEm,m48,
     +  C_48_51,C_45_48,C_42_45,C_41_42,C_38_41,C_35_38,l_Nobs,Nobs
        if(ar__(15:18) .EQ. '') HR = iNULL__
        if(ar__(20:25) .EQ. '') HD = iNULL__
        if(ar__(49:50) .EQ. '') RAh = iNULL__
        if(ar__(52:53) .EQ. '') RAm = iNULL__
        if(ar__(55:56) .EQ. '') RAs = iNULL__
        if(ar__(59:60) .EQ. '') DEd = iNULL__
        if(ar__(62:65) .EQ. '') DEm = rNULL__
        if(ar__(67:72) .EQ. '') m48 = rNULL__
        if(ar__(74:79) .EQ. '') C_48_51 = rNULL__
        if(ar__(81:86) .EQ. '') C_45_48 = rNULL__
        if(ar__(88:93) .EQ. '') C_42_45 = rNULL__
        if(ar__(95:100) .EQ. '') C_41_42 = rNULL__
        if(ar__(102:107) .EQ. '') C_38_41 = rNULL__
        if(ar__(109:114) .EQ. '') C_35_38 = rNULL__
        if(ar__(121:122) .EQ. '') Nobs = 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(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  LID,m_LID,f_LID,HR,HD,DM,Oname,RAh,RAm,RAs,DE_,DEd,DEm,m48,
     +  C_48_51,C_45_48,C_42_45,C_41_42,C_38_41,C_35_38,l_Nobs,Nobs
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'obs.dat'	! Catalog of individual observations

C  Format for file interpretation

    2 format(
     +  1X,A10,A1,A1,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,4X,A1,1X,I2,5X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'obs.dat')
      write(6,*) '....Loading file: obs.dat'
      do i__=1,8034
        read(1,'(A80)')ar__1
        read(ar__1,2)
     +  LID_1,m_LID_1,f_LID_1,m48_1,C_48_51_1,C_45_48_1,C_42_45_1,
     +  C_41_42_1,C_38_41_1,C_35_38_1,l_Nobs_1,Nobs_1,r_m48
        if(ar__1(15:20) .EQ. '') m48_1 = rNULL__
        if(ar__1(22:27) .EQ. '') C_48_51_1 = rNULL__
        if(ar__1(29:34) .EQ. '') C_45_48_1 = rNULL__
        if(ar__1(36:41) .EQ. '') C_42_45_1 = rNULL__
        if(ar__1(43:48) .EQ. '') C_41_42_1 = rNULL__
        if(ar__1(50:55) .EQ. '') C_38_41_1 = rNULL__
        if(ar__1(57:62) .EQ. '') C_35_38_1 = rNULL__
        if(ar__1(69:70) .EQ. '') Nobs_1 = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  LID_1,m_LID_1,f_LID_1,m48_1,C_48_51_1,C_45_48_1,C_42_45_1,
     +  C_41_42_1,C_38_41_1,C_35_38_1,l_Nobs_1,Nobs_1,r_m48
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References (contains 76 empty lines)

C  Format for file interpretation

    3 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,396
        read(1,'(A80)')ar__2
        read(ar__2,3)Ref,Text
c    ..............Just test output...........
        write(6,3)Ref,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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