CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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-28
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. J/A+AS/107/285      CCD survey of galaxies. III.                (Gavazzi+, 1994)
*================================================================================
*A CCD survey of galaxies. III. Observations with the Loiano 1.5m telescope
*         GAVAZZI G., RANDONE I.
*      <Astron. Astrophys. Suppl. Ser. 107, 285 (1994)>
*      =1994A&AS..107..285G      (SIMBAD/NED Reference)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1'	! Target galaxies

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

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

      character*9   CGCG       (nr__) ! CGCG denomination
      integer*4     NGC        (nr__) ! []? NGC/IC denomination
      integer*4     UGC        (nr__) ! []? UGC denomination
      integer*4     RAh        (nr__) ! (h) Right ascension (1950)
      integer*4     RAm        (nr__) ! (min) Right ascension (1950)
      real*4        RAs        (nr__) ! (s) Right ascension (1950)
      integer*4     DEd        (nr__) ! (deg) []? Declination (1950)
      integer*4     DEm        (nr__) ! (arcmin) Declination (1950)
      real*4        DEs        (nr__) ! (arcsec) Declination (1950)
      character*4   T          (nr__) ! Morphological type
      character*6   Memb       (nr__) ! Membership parameter
      real*4        m_pg       (nr__) ! (mag) []? CGCG photographic magnitude
      real*4        a          (nr__) ! (arcmin) []? Major diameter
      real*4        b          (nr__) ! (arcmin) []? Minor diameter
      integer*4     Vh         (nr__) ! (km/s) []? Heliocentric galaxy velocity

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

C  Declarations for 'table2'	! Results of the present work

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

      character*11  CGCG_1     (nr__1) ! CGCG denomination
      character*1   Filt       (nr__1) ! Filter used
      integer*4     Exp        (nr__1) ! (min) Exposure time
      character*8   Date       (nr__1) ! ("DD/MM/YY") Observing date
      character*1   PQ         (nr__1) ! Photometrical quality (1)
      real*4        Seeing     (nr__1) ! (arcsec) []? Seeing
      real*4        Sky        (nr__1) ! (mag/arcsec2) []? Sky brightness
      integer*4     PA         (nr__1) ! (deg) []? Position angle (2)
      real*4        v1_b_a     (nr__1) ! []? Ellipticity of elliptical rings
      real*4        a25        (nr__1) ! (arcsec) []? Observed radius along the major axis
*                                             determined at the 25th magnitude
*                                             isophote
      character*1   n_a25      (nr__1) ! An asterisk marks radii determined at
*                                         the 24th magnitude isophote
      real*4        m25        (nr__1) ! (mag) []? Integrated magnitude at the 25th
*                                         magnitude isophote
      character*1   n_m25      (nr__1) ! An asterisk marks magnitudes determined
*                                         at the 24th magnitude isophote
*Note (1): p means obtained during photometric conditions
*            * indicates non photometric frames which were calibrated
*            using aperture photometry available in the literature
*Note (2): P.A. measured from north counterclockwise

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

C  Loading file 'table1'	! Target galaxies

C  Format for file interpretation

    1 format(
     +  A9,1X,I4,1X,I5,1X,I2,I2,F5.2,1X,I2,I2,F4.1,1X,A4,1X,A6,1X,
     +  F4.1,2X,F3.1,2X,F3.1,1X,I5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1')
      write(6,*) '....Loading file: table1'
      do i__=1,126
        read(1,'(A72)')ar__
        read(ar__,1)
     +  CGCG(i__),NGC(i__),UGC(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DEd(i__),DEm(i__),DEs(i__),T(i__),Memb(i__),m_pg(i__),a(i__),
     +  b(i__),Vh(i__)
        if(ar__(11:14) .EQ. '') NGC(i__) = iNULL__
        if(ar__(16:20) .EQ. '') UGC(i__) = iNULL__
        if(ar__(32:33) .EQ. '') DEd(i__) = iNULL__
        if(ar__(53:56) .EQ. '') m_pg(i__) = rNULL__
        if(ar__(59:61) .EQ. '') a(i__) = rNULL__
        if(ar__(64:66) .EQ. '') b(i__) = rNULL__
        if(ar__(68:72) .EQ. '') Vh(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(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
c    ..............Just test output...........
        write(6,1)
     +  CGCG(i__),NGC(i__),UGC(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DEd(i__),DEm(i__),DEs(i__),T(i__),Memb(i__),m_pg(i__),a(i__),
     +  b(i__),Vh(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 'table2'	! Results of the present work

C  Format for file interpretation

    2 format(
     +  A11,2X,A1,3X,I2,2X,A8,3X,A1,4X,F3.1,5X,F4.1,6X,I3,5X,F4.2,4X,
     +  F5.1,A1,3X,F5.2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2')
      write(6,*) '....Loading file: table2'
      do i__=1,155
        read(1,'(A86)')ar__1
        read(ar__1,2)
     +  CGCG_1(i__),Filt(i__),Exp(i__),Date(i__),PQ(i__),Seeing(i__),
     +  Sky(i__),PA(i__),v1_b_a(i__),a25(i__),n_a25(i__),m25(i__),
     +  n_m25(i__)
        if(ar__1(38:40) .EQ. '') Seeing(i__) = rNULL__
        if(ar__1(46:49) .EQ. '') Sky(i__) = rNULL__
        if(ar__1(56:58) .EQ. '') PA(i__) = iNULL__
        if(ar__1(64:67) .EQ. '') v1_b_a(i__) = rNULL__
        if(ar__1(72:76) .EQ. '') a25(i__) = rNULL__
        if(ar__1(81:85) .EQ. '') m25(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  CGCG_1(i__),Filt(i__),Exp(i__),Date(i__),PQ(i__),Seeing(i__),
     +  Sky(i__),PA(i__),v1_b_a(i__),a25(i__),n_a25(i__),m25(i__),
     +  n_m25(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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