FORTRAN Generation
(/./ftp/cats/J/AJ/146/86)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/146/86 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-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/AJ/146/86        Cosmicflows-2 catalog (CF2)                    (Tully+, 2013)
*================================================================================
*Cosmicflows-2: the data.
*    Tully R.B., Courtois H.M., Dolphin A.E., Fisher J.R., Heraudeau P.,
*    Jacobs B.A., Karachentsev I.D., Makarov D., Makarova L., Mitronova S.,
*    Rizzi L., Shaya E.J., Sorce J.G., Wu P.-F.
*   <Astron. J., 146, 86 (2013)>
*   =2013AJ....146...86T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Cosmicflows-2 compendium of distances

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

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

      integer*4     PGC        (nr__) ! [4/9003144] Principal Galaxies Catalog number
      real*4        Dist       (nr__) ! (Mpc) [0.03/518] Distance (1)
      real*4        DM         (nr__) ! (mag) [17/39] Distance modulus (1)
      real*4        Err        (nr__) ! [0.05/0.25] Fractional distance error (1)
      character*8   r_Dist     (nr__) ! [CTLMSNHF ] Source of distance (2)
      integer*4     RAh        (nr__) ! (h) ? Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) ? Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) ? Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) ? Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) ? Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) ? Arcsecond of Declination (J2000)
      real*8        GLON       (nr__) ! (deg) Galaxy Galactic longitude
      real*8        GLAT       (nr__) ! (deg) Galaxy Galactic latitude
      real*8        SGLON      (nr__) ! (deg) Galaxy Supergalactic longitude
      real*8        SGLAT      (nr__) ! (deg) Galaxy Supergalactic latitude
      integer*4     MT         (nr__) ! [-5/20] Numeric code for Morphological Type
*                                        from RC3 (VII/155)
      real*4        E_B_V      (nr__) ! (mag) Schlegel et al. (1998ApJ...500..525S) B-band
*                                  reddening
      real*4        Bmag       (nr__) ! (mag) ?=0 B-band magnitude from RC3 (VII/155)
      real*4        Kmag       (nr__) ! (mag) 2MASS Ks band magnitude
      integer*4     HV         (nr__) ! (km/s) [-525/29046] Heliocentric Velocity
      integer*4     GV         (nr__) ! (km/s) Galactic reference frame Velocity
      integer*4     Vls        (nr__) ! (km/s) Local Sheet reference frame Velocity
      integer*4     Vcmb       (nr__) ! (km/s) CMB reference frame Velocity
      integer*4     Vcmba      (nr__) ! (km/s) Adjusted CMB reference frame Velocity (3)
      character*10  Name       (nr__) ! Galaxy common name
      integer*4     Group      (nr__) ! [0/2941]? Bookkeeping group number (preferred
*                                  group identifier)
      integer*4     v2M__      (nr__) ! [0/4682]? Alternate group identification (G1)
      integer*4     N1         (nr__) ! [1/160] Number of galaxies in group with
*                                  measured distances
      real*4        v_Dist_    (nr__) ! (Mpc) Weighted average group distance
      real*4        v_DM_      (nr__) ! (mag) Weighted average group distance modulus
      real*4        v_Err_     (nr__) ! ? Weighted average group fractional distance
*                                  error
      integer*4     N2         (nr__) ! [1/224]? Number of galaxies in group with known
*                                  positions and velocities
      real*8        GGLON      (nr__) ! (deg) ? Group Galactic longitude
      real*8        GGLAT      (nr__) ! (deg) ? Group Galactic latitude
      real*8        GSGLON     (nr__) ! (deg) ? Group Supergalactic longitude
      real*8        GSGLAT     (nr__) ! (deg) ? Group Supergalactic latitude
      integer*4     GMT        (nr__) ! [-5/20]? Mean morphological type of group
      real*4        v_Bmag_    (nr__) ! (mag) ? Summed group RC3 B band magnitude
      real*4        v_Kmag_    (nr__) ! (mag) ? Summed group 2MASS Ks band magnitude
      integer*4     v_HV_      (nr__) ! (km/s) ? Group Heliocentric Velocity
      integer*4     v_GV_      (nr__) ! (km/s) ? Group Galactic reference frame Velocity
      integer*4     v_Vls_     (nr__) ! (km/s) ? Group Local Sheet reference frame Velocity
      integer*4     v_Vcmb_    (nr__) ! (km/s) Group CMB reference frame Velocity
      integer*4     v_Vcmba_   (nr__) ! (km/s) Group adjusted CMB reference frame Velocity (3)
      integer*4     sigma      (nr__) ! (km/s) ? RMS group velocity dispersion
      integer*4     PGCb       (nr__) ! [218/2807110]? PGC ID of brightest group member
      character*15  GName      (nr__) ! Alternate group/cluster name
