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 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-Aug-16
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       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     PGC         ! [4/9003144] Principal Galaxies Catalog number
      real*4        Dist        ! (Mpc) [0.03/518] Distance (1)
      real*4        DM          ! (mag) [17/39] Distance modulus (1)
      real*4        Err         ! [0.05/0.25] Fractional distance error (1)
      character*8   r_Dist      ! [CTLMSNHF ] Source of distance (2)
      integer*4     RAh         ! (h) ? Hour of Right Ascension (J2000)
      integer*4     RAm         ! (min) ? Minute of Right Ascension (J2000)
      real*4        RAs         ! (s) ? Second of Right Ascension (J2000)
      character*1   DE_         ! Sign of the Declination (J2000)
      integer*4     DEd         ! (deg) ? Degree of Declination (J2000)
      integer*4     DEm         ! (arcmin) ? Arcminute of Declination (J2000)
      real*4        DEs         ! (arcsec) ? Arcsecond of Declination (J2000)
      real*8        GLON        ! (deg) Galaxy Galactic longitude
      real*8        GLAT        ! (deg) Galaxy Galactic latitude
      real*8        SGLON       ! (deg) Galaxy Supergalactic longitude
      real*8        SGLAT       ! (deg) Galaxy Supergalactic latitude
      integer*4     MT          ! [-5/20] Numeric code for Morphological Type
*                                        from RC3 (VII/155)
      real*4        E_B_V       ! (mag) Schlegel et al. (1998ApJ...500..525S) B-band
*                                  reddening
      real*4        Bmag        ! (mag) ?=0 B-band magnitude from RC3 (VII/155)
      real*4        Kmag        ! (mag) 2MASS Ks band magnitude
      integer*4     HV          ! (km/s) [-525/29046] Heliocentric Velocity
      integer*4     GV          ! (km/s) Galactic reference frame Velocity
      integer*4     Vls         ! (km/s) Local Sheet reference frame Velocity
      integer*4     Vcmb        ! (km/s) CMB reference frame Velocity
      integer*4     Vcmba       ! (km/s) Adjusted CMB reference frame Velocity (3)
      character*10  Name        ! Galaxy common name
      integer*4     Group       ! [0/2941]? Bookkeeping group number (preferred
*                                  group identifier)
      integer*4     v2M__       ! [0/4682]? Alternate group identification (G1)
      integer*4     N1          ! [1/160] Number of galaxies in group with
*                                  measured distances
      real*4        v_Dist_     ! (Mpc) Weighted average group distance
      real*4        v_DM_       ! (mag) Weighted average group distance modulus
      real*4        v_Err_      ! ? Weighted average group fractional distance
*                                  error
      integer*4     N2          ! [1/224]? Number of galaxies in group with known
*                                  positions and velocities
      real*8        GGLON       ! (deg) ? Group Galactic longitude
      real*8        GGLAT       ! (deg) ? Group Galactic latitude
      real*8        GSGLON      ! (deg) ? Group Supergalactic longitude
      real*8        GSGLAT      ! (deg) ? Group Supergalactic latitude
      integer*4     GMT         ! [-5/20]? Mean morphological type of group
      real*4        v_Bmag_     ! (mag) ? Summed group RC3 B band magnitude
      real*4        v_Kmag_     ! (mag) ? Summed group 2MASS Ks band magnitude
      integer*4     v_HV_       ! (km/s) ? Group Heliocentric Velocity
      integer*4     v_GV_       ! (km/s) ? Group Galactic reference frame Velocity
      integer*4     v_Vls_      ! (km/s) ? Group Local Sheet reference frame Velocity
      integer*4     v_Vcmb_     ! (km/s) Group CMB reference frame Velocity
      integer*4     v_Vcmba_    ! (km/s) Group adjusted CMB reference frame Velocity (3)
      integer*4     sigma       ! (km/s) ? RMS group velocity dispersion
      integer*4     PGCb        ! [218/2807110]? PGC ID of brightest group member
      character*15  GName       ! 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        ! [1/160] Number of galaxies in group with
*                                 measured distances
      real*4        v_Dist__1   ! (Mpc) Weighted average group distance
      real*4        v_DM__1     ! (mag) Weighted average group distance modulus
      real*4        v_Err__1    ! Weighted average group fractional distance error
      integer*4     N2_1        ! [1/224] Number of galaxies in group with known
