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 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 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         (nr__) ! Unique identification number for galaxies
      integer*4     IDcl       (nr__) ! [1/388773] Group/cluster ID number (1)
      integer*4     Ngal       (nr__) ! [1/878] Richness of group the galaxy
*                                            belongs to
      real*8        z          (nr__) ! Redshift, corrected to CMB rest frame
      real*8        Dist       (nr__) ! (Mpc) Co-moving distance of a galaxy (G1)
      real*8        Dist_c     (nr__) ! (Mpc) Co-moving distance of the group centre (G1)
      real*8        RAdeg      (nr__) ! (deg) Right ascension of galaxy (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination of galaxy (J2000)
      real*8        GLON       (nr__) ! (deg) Galactic longitude of galaxy
      real*8        GLAT       (nr__) ! (deg) Galactic latitude of galaxy
      real*8        eta        (nr__) ! (deg) SDSS survey coordinate eta
      real*8        lambda     (nr__) ! (deg) SDSS survey coordinate lambda
      real*8        umag       (nr__) ! (mag) Galactic extinction corrected
*                                     Petrosian u-magnitude
      real*8        gmag       (nr__) ! (mag) Galactic extinction corrected
*                                     Petrosian g-magnitude
      real*8        rmag       (nr__) ! (mag) Galactic extinction corrected
*                                     Petrosian r-magnitude
      real*8        imag       (nr__) ! (mag) Galactic extinction corrected
*                                     Petrosian i-magnitude
      real*8        zmag       (nr__) ! (mag) Galactic extinction corrected
*                                     Petrosian z-magnitude
      real*8        uMAG_1     (nr__) ! (mag) Absolute u-magnitude (G1)
      real*8        gMAG_1     (nr__) ! (mag) Absolute g-magnitude (G1)
      real*8        rMAG_1     (nr__) ! (mag) Absolute r-magnitude (G1)
      real*8        iMAG_1     (nr__) ! (mag) Absolute i-magnitude (G1)
      real*8        zMAG_1     (nr__) ! (mag) Absolute z-magnitude (G1)
      real*8        kcoru      (nr__) ! (mag) K-correction in u-filter
      real*8        kcorg      (nr__) ! (mag) K-correction in g-filter
      real*8        kcorr      (nr__) ! (mag) K-correction in r-filter
      real*8        kcori      (nr__) ! (mag) K-correction in i-filter
      real*8        kcorz      (nr__) ! (mag) K-correction in z-filter
      real*8        Lr         (nr__) ! (10+10Lsun) r-band observed luminosity (G1)
      real*4        W          (nr__) ! Weight factor for the galaxy
      integer*4     Rank       (nr__) ! [1/878] Galaxy rank in its group
      real*8        Den1       (nr__) ! ?=-999 Normalised environmental density at
*                                           1Mpc/h (G1)
      real*8        Den2       (nr__) ! ?=-999 Normalised environmental density at
*                                           2Mpc/h (G1)
      real*8        Den4       (nr__) ! ?=-999 Normalised environmental density at
*                                           4Mpc/h (G1)
      real*8        Den8       (nr__) ! ?=-999 Normalised environmental density at
*                                           8Mpc/h (G1)
      real*8        Den16      (nr__) ! ?=-999 Normalised environmental density at
*                                           16Mpc/h (G1)
      real*8        Edge       (nr__) ! (Mpc) Co-moving distance from the survey mask (G1)
      integer*4     Mph        (nr__) ! [0/2] Morphology of galaxy, 1=S, 2=E (2)
      real*8        prE        (nr__) ! Probability of being an early type galaxy
      character*20  DR8objid   (nr__) ! Approximative SDSS DR8 photometric objID (3)
      character*20  DR8spec    (nr__) ! Approximative SDSS DR8 spectroscopic ID (3)
      integer*4     IDDR7      (nr__) ! ID number to link to our previous DR7 cat
      real*8        zobs       (nr__) ! Observed redshift (without CMB correction)
      real*8        Distcor    (nr__) ! (Mpc) Corrected co-moving distance of galaxy (G1)
*                                     (in Mpc/h)
      integer*4     fc         (nr__) ! [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     (nr__1) ! [1/77858] Group/cluster ID number
      integer*4     Ngal_1     (nr__1) ! [2/878] Group richness
      real*8        zcl        (nr__1) ! Redshift to the group centre
      real*8        Dist_c_1   (nr__1) ! (Mpc) Co-moving distance to the group centre (G1)
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension of group centre (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination of group centre (J2000)
      real*8        GLON_1     (nr__1) ! (deg) Galactic longitude
      real*8        GLAT_1     (nr__1) ! (deg) Galactic latitude
      real*8        eta_1      (nr__1) ! (deg) SDSS survey coordinate eta
      real*8        lambda_1   (nr__1) ! (deg) SDSS survey coordinate lambda
      real*8        Size       (nr__1) ! (Mpc) Max linear size of the group in the sky (G1)
      real*8        Rvir       (nr__1) ! (Mpc) Virial radius (projected harmonic mean) (G1)
      real*8        sigma      (nr__1) ! (Mpc) Extent of the group in the sky (G1)
      real*8        sigmav     (nr__1) ! (km/s) rms radial velocity deviation
      real*8        Lrobs      (nr__1) ! (10+10Lsun) r-band observed luminosity (G1)
      real*8        Lrtot      (nr__1) ! (10+10Lsun) r-band estimated total luminosity (G1)
      real*4        Dlink      (nr__1) ! (Mpc) Co-moving linking length (G1)
      real*8        Den1_1     (nr__1) ! ?=-999 Environmental density for group at
*                                           a=1Mpc/h (G1)
      real*8        Den2_1     (nr__1) ! ?=-999 Environmental density for group at
*                                           a=2Mpc/h (G1)
      real*8        Den4_1     (nr__1) ! ?=-999 Environmental density for group at
*                                           a=4Mpc/h (G1)
      real*8        Den8_1     (nr__1) ! ?=-999 Environmental density for group at
*                                           a=8Mpc/h (G1)
      real*8        Den16_1    (nr__1) ! ?=-999 Environmental density for group at
*                                           a=16Mpc/h (G1)
      real*8        Edge_1     (nr__1) ! (Mpc) Minimum distance from survey mask (G1)
      integer*4     fc_1       (nr__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(i__),IDcl(i__),Ngal(i__),z(i__),Dist(i__),Dist_c(i__),
     +  RAdeg(i__),DEdeg(i__),GLON(i__),GLAT(i__),eta(i__),
     +  lambda(i__),umag(i__),gmag(i__),rmag(i__),imag(i__),zmag(i__),
     +  uMAG_1(i__),gMAG_1(i__),rMAG_1(i__),iMAG_1(i__),zMAG_1(i__),
     +  kcoru(i__),kcorg(i__),kcorr(i__),kcori(i__),kcorz(i__),
     +  Lr(i__),W(i__),Rank(i__),Den1(i__),Den2(i__),Den4(i__),
     +  Den8(i__),Den16(i__),Edge(i__),Mph(i__),prE(i__),
     +  DR8objid(i__),DR8spec(i__),IDDR7(i__),zobs(i__),Distcor(i__),
     +  fc(i__)
c    ..............Just test output...........
        write(6,1)
     +  ID(i__),IDcl(i__),Ngal(i__),z(i__),Dist(i__),Dist_c(i__),
     +  RAdeg(i__),DEdeg(i__),GLON(i__),GLAT(i__),eta(i__),
     +  lambda(i__),umag(i__),gmag(i__),rmag(i__),imag(i__),zmag(i__),
     +  uMAG_1(i__),gMAG_1(i__),rMAG_1(i__),iMAG_1(i__),zMAG_1(i__),
     +  kcoru(i__),kcorg(i__),kcorr(i__),kcori(i__),kcorz(i__),
     +  Lr(i__),W(i__),Rank(i__),Den1(i__),Den2(i__),Den4(i__),
     +  Den8(i__),Den16(i__),Edge(i__),Mph(i__),prE(i__),
     +  DR8objid(i__),DR8spec(i__),IDDR7(i__),zobs(i__),Distcor(i__),
     +  fc(i__)
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(i__),Ngal_1(i__),zcl(i__),Dist_c_1(i__),RAdeg_1(i__),
     +  DEdeg_1(i__),GLON_1(i__),GLAT_1(i__),eta_1(i__),lambda_1(i__),
     +  Size(i__),Rvir(i__),sigma(i__),sigmav(i__),Lrobs(i__),
     +  Lrtot(i__),Dlink(i__),Den1_1(i__),Den2_1(i__),Den4_1(i__),
     +  Den8_1(i__),Den16_1(i__),Edge_1(i__),fc_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  IDcl_1(i__),Ngal_1(i__),zcl(i__),Dist_c_1(i__),RAdeg_1(i__),
     +  DEdeg_1(i__),GLON_1(i__),GLAT_1(i__),eta_1(i__),lambda_1(i__),
     +  Size(i__),Rvir(i__),sigma(i__),sigmav(i__),Lrobs(i__),
     +  Lrtot(i__),Dlink(i__),Den1_1(i__),Den2_1(i__),Den4_1(i__),
     +  Den8_1(i__),Den16_1(i__),Edge_1(i__),fc_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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