CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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 2024-Apr-23
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/112/257            CCD Survey of Galaxies IV             (Gavazzi+, 1995)
*================================================================================
*A CCD Survey of Galaxies. IV: Observations with the 2.1m Telescope
*at San Pedro Martir
*       Gavazzi G., Boselli A., Carrasco L.
*      <Astron. Astrophys. Suppl. Ser. 112, 257 (1995)>
*      =1995A&AS..112..257G      (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1'	! Target galaxies

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

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

      character*7   CGCG        ! Zwicky name
      integer*4     NGC_IC      ! []? NGC name
      integer*4     UGC         ! []? UGC name
      integer*4     RAh         ! (h) Right ascension (1950)
      integer*4     RAm         ! (min) Right ascension (1950)
      real*4        RAs         ! (s) Right ascension (1950)
      integer*4     DEd         ! (deg) Declination (1950)
      integer*4     DEm         ! (arcmin) Declination (1950)
      real*4        DEs         ! (arcsec) Declination (1950)
      character*3   MType       ! Morphological type
      character*7   Cluster     ! Cluster membership (cluster name)
      real*4        Pmag        ! (mag) CGCG photographic magnitude
      real*4        MajDiam     ! (arcmin) Major diameter
      real*4        MinDiam     ! (arcmin) Minor diameter
      integer*4     RVel        ! (km/s) []? Heliocentric velocity

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

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

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

      character*8   CGCG_1      ! Zwicky name
      character*1   Filt        ! [BV] Filter
      integer*4     Exp         ! (min) Exposure time
      character*5   Date        ! Date and telescope
      character*1   n_Date      ! [*p] Quality of the night: when 'p'
*                                      photometric; when '*' non photometric.
      real*4        Seeing      ! (arcsec) []? Seeing
      real*4        Sky         ! (mag/arcsec2) []? Sky surface brightness
      integer*4     PA          ! (deg) []? Position angle
      real*4        Ell         ! []? Ellipticity
      real*4        Diam        ! (arcmin) Diameter
      character*1   n_Diam      ! [*] When '*' at the 24 mag/arcsec2
*                                      isophote; otherwise at the 25 mag/arcsec2
*                                      isophote
      real*4        Mag         ! (mag) Integrated magnitude
      character*1   n_Mag       ! When '*' at the 24 mag/arcsec2 isophote;
*                                      otherwise at the 25 mag/ arcsec2 isophote

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

C  Loading file 'table1'	! Target galaxies

C  Format for file interpretation

    1 format(
     +  1X,A7,2X,I4,1X,I5,1X,I2,1X,I2,1X,F5.2,1X,I2,1X,I2,1X,F4.1,1X,
     +  A3,1X,A7,1X,F4.1,2X,F4.2,2X,F4.2,1X,I6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1')
      write(6,*) '....Loading file: table1'
      do i__=1,111
        read(1,'(A79)')ar__
        read(ar__,1)
     +  CGCG,NGC_IC,UGC,RAh,RAm,RAs,DEd,DEm,DEs,MType,Cluster,Pmag,
     +  MajDiam,MinDiam,RVel
        if(ar__(11:14) .EQ. '') NGC_IC = iNULL__
        if(ar__(16:20) .EQ. '') UGC = iNULL__
        if(ar__(74:79) .EQ. '') RVel = 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(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
c    ..............Just test output...........
        write(6,1)
     +  CGCG,NGC_IC,UGC,RAh,RAm,RAs,DEd,DEm,DEs,MType,Cluster,Pmag,
     +  MajDiam,MinDiam,RVel
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
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(
     +  A8,2X,A1,2X,I2,1X,A5,1X,A1,2X,F3.1,2X,F4.1,2X,I3,2X,F4.2,2X,
     +  F5.1,A1,1X,F5.2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2')
      write(6,*) '....Loading file: table2'
      do i__=1,185
        read(1,'(A60)')ar__1
        read(ar__1,2)
     +  CGCG_1,Filt,Exp,Date,n_Date,Seeing,Sky,PA,Ell,Diam,n_Diam,Mag,
     +  n_Mag
        if(ar__1(26:28) .EQ. '') Seeing = rNULL__
        if(ar__1(31:34) .EQ. '') Sky = rNULL__
        if(ar__1(37:39) .EQ. '') PA = iNULL__
        if(ar__1(42:45) .EQ. '') Ell = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  CGCG_1,Filt,Exp,Date,n_Date,Seeing,Sky,PA,Ell,Diam,n_Diam,Mag,
     +  n_Mag
c    .......End.of.Just test output...........
      end do
      close(1)

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