*                                 positions and velocities
      real*8        GLON_1      ! (deg) Group Galactic longitude
      real*8        GLAT_1      ! (deg) Group Galactic latitude
      real*8        SGLON_1     ! (deg) Group Supergalactic longitude
      real*8        SGLAT_1     ! (deg) Group Supergalactic latitude
      integer*4     GMT_1       ! [-5/20] Mean morphological type of group
      real*4        v_Bmag__1   ! (mag) Summed group 3rd Reference Catalogue (RC3, 
*                                 cat. VII/155)B band magnitude
      real*4        v_Kmag__1   ! (mag) Summed group 2MASS Ks band magnitude
      integer*4     v_HV__1     ! (km/s) Group Heliocentric Velocity
      integer*4     v_GV__1     ! (km/s) Group Galactic reference frame Velocity
      integer*4     v_Vls__1    ! (km/s) Group Local Sheet reference frame Velocity
      integer*4     v_Vcmb__1   ! (km/s) Group CMB reference frame Velocity
      integer*4     v_Vcmba__1  ! (km/s) Group adjusted CMB reference frame Velocity (1)
      integer*4     sigma_1     ! (km/s) RMS group velocity dispersion
      integer*4     v_PV_       ! (km/s) Group Peculiar Velocity (2)
      integer*4     v_PVa_      ! (km/s) Adjusted Group Peculiar Velocity (3)
      integer*4     Group_1     ! [0/2941] Bookkeeping group number (preferred
*                                 group identifier)
      integer*4     v2M___1     ! [0/4682] Alternate group identification (G1)
      integer*4     PGCb_1      ! [0/9003144] PGC number of brightest group member
      character*10  GName_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,Dist,DM,Err,r_Dist,RAh,RAm,RAs,DE_,DEd,DEm,DEs,GLON,GLAT,
     +  SGLON,SGLAT,MT,E_B_V,Bmag,Kmag,HV,GV,Vls,Vcmb,Vcmba,Name,
     +  Group,v2M__,N1,v_Dist_,v_DM_,v_Err_,N2,GGLON,GGLAT,GSGLON,
     +  GSGLAT,GMT,v_Bmag_,v_Kmag_,v_HV_,v_GV_,v_Vls_,v_Vcmb_,
     +  v_Vcmba_,sigma,PGCb,GName
        if(ar__(36:37) .EQ. '') RAh = iNULL__
        if(ar__(39:40) .EQ. '') RAm = iNULL__
        if(ar__(42:45) .EQ. '') RAs = rNULL__
        if(ar__(48:49) .EQ. '') DEd = iNULL__
        if(ar__(51:52) .EQ. '') DEm = iNULL__
        if(ar__(54:57) .EQ. '') DEs = rNULL__
        if(ar__(156:159) .EQ. '') Group = iNULL__
        if(ar__(161:164) .EQ. '') v2M__ = iNULL__
        if(ar__(183:187) .EQ. '') v_Err_ = rNULL__
        if(ar__(189:191) .EQ. '') N2 = iNULL__
        if(ar__(193:200) .EQ. '') GGLON = rNULL__
        if(ar__(202:209) .EQ. '') GGLAT = rNULL__
        if(ar__(211:218) .EQ. '') GSGLON = rNULL__
        if(ar__(220:227) .EQ. '') GSGLAT = rNULL__
        if(ar__(229:230) .EQ. '') GMT = iNULL__
        if(ar__(232:236) .EQ. '') v_Bmag_ = rNULL__
        if(ar__(238:242) .EQ. '') v_Kmag_ = rNULL__
        if(ar__(244:248) .EQ. '') v_HV_ = iNULL__
        if(ar__(250:254) .EQ. '') v_GV_ = iNULL__
        if(ar__(256:260) .EQ. '') v_Vls_ = iNULL__
        if(ar__(274:277) .EQ. '') sigma = iNULL__
        if(ar__(279:285) .EQ. '') PGCb = 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.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  PGC,Dist,DM,Err,r_Dist,RAh,RAm,RAs,DE_,DEd,DEm,DEs,GLON,GLAT,
     +  SGLON,SGLAT,MT,E_B_V,Bmag,Kmag,HV,GV,Vls,Vcmb,Vcmba,Name,
     +  Group,v2M__,N1,v_Dist_,v_DM_,v_Err_,N2,GGLON,GGLAT,GSGLON,
     +  GSGLAT,GMT,v_Bmag_,v_Kmag_,v_HV_,v_GV_,v_Vls_,v_Vcmb_,
     +  v_Vcmba_,sigma,PGCb,GName
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
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,v_Dist__1,v_DM__1,v_Err__1,N2_1,GLON_1,GLAT_1,SGLON_1,
     +  SGLAT_1,GMT_1,v_Bmag__1,v_Kmag__1,v_HV__1,v_GV__1,v_Vls__1,
     +  v_Vcmb__1,v_Vcmba__1,sigma_1,v_PV_,v_PVa_,Group_1,v2M___1,
     +  PGCb_1,GName_1
c    ..............Just test output...........
        write(6,2)
     +  N1_1,v_Dist__1,v_DM__1,v_Err__1,N2_1,GLON_1,GLAT_1,SGLON_1,
     +  SGLAT_1,GMT_1,v_Bmag__1,v_Kmag__1,v_HV__1,v_GV__1,v_Vls__1,
     +  v_Vcmb__1,v_Vcmba__1,sigma_1,v_PV_,v_PVa_,Group_1,v2M___1,
     +  PGCb_1,GName_1
c    .......End.of.Just test output...........
      end do
      close(1)

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