FORTRAN Generation
(/./ftp/cats/J/MNRAS/416/2840)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/416/2840 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-May-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/MNRAS/416/2840    The 2M++ galaxy redshift catalogue       (Lavaux+, 2011)
*================================================================================
*The 2M++ galaxy redshift catalogue.
*    Lavaux G., Hudson M.J.
*   <Mon. Not. R. Astron. Soc., 416, 2840-2856 (2011)>
*   =2011MNRAS.416.2840L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! *The 2M++ catalogue

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

C  J2000 position composed of: RAdeg DEdeg
      character*16  Name       (nr__) ! Name of the galaxy as given in the 2MASS-XSC
*                                   database (Cat. VII/233), or ZOA fake galaxy
      real*4        RAdeg      (nr__) ! (deg) Right Ascension in decimal degrees (J2000)
      real*4        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      real*4        GLON       (nr__) ! (deg) [0/360] Galactic longitude
      real*4        GLAT       (nr__) ! (deg) Galactic latitude
      real*4        Ksmag      (nr__) ! (mag) Apparent magnitude in band K_S as defined in
*                                   Section 2.2.
      integer*4     HV         (nr__) ! (km/s) Heliocentric total apparent velocity
      integer*4     Vcmb       (nr__) ! (km/s) Total apparent velocity in CMB rest frame (G1)
      integer*4     e_HV       (nr__) ! (km/s) ?=0 Total apparent velocity error
*                                      (equal to zero if not measured)
      integer*4     GID        (nr__) ! ? Unique group identifier obtained from the
*                                    algorithm of Section 4.
      real*4        c11_5      (nr__) ! Redshift incompleteness at magnitude
*                                   K2M++<=11.5
      real*4        c12_5      (nr__) ! ? Redshift incompleteness at magnitude
*                                    KM2++<=12.5 (2)
      integer*4     ZoA        (nr__) ! [0/1] Flag to indicate whether this is is a
*                                   fake galaxy to fill the zone of avoidance
*                                   following the algorithm of Section 3.
      integer*4     Cln        (nr__) ! [0/1] Flag to indicate if the redshift has
*                                   been obtained by the cloning procedure
*                                   of Section 2.3.
      integer*4     M0         (nr__) ! [0/1] Flag to indicate whether this galaxy
*                                   lies in the exclusive region covered by the
*                                   2MRS target mask (2Mx6S region)
      integer*4     M1         (nr__) ! [0/1] Flag to indicate whether this galaxy
*                                   lies in the non-exclusion region covered by
*                                   the SDSS
      integer*4     M2         (nr__) ! [0/1] Flag to indicate whether this galaxy
*                                   lies in the non-exclusion region covered
*                                   by the 6dFGRS
      character*19  Ref        (nr__) ! Reference bibcode ("zoa" for fake galaxies
*                                   in the Zone of Avoidance)
*Note (2): It may be empty in that case the catalogue is limited to K2M++<=11.5
*          in the portion of the sky holding the galaxy.

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

C  Declarations for 'group.dat'	! The 2M++ group catalogue

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

C  Position composed of: GLON GLAT
      integer*4     GID_1      (nr__1) ! Group identifier in the catalogue
      real*4        GLON_1     (nr__1) ! (deg) Galactic longitude
      real*4        GLAT_1     (nr__1) ! (deg) Galactic latitude
      real*4        K2mag      (nr__1) ! (mag) Apparent magnitude K2M++ (1)
      integer*4     Rich       (nr__1) ! Richness uncorrected for incompleteness effect
      integer*4     HV_1       (nr__1) ! (km/s) Heliocentric total apparent velocity
      integer*4     Vcmb_1     (nr__1) ! (km/s) Total apparent velocity in CMB rest frame (G1)
      integer*4     sigma      (nr__1) ! (km/s) Velocity dispersion in the group
*Note (1): We define as K2M++ (K2mag) the magnitude of a galaxy measured in
*     the K_S_ band, within the circular isophote at 20mag/arcsec^2^, after
*     various corrections described in Section 2.2. The magnitude is derived
*     from the 2M++ galaxies. This is a magnitude uncorrected for
*     incompleteness effect.

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

C  Loading file 'catalog.dat'	! *The 2M++ catalogue

C  Format for file interpretation

    1 format(
     +  2X,A16,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F5.2,2X,I5,2X,I5,1X,
     +  I6,3X,I4,3X,F4.2,3X,F4.2,4X,I1,4X,I1,4X,I1,4X,I1,4X,I1,2X,A19)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,72973
        read(1,'(A140)')ar__
        read(ar__,1)
     +  Name(i__),RAdeg(i__),DEdeg(i__),GLON(i__),GLAT(i__),
     +  Ksmag(i__),HV(i__),Vcmb(i__),e_HV(i__),GID(i__),c11_5(i__),
     +  c12_5(i__),ZoA(i__),Cln(i__),M0(i__),M1(i__),M2(i__),Ref(i__)
        if(ar__(77:80) .EQ. '') GID(i__) = iNULL__
        if(ar__(91:94) .EQ. '') c12_5(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),RAdeg(i__),DEdeg(i__),GLON(i__),GLAT(i__),
     +  Ksmag(i__),HV(i__),Vcmb(i__),e_HV(i__),GID(i__),c11_5(i__),
     +  c12_5(i__),ZoA(i__),Cln(i__),M0(i__),M1(i__),M2(i__),Ref(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'group.dat'	! The 2M++ group catalogue

C  Format for file interpretation

    2 format(6X,I4,1X,F6.2,1X,F6.2,2X,F5.2,8X,I3,2X,I5,2X,I5,5X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'group.dat')
      write(6,*) '....Loading file: group.dat'
      do i__=1,4002
        read(1,'(A64)')ar__1
        read(ar__1,2)
     +  GID_1(i__),GLON_1(i__),GLAT_1(i__),K2mag(i__),Rich(i__),
     +  HV_1(i__),Vcmb_1(i__),sigma(i__)
c    ..............Just test output...........
        write(6,2)
     +  GID_1(i__),GLON_1(i__),GLAT_1(i__),K2mag(i__),Rich(i__),
     +  HV_1(i__),Vcmb_1(i__),sigma(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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