FORTRAN Generation
(/./ftp/cats/VII/116)

Conversion of standardized ReadMe file for file /./ftp/cats/VII/116 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 2024-Mar-29
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/116     Southern Galaxy Catalogue  (SGC)     (Corwin+ 1985)
*================================================================================
*Southern Galaxy Catalogue
*     Corwin, H.G., de Vaucouleurs, A., de Vaucouleurs, G.
*    <The University of Texas Monographs in Astronomy No.4,
*     The Department of Astronomy, University of Texas at Austin (1985)>
*    =1985MAUTx...4....1C           (Simbad/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! Southern Galaxy Catalogue

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

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

      integer*4     RAh        (nr__) ! (h) Right ascension (hours)   (B1950)
      integer*4     RAm        (nr__) ! (min) Right ascension (minutes)
      integer*4     RAs        (nr__) ! (s) Right ascension (seconds)
      character*1   DE_        (nr__) ! [-] declination sign
      integer*4     DEd        (nr__) ! (deg) declination (degrees)     (B1950)
      real*4        DEm        (nr__) ! (arcmin) declination (minutes)
      integer*4     RA2000h    (nr__) ! (h) right ascension (hours)   (J2000)
      integer*4     RA2000m    (nr__) ! (min) right ascension (minutes)
      integer*4     RA2000s    (nr__) ! (s) right ascension (seconds)
      character*1   DE2000_    (nr__) ! [-] declination sign
      integer*4     DE2000d    (nr__) ! (deg) declination (degrees)     (J2000)
      real*4        DE2000m    (nr__) ! (arcmin) declination (minutes)
      real*4        GLON       (nr__) ! (deg) galactic longitude l^II^
      real*4        GLAT       (nr__) ! (deg) galactic latitude b^II^
      character*13  RC2        (nr__) ! [ A-Zab0-9?+=-] RC2 name
      character*9   EU         (nr__) ! [ IGSCPNAE0-9?-]! ESO/Uppsala name
      character*1   n_EU       (nr__) ! [r] 'r' denotes that a remark is given in
*                                     "docu.txt" file
      character*7   MType      (nr__) ! Morphological type
      real*4        T          (nr__) ! ? weighted mean numerical type (1)
      integer*4     o_T        (nr__) ! ? number of estimates of T, n(T)
      real*4        w_T        (nr__) ! [0,]? Total internal weight of T, w(T)
      real*4        L          (nr__) ! ? weighted mean luminosity class (1)
      integer*4     o_L        (nr__) ! ? number of estimates of L, n(L)
      real*4        w_L        (nr__) ! [0,]? total internal weight of L, w(L)
      real*4        logD       (nr__) ! ([0.1arcmin]) ? weighted mean logarithm of the outer
*                                      diameter D along the major axis (1)
      real*4        w_logD     (nr__) ! [0,]? total internal weight of log(D)
      real*4        logR       (nr__) ! ([---]) ? weighted mean log. of the axis ratio
*                                     R=D/d, where d is the diameter along the
*                                     minor axis (1)
      real*4        w_logR     (nr__) ! [0,]? weight of R, w(R)
      integer*4     o_logR     (nr__) ! ? number of independent estimates of R
*Note (1): For detail, see "docu.txt" file.

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

C  Declarations for 'notes.dat'	! notes for the catalogue

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

      character*12  GN         (nr__1) ! galaxy name (neither RC2 nor ESO-Uppsala)
      integer*4     J          (nr__1) ! ? plate number
      character*1   n_J        (nr__1) ! [r] 'r' denotes that a remark is given in
*                                  "docu.txt" file
      character*62  NOTE       (nr__1) ! notes for the galaxy (for abbreviations used,
*                                  see the "docu.txt" file)

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

C  Loading file 'catalog.dat'	! Southern Galaxy Catalogue

C  Format for file interpretation

    1 format(
     +  I2,1X,I2,1X,I2,1X,A1,I2,1X,F4.1,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,
     +  F4.1,1X,F6.2,1X,F6.2,1X,A13,1X,A9,A1,1X,A7,1X,F4.1,1X,I1,1X,
     +  F4.2,F4.1,1X,I1,1X,F3.1,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,5472
        read(1,'(A126)')ar__
        read(ar__,1)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  RA2000h(i__),RA2000m(i__),RA2000s(i__),DE2000_(i__),
     +  DE2000d(i__),DE2000m(i__),GLON(i__),GLAT(i__),RC2(i__),
     +  EU(i__),n_EU(i__),MType(i__),T(i__),o_T(i__),w_T(i__),L(i__),
     +  o_L(i__),w_L(i__),logD(i__),w_logD(i__),logR(i__),w_logR(i__),
     +  o_logR(i__)
        if(ar__(84:87) .EQ. '') T(i__) = rNULL__
        if(ar__(89:89) .EQ. '') o_T(i__) = iNULL__
        if(ar__(91:94) .EQ. '') w_T(i__) = rNULL__
        if(ar__(95:98) .EQ. '') L(i__) = rNULL__
        if(ar__(100:100) .EQ. '') o_L(i__) = iNULL__
        if(ar__(102:104) .EQ. '') w_L(i__) = rNULL__
        if(ar__(106:109) .EQ. '') logD(i__) = rNULL__
        if(ar__(111:114) .EQ. '') w_logD(i__) = rNULL__
        if(ar__(116:119) .EQ. '') logR(i__) = rNULL__
        if(ar__(121:124) .EQ. '') w_logR(i__) = rNULL__
        if(ar__(126:126) .EQ. '') o_logR(i__) = iNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  RA2000h(i__),RA2000m(i__),RA2000s(i__),DE2000_(i__),
     +  DE2000d(i__),DE2000m(i__),GLON(i__),GLAT(i__),RC2(i__),
     +  EU(i__),n_EU(i__),MType(i__),T(i__),o_T(i__),w_T(i__),L(i__),
     +  o_L(i__),w_L(i__),logD(i__),w_logD(i__),logR(i__),w_logR(i__),
     +  o_logR(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! notes for the catalogue

C  Format for file interpretation

    2 format(A12,I4,A1,1X,A62)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,8172
        read(1,'(A80)')ar__1
        read(ar__1,2)GN(i__),J(i__),n_J(i__),NOTE(i__)
        if(ar__1(13:16) .EQ. '') J(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)GN(i__),J(i__),n_J(i__),NOTE(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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