*Note (1): Weighted average values are given if there are multiple sources.
*Note (2): Letter indicates distance determined by that method as follows:
* C = Cepheid Period-Luminosity Relation (PLR) distance;
* T = Tip of the Red Giant Branch (TRGB) from this program distance
*     (see Section 2 for details);
* L = Tip of the Red Giant Branch (TRGB) from literature distance
*     (see Section 2 for details);
* M = Miscellaneous (RR Lyr, horizontal branch, eclipsing binary, maser)
*     distance;
* S = Surface Brightness Fluctuation (SBF) method (Tonry et al.,
*     2001ApJ...546..681T); Blakeslee et al., 2010ApJ...724..657B);
* N = Type Ia supernovae (SNIa) distance;
* H = Tully-Fisher relation (TFR) distance (see Section 3 for details);
* F = fundamental plane (FP) method (Djorgovski & Davis, 1987ApJ...313...59D;
*     Dressler et al., 1987ApJ...313...42D).
*Note (3): Adjusted for cosmological effectes with {Omega}_m_=0.27 and
*     {Omega}_{Lambda}_=0.73.

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

C  Declarations for 'table2.dat'	! Distances for galaxy groups

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

C  Position composed of: GLON GLAT
      integer*4     N1_1       (nr__1) ! [1/160] Number of galaxies in group with
*                                 measured distances
      real*4        v_Dist__1  (nr__1) ! (Mpc) Weighted average group distance
      real*4        v_DM__1    (nr__1) ! (mag) Weighted average group distance modulus
      real*4        v_Err__1   (nr__1) ! Weighted average group fractional distance error
      integer*4     N2_1       (nr__1) ! [1/224] Number of galaxies in group with known
*                                 positions and velocities
      real*8        GLON_1     (nr__1) ! (deg) Group Galactic longitude
      real*8        GLAT_1     (nr__1) ! (deg) Group Galactic latitude
      real*8        SGLON_1    (nr__1) ! (deg) Group Supergalactic longitude
      real*8        SGLAT_1    (nr__1) ! (deg) Group Supergalactic latitude
      integer*4     GMT_1      (nr__1) ! [-5/20] Mean morphological type of group
      real*4        v_Bmag__1  (nr__1) ! (mag) Summed group 3rd Reference Catalogue (RC3, 
*                                 cat. VII/155)B band magnitude
      real*4        v_Kmag__1  (nr__1) ! (mag) Summed group 2MASS Ks band magnitude
      integer*4     v_HV__1    (nr__1) ! (km/s) Group Heliocentric Velocity
      integer*4     v_GV__1    (nr__1) ! (km/s) Group Galactic reference frame Velocity
      integer*4     v_Vls__1   (nr__1) ! (km/s) Group Local Sheet reference frame Velocity
      integer*4     v_Vcmb__1  (nr__1) ! (km/s) Group CMB reference frame Velocity
      integer*4     v_Vcmba__1 (nr__1) ! (km/s) Group adjusted CMB reference frame Velocity (1)
      integer*4     sigma_1    (nr__1) ! (km/s) RMS group velocity dispersion
      integer*4     v_PV_      (nr__1) ! (km/s) Group Peculiar Velocity (2)
      integer*4     v_PVa_     (nr__1) ! (km/s) Adjusted Group Peculiar Velocity (3)
      integer*4     Group_1    (nr__1) ! [0/2941] Bookkeeping group number (preferred
*                                 group identifier)
      integer*4     v2M___1    (nr__1) ! [0/4682] Alternate group identification (G1)
      integer*4     PGCb_1     (nr__1) ! [0/9003144] PGC number of brightest group member
      character*10  GName_1    (nr__1) ! Alternate group/cluster name
*Note (1): Adjustment for cosmological model ({Omega}_m_=0.27, flat topology)
*     as given by Eq. 14.
*Note (2): GPV=V_mod_-H_0_d assuming H_0_=74.4km/s/Mpc.
*Note (3): Adjusted for the distance measurement error bias (only differs from
*     value in previous column if negative).

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

C  Loading file 'table1.dat'	! Cosmicflows-2 compendium of distances

