FORTRAN Generation
(/./ftp/cats/VII/26D)

Conversion of standardized ReadMe file for file /./ftp/cats/VII/26D 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 2020-Aug-04
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. VII/26D     Uppsala General Catalogue of Galaxies (UGC)     (Nilson 1973)
*================================================================================
*Uppsala General Catalogue of Galaxies (UGC)
*     Nilson P.
*     <Uppsala Astron. Obs. Ann. 6 (1973)>
*     =1973UGC...C......0N         (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! UGC catalogue

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

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

      integer*4     UGC         ! [1/12921]+= UGC number
      character*1   A           ! [A] "A" if the galaxy is from the Addenda
*                                      list of the published catalogue;
*                                      otherwise blank.
      integer*4     RAh         ! (h) Right Ascension 1950 (hours)
      real*4        RAm         ! (min) Right Ascension 1950 (minutes)
      character*1   DE_         ! Declination 1950 (sign)
      integer*4     DEd         ! (deg) Declination 1950 (degrees)
      integer*4     DEm         ! (arcmin) Declination 1950 (minutes)
      character*13  MCG         ! MCG designation (1)
      integer*4     POSS        ! Number of the POSS field in which the
*                                     galaxy is best visible.
      real*4        MajAxis     ! (arcmin) ? Major axis of the galaxy as measured on
*                                     the POSS blue print. (2)
      real*4        MinAxis     ! (arcmin) ? Minor axis of the galaxy as measured on
*                                     the POSS blue print. (2)
      integer*4     PA          ! (deg) [0/180[? Position angle measured in the
*                                     conventional manner from North through
*                                     East. (3)
      character*7   Hubble      ! Classification in the Hubble system or
*                                     remarks, in a free field format,
*                                     including lower case designations.
      real*4        Pmag        ! (mag) ? Photographic magnitude mpg , recorded to
*                                     precision given in published catalogue;
*                                     i.e., if tenths not reported, byte 64 is
*                                     blank.
      integer*4     RadVel      ! (km/s) ? Radial velocity corrected for Solar
*                                     motion (4)
      real*4        aR          ! (arcmin) ? Major axis of the galaxy as measured on
*                                     the POSS red print. (2)
      real*4        bR          ! (arcmin) ? Minor axis of the galaxy as measured on
*                                     the POSS red print. (2)
      integer*4     i           ! [0/7]? Inclination to the line of sight for
*                                     spirals (5)
*Note (1): The Morphological Catalogue of Galaxies (MCG) 
*    (Vorontsov-Velyaminov et al. 1962, 1963, 1964, 1968). The first number
*    of the designation is the Palomar Observatory Sky Survey (POSS) 6deg
*    zone, from the equator +00 to the north celestial pole +15; the second
*    number is the POSS field along the zone, while the third number is the
*    galaxy in this field in the MCG. Non-MCG galaxies are assigned the
*    number 000 in the third position, but the first and second values are
*    given correctly.
*Note (2): The precision to which diameters are recorded matches the
*    published catalogue; additional decimal places are blank, but colons,
*    brackets and parentheses are not included in the computerized
*    catalogue.
*Note (3): Colons, parentheses and brackets in the published catalogue
*    are not included here. Blank if data not present.
*Note (4): Radial Velocity is relative to the Local Group according to
*    V0 = 300 cos A, where A is the distance to the conventional Solar
*    apex at lI=55deg, bI=0deg or lII = 87deg bII = +1deg. If the
*    uncertainties in the measurements were considered too large to make
*    corrections meaningful, usually only the uncorrected value is given.
*    See also other values in <VII/36>
*Note (5): Inclination measured on a scale from 1 (face-on) to 7 (edge-on).
*    For galaxies of high inclination, a value is calculated from the
*    Hubble formula n - 10(a-b)/a [a - major axis, b - minor axis]. The
*    value 7 denotes objects inclined not more than a few degrees to the
*    line of sight.

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

C  Declarations for 'errors.dat'	! The changes made by the ADC in 1995

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

      integer*4     UGC_1       ! Number of entry
      character*1   A_1         ! [A] Suffix for entry number
      character*3   field       ! Field in error
      character*10  old         ! Old entry
      character*21  new         ! New entry and comments

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

C  Loading file 'catalog.dat'	! UGC catalogue

C  Format for file interpretation

    1 format(
     +  4X,I5,A1,I2,F4.1,A1,I2,I2,A13,I4,F6.2,F5.2,I3,A7,1X,F4.1,I5,
     +  F6.2,F5.2,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,12939
        read(1,'(A81)')ar__
        read(ar__,1)
     +  UGC,A,RAh,RAm,DE_,DEd,DEm,MCG,POSS,MajAxis,MinAxis,PA,Hubble,
     +  Pmag,RadVel,aR,bR,i
        if(ar__(39:44) .EQ. '') MajAxis = rNULL__
        if(ar__(45:49) .EQ. '') MinAxis = rNULL__
        if(ar__(50:52) .EQ. '') PA = iNULL__
        if(ar__(61:64) .EQ. '') Pmag = rNULL__
        if(ar__(65:69) .EQ. '') RadVel = iNULL__
        if(ar__(70:75) .EQ. '') aR = rNULL__
        if(ar__(76:80) .EQ. '') bR = rNULL__
        if(ar__(81:81) .EQ. '') i = 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(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)
     +  UGC,A,RAh,RAm,DE_,DEd,DEm,MCG,POSS,MajAxis,MinAxis,PA,Hubble,
     +  Pmag,RadVel,aR,bR,i
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'errors.dat'	! The changes made by the ADC in 1995

C  Format for file interpretation

    2 format(I5,A1,A3,1X,A10,1X,A21)

C  Effective file loading

      open(unit=1,status='old',file=
     +'errors.dat')
      write(6,*) '....Loading file: errors.dat'
      do i__=1,133
        read(1,'(A49)')ar__1
        read(ar__1,2)UGC_1,A_1,field,old,new
c    ..............Just test output...........
        write(6,2)UGC_1,A_1,field,old,new
c    .......End.of.Just test output...........
      end do
      close(1)

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