FORTRAN Generation
(/./ftp/cats/J/A_A/540/A106)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/540/A106 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-21
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+A/540/A106      SDSS-DR8 groups and clusters of galaxies   (Tempel+, 2012)
*================================================================================
*Groups and clusters of galaxies in the SDSS DR8. Value-added catalogues.
*    Tempel E., Tago E., Liivamagi L.J.
*   <Astron. Astrophys. 540, A106 (2012)>
*   =2012A&A...540A.106T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'dr8gal.dat'	! Galaxy parameters

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     ID          ! Unique identification number for galaxies
      integer*4     IDcl        ! [1/388773] Group/cluster ID number (1)
      integer*4     Ngal        ! [1/878] Richness of group the galaxy
*                                            belongs to
      real*8        z           ! Redshift, corrected to CMB rest frame
      real*8        Dist        ! (Mpc) Co-moving distance of a galaxy (G1)
      real*8        Dist_c      ! (Mpc) Co-moving distance of the group centre (G1)
      real*8        RAdeg       ! (deg) Right ascension of galaxy (J2000)
      real*8        DEdeg       ! (deg) Declination of galaxy (J2000)
      real*8        GLON        ! (deg) Galactic longitude of galaxy
      real*8        GLAT        ! (deg) Galactic latitude of galaxy
      real*8        eta         ! (deg) SDSS survey coordinate eta
      real*8        lambda      ! (deg) SDSS survey coordinate lambda
      real*8        umag        ! (mag) Galactic extinction corrected
*                                     Petrosian u-magnitude
      real*8        gmag        ! (mag) Galactic extinction corrected
*                                     Petrosian g-magnitude
      real*8        rmag        ! (mag) Galactic extinction corrected
*                                     Petrosian r-magnitude
      real*8        imag        ! (mag) Galactic extinction corrected
*                                     Petrosian i-magnitude
      real*8        zmag        ! (mag) Galactic extinction corrected
*                                     Petrosian z-magnitude
      real*8        uMAG_1      ! (mag) Absolute u-magnitude (G1)
      real*8        gMAG_1      ! (mag) Absolute g-magnitude (G1)
      real*8        rMAG_1      ! (mag) Absolute r-magnitude (G1)
      real*8        iMAG_1      ! (mag) Absolute i-magnitude (G1)
      real*8        zMAG_1      ! (mag) Absolute z-magnitude (G1)
      real*8        kcoru       ! (mag) K-correction in u-filter
      real*8        kcorg       ! (mag) K-correction in g-filter
      real*8        kcorr       ! (mag) K-correction in r-filter
      real*8        kcori       ! (mag) K-correction in i-filter
      real*8        kcorz       ! (mag) K-correction in z-filter
      real*8        Lr          ! (10+10Lsun) r-band observed luminosity (G1)
      real*4        W           ! Weight factor for the galaxy
      integer*4     Rank        ! [1/878] Galaxy rank in its group
      real*8        Den1        ! ?=-999 Normalised environmental density at
*                                           1Mpc/h (G1)
      real*8        Den2        ! ?=-999 Normalised environmental density at
*                                           2Mpc/h (G1)
      real*8        Den4        ! ?=-999 Normalised environmental density at
*                                           4Mpc/h (G1)
      real*8        Den8        ! ?=-999 Normalised environmental density at
*                                           8Mpc/h (G1)
      real*8        Den16       ! ?=-999 Normalised environmental density at
*                                           16Mpc/h (G1)
      real*8        Edge        ! (Mpc) Co-moving distance from the survey mask (G1)
      integer*4     Mph         ! [0/2] Morphology of galaxy, 1=S, 2=E (2)
      real*8        prE         ! Probability of being an early type galaxy
      character*20  DR8objid    ! Approximative SDSS DR8 photometric objID (3)
      character*20  DR8spec     ! Approximative SDSS DR8 spectroscopic ID (3)
      integer*4     IDDR7       ! ID number to link to our previous DR7 cat
      real*8        zobs        ! Observed redshift (without CMB correction)
      real*8        Distcor     ! (Mpc) Corrected co-moving distance of galaxy (G1)
*                                     (in Mpc/h)
      integer*4     fc          ! [0/5] Number of missing neighbours
*                                          (fibre collision) (G2)
*Note (1): Groups with IDcl>77858 have only 1 galaxy.
*Note (2): Morphology code is:
*   0 = unclear;
*   1 = spiral;
*   2 = elliptical
*Note (3): IDs do not match the SDSS-DR8 ones (the 8 rightmost bits of the
*     binary reporesentation were all set to zero, i.e. the correct SDSS-DR8
*     ID is a number between DR8objid and DR8objid+255).

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