C  Format for file interpretation

    1 format(
     +  I7,1X,F6.2,1X,F5.2,1X,F4.2,1X,A8,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,
     +  1X,I2,1X,F4.1,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,I2,1X,F4.2,
     +  1X,F5.2,1X,F5.2,1X,I5,1X,I5,1X,I5,1X,I5,1X,I5,1X,A10,1X,I4,1X,
     +  I4,1X,I3,1X,F6.2,1X,F5.2,1X,F5.3,1X,I3,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,F8.4,1X,I2,1X,F5.2,1X,F5.2,1X,I5,1X,I5,1X,I5,1X,I5,1X,
     +  I5,1X,I4,1X,I7,1X,A15)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,8315
        read(1,'(A301)')ar__
        read(ar__,1)
     +  PGC(i__),Dist(i__),DM(i__),Err(i__),r_Dist(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  GLON(i__),GLAT(i__),SGLON(i__),SGLAT(i__),MT(i__),E_B_V(i__),
     +  Bmag(i__),Kmag(i__),HV(i__),GV(i__),Vls(i__),Vcmb(i__),
     +  Vcmba(i__),Name(i__),Group(i__),v2M__(i__),N1(i__),
     +  v_Dist_(i__),v_DM_(i__),v_Err_(i__),N2(i__),GGLON(i__),
     +  GGLAT(i__),GSGLON(i__),GSGLAT(i__),GMT(i__),v_Bmag_(i__),
     +  v_Kmag_(i__),v_HV_(i__),v_GV_(i__),v_Vls_(i__),v_Vcmb_(i__),
     +  v_Vcmba_(i__),sigma(i__),PGCb(i__),GName(i__)
        if(ar__(36:37) .EQ. '') RAh(i__) = iNULL__
        if(ar__(39:40) .EQ. '') RAm(i__) = iNULL__
        if(ar__(42:45) .EQ. '') RAs(i__) = rNULL__
        if(ar__(48:49) .EQ. '') DEd(i__) = iNULL__
        if(ar__(51:52) .EQ. '') DEm(i__) = iNULL__
        if(ar__(54:57) .EQ. '') DEs(i__) = rNULL__
        if(ar__(156:159) .EQ. '') Group(i__) = iNULL__
        if(ar__(161:164) .EQ. '') v2M__(i__) = iNULL__
        if(ar__(183:187) .EQ. '') v_Err_(i__) = rNULL__
        if(ar__(189:191) .EQ. '') N2(i__) = iNULL__
        if(ar__(193:200) .EQ. '') GGLON(i__) = rNULL__
        if(ar__(202:209) .EQ. '') GGLAT(i__) = rNULL__
        if(ar__(211:218) .EQ. '') GSGLON(i__) = rNULL__
        if(ar__(220:227) .EQ. '') GSGLAT(i__) = rNULL__
        if(ar__(229:230) .EQ. '') GMT(i__) = iNULL__
        if(ar__(232:236) .EQ. '') v_Bmag_(i__) = rNULL__
        if(ar__(238:242) .EQ. '') v_Kmag_(i__) = rNULL__
        if(ar__(244:248) .EQ. '') v_HV_(i__) = iNULL__
        if(ar__(250:254) .EQ. '') v_GV_(i__) = iNULL__
        if(ar__(256:260) .EQ. '') v_Vls_(i__) = iNULL__
        if(ar__(274:277) .EQ. '') sigma(i__) = iNULL__
        if(ar__(279:285) .EQ. '') PGCb(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.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  PGC(i__),Dist(i__),DM(i__),Err(i__),r_Dist(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  GLON(i__),GLAT(i__),SGLON(i__),SGLAT(i__),MT(i__),E_B_V(i__),
     +  Bmag(i__),Kmag(i__),HV(i__),GV(i__),Vls(i__),Vcmb(i__),
     +  Vcmba(i__),Name(i__),Group(i__),v2M__(i__),N1(i__),
     +  v_Dist_(i__),v_DM_(i__),v_Err_(i__),N2(i__),GGLON(i__),
     +  GGLAT(i__),GSGLON(i__),GSGLAT(i__),GMT(i__),v_Bmag_(i__),
     +  v_Kmag_(i__),v_HV_(i__),v_GV_(i__),v_Vls_(i__),v_Vcmb_(i__),
     +  v_Vcmba_(i__),sigma(i__),PGCb(i__),GName(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.dat'	! Distances for galaxy groups

C  Format for file interpretation

    2 format(
     +  I3,1X,F6.2,1X,F5.2,1X,F4.2,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,I2,1X,F5.2,1X,F5.2,1X,I5,1X,I5,1X,I5,1X,I5,1X,I5,1X,
     +  I4,1X,I6,1X,I5,1X,I4,1X,I4,1X,I7,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,5224
        read(1,'(A153)')ar__1
        read(ar__1,2)
     +  N1_1(i__),v_Dist__1(i__),v_DM__1(i__),v_Err__1(i__),N2_1(i__),
     +  GLON_1(i__),GLAT_1(i__),SGLON_1(i__),SGLAT_1(i__),GMT_1(i__),
     +  v_Bmag__1(i__),v_Kmag__1(i__),v_HV__1(i__),v_GV__1(i__),
     +  v_Vls__1(i__),v_Vcmb__1(i__),v_Vcmba__1(i__),sigma_1(i__),
     +  v_PV_(i__),v_PVa_(i__),Group_1(i__),v2M___1(i__),PGCb_1(i__),
     +  GName_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  N1_1(i__),v_Dist__1(i__),v_DM__1(i__),v_Err__1(i__),N2_1(i__),
     +  GLON_1(i__),GLAT_1(i__),SGLON_1(i__),SGLAT_1(i__),GMT_1(i__),
     +  v_Bmag__1(i__),v_Kmag__1(i__),v_HV__1(i__),v_GV__1(i__),
     +  v_Vls__1(i__),v_Vcmb__1(i__),v_Vcmba__1(i__),sigma_1(i__),
     +  v_PV_(i__),v_PVa_(i__),Group_1(i__),v2M___1(i__),PGCb_1(i__),
     +  GName_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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