C  Declarations for 'dr8gr.dat'	! Group/cluster parameters

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     IDcl_1      ! [1/77858] Group/cluster ID number
      integer*4     Ngal_1      ! [2/878] Group richness
      real*8        zcl         ! Redshift to the group centre
      real*8        Dist_c_1    ! (Mpc) Co-moving distance to the group centre (G1)
      real*8        RAdeg_1     ! (deg) Right ascension of group centre (J2000)
      real*8        DEdeg_1     ! (deg) Declination of group centre (J2000)
      real*8        GLON_1      ! (deg) Galactic longitude
      real*8        GLAT_1      ! (deg) Galactic latitude
      real*8        eta_1       ! (deg) SDSS survey coordinate eta
      real*8        lambda_1    ! (deg) SDSS survey coordinate lambda
      real*8        Size        ! (Mpc) Max linear size of the group in the sky (G1)
      real*8        Rvir        ! (Mpc) Virial radius (projected harmonic mean) (G1)
      real*8        sigma       ! (Mpc) Extent of the group in the sky (G1)
      real*8        sigmav      ! (km/s) rms radial velocity deviation
      real*8        Lrobs       ! (10+10Lsun) r-band observed luminosity (G1)
      real*8        Lrtot       ! (10+10Lsun) r-band estimated total luminosity (G1)
      real*4        Dlink       ! (Mpc) Co-moving linking length (G1)
      real*8        Den1_1      ! ?=-999 Environmental density for group at
*                                           a=1Mpc/h (G1)
      real*8        Den2_1      ! ?=-999 Environmental density for group at
*                                           a=2Mpc/h (G1)
      real*8        Den4_1      ! ?=-999 Environmental density for group at
*                                           a=4Mpc/h (G1)
      real*8        Den8_1      ! ?=-999 Environmental density for group at
*                                           a=8Mpc/h (G1)
      real*8        Den16_1     ! ?=-999 Environmental density for group at
*                                           a=16Mpc/h (G1)
      real*8        Edge_1      ! (Mpc) Minimum distance from survey mask (G1)
      integer*4     fc_1        ! [0/64] Number of potentially missing fibre
*                                     collision galaxies (G2)

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

C  Loading file 'dr8gal.dat'	! Galaxy parameters

C  Format for file interpretation

    1 format(
     +  1X,I6,1X,I6,3X,I3,1X,F7.5,1X,F8.4,1X,F8.4,1X,F10.5,1X,F10.5,
     +  1X,F10.5,1X,F10.5,1X,F10.5,1X,F10.5,1X,F8.5,1X,F8.5,1X,F8.5,
     +  1X,F8.5,1X,F8.5,1X,F9.5,1X,F9.5,1X,F9.5,1X,F9.5,1X,F9.5,1X,
     +  F9.5,1X,F9.5,1X,F9.5,1X,F9.5,1X,F9.5,1X,F10.5,1X,F6.3,3X,I3,
     +  1X,F11.5,1X,F11.5,1X,F11.5,1X,F11.5,1X,F11.5,1X,F8.4,1X,I1,1X,
     +  F7.5,1X,A20,1X,A20,1X,I6,1X,F7.5,1X,F8.4,3X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr8gal.dat')
      write(6,*) '....Loading file: dr8gal.dat'
      do i__=1,576493
        read(1,'(A430)')ar__
        read(ar__,1)
     +  ID,IDcl,Ngal,z,Dist,Dist_c,RAdeg,DEdeg,GLON,GLAT,eta,lambda,
     +  umag,gmag,rmag,imag,zmag,uMAG_1,gMAG_1,rMAG_1,iMAG_1,zMAG_1,
     +  kcoru,kcorg,kcorr,kcori,kcorz,Lr,W,Rank,Den1,Den2,Den4,Den8,
     +  Den16,Edge,Mph,prE,DR8objid,DR8spec,IDDR7,zobs,Distcor,fc
c    ..............Just test output...........
        write(6,1)
     +  ID,IDcl,Ngal,z,Dist,Dist_c,RAdeg,DEdeg,GLON,GLAT,eta,lambda,
     +  umag,gmag,rmag,imag,zmag,uMAG_1,gMAG_1,rMAG_1,iMAG_1,zMAG_1,
     +  kcoru,kcorg,kcorr,kcori,kcorz,Lr,W,Rank,Den1,Den2,Den4,Den8,
     +  Den16,Edge,Mph,prE,DR8objid,DR8spec,IDDR7,zobs,Distcor,fc
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'dr8gr.dat'	! Group/cluster parameters

C  Format for file interpretation

    2 format(
     +  2X,I5,3X,I3,1X,F7.5,1X,F8.4,1X,F10.5,1X,F10.5,1X,F10.5,1X,
     +  F10.5,1X,F10.5,1X,F10.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F10.4,1X,
     +  F10.5,1X,F10.5,1X,F6.3,1X,F11.5,1X,F11.5,1X,F11.5,1X,F11.5,1X,
     +  F11.5,1X,F8.4,2X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr8gr.dat')
      write(6,*) '....Loading file: dr8gr.dat'
      do i__=1,77858
        read(1,'(A236)')ar__1
        read(ar__1,2)
     +  IDcl_1,Ngal_1,zcl,Dist_c_1,RAdeg_1,DEdeg_1,GLON_1,GLAT_1,
     +  eta_1,lambda_1,Size,Rvir,sigma,sigmav,Lrobs,Lrtot,Dlink,
     +  Den1_1,Den2_1,Den4_1,Den8_1,Den16_1,Edge_1,fc_1
c    ..............Just test output...........
        write(6,2)
     +  IDcl_1,Ngal_1,zcl,Dist_c_1,RAdeg_1,DEdeg_1,GLON_1,GLAT_1,
     +  eta_1,lambda_1,Size,Rvir,sigma,sigmav,Lrobs,Lrtot,Dlink,
     +  Den1_1,Den2_1,Den4_1,Den8_1,Den16_1,Edge_1,fc_1
c    .......End.of.Just test output...........
      end do
      close(1)

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