FORTRAN Generation
(/./ftp/cats/J/A_A/659/A126)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/659/A126 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 2026-Oct-11
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/659/A126      PSZ2 cluster candidates. III.       (Aguado-Barahona+, 2022)
*================================================================================
*Velocity dispersion and dynamical masses for 388 galaxy clusters and groups.
*Calibrating the M_SZ_-M_dyn_ scaling relation for the PSZ2 sample.
*    Aguado-Barahona A., Rubino-Martin J.A., Ferragamo A., Barrena R.,
*    Streblyanska A., Tramonte D.
*   <Astron. Astrophys., 659, A126 (2022)>
*   =2022A&A...659A.126A    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! 362 PSZ2 optical counterparts presented in
                               this paper

      integer*4 nr__
      parameter (nr__=362)	! Number of records
      character*132 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     ID         (nr__) ! Identification number (1)
      character*1   m_ID       (nr__) ! [AB] Multiplicity index on ID (1)
      character*1   n_ID       (nr__) ! [a] a = Substructured
      character*18  PSZ2       (nr__) ! PSZ2 name (PSZ2 GLLL.ll+BB.bb)
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000)
      character*1   DE_        (nr__) ! Declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000)
      integer*4     N1_5       (nr__) ! Number of cluster members used to
*                                         determine the velocity dispersion for
*                                         aperture 1.5xr_200_
      integer*4     N1         (nr__) ! ?=- Number of cluster members used to
*                                         determine the velocity dispersion for
*                                         aperture 1xr_200_
      real*4        z1_5       (nr__) ! Redshift for aperture 1.5xr_200_
      real*4        z1         (nr__) ! ?=- Redshift for aperture 1xr_200_
      real*4        zBCG       (nr__) ! ?=- BCG redshift
      integer*4     sigma200_1_5(nr__) ! (km/s) Velocity dispersion for
*                                         aperture 1.5xr_200_
      integer*4     e_sigma200_1_5(nr__) ! (km/s) Velocity dispersion for
*                                         aperture 1.5xr_200_ error
      integer*4     sigma200_1 (nr__) ! (km/s) ?=- Velocity dispersion for
*                                         aperture 1xr_200_
      integer*4     e_sigma200_1(nr__) ! (km/s) ? Velocity dispersion for
*                                         aperture 1xr_200_ error
      real*4        M500_1_5   (nr__) ! (10+15Msun) Mass M500 for aperture 1.5xr_200_
      real*4        e_M500_1_5 (nr__) ! (10+15Msun) Mass M500 for aperture 1.5xr_200_ error
      real*4        M500_1     (nr__) ! (10+15Msun) ?=- Mass M500 for aperture 1xr_200_
      real*4        e_M500_1   (nr__) ! (10+15Msun) ? Mass M500 for aperture 1xr_200_ error
      real*4        M500SZ     (nr__) ! (10+15Msun) ?=- Mass M500 of SZ source
      real*4        e_M500SZ   (nr__) ! (10+15Msun) ? Mass M500 of SZ source error
      integer*4     Flag       (nr__) ! [0/2] Flag (2)
      character*5   DataSet    (nr__) ! Data set (ITP13, LP15 or SDSS)
*Note (1): ID followed by an A or B label indicates the presence of multiple
*   clusters associated with the same SZ source.
*Note (2): This flag indicates whether an object is used in Sect.5 as follows:
*           0 = Not used
*           1 = Used in both samples (1.5 and 1xr200)
*           2 = Used only in the sample 1.5xr200

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

C  Declarations for 'table.dat'	! Additional table with detailed information for
                               all cluster member detected for 362 PSZ2
                               optical counterparts mentioned in the tablea1.dat

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

C  J2000 position composed of: RAdeg DEdeg
      character*18  PSZ2_1     (nr__1) ! PSZ2 name (PSZ2 GLLL.ll+BB.bb)
      character*13  ID_1       (nr__1) ! Identifier for cluster member
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (J2000)
      integer*4     cz         (nr__1) ! (km/s) Measured velocity

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

C  Declarations for 'tablea2.dat'	! 26 clusters and groups beyond PSZ2

      integer*4 nr__2
      parameter (nr__2=26)	! Number of records
      character*111 ar__2  	! Full-size record

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

      character*18  Field      (nr__2) ! Field (PSZ2 GLLL.ll+BB.bb)
      integer*4     RAh_1      (nr__2) ! (h) Right ascension (J2000)
      integer*4     RAm_1      (nr__2) ! (min) Right ascension (J2000)
      real*4        RAs_1      (nr__2) ! (s) Right ascension (J2000)
      character*1   DE__1      (nr__2) ! Declination sign (J2000)
      integer*4     DEd_1      (nr__2) ! (deg) Declination (J2000)
      integer*4     DEm_1      (nr__2) ! (arcmin) Declination (J2000)
      real*4        DEs_1      (nr__2) ! (arcsec) Declination (J2000)
      integer*4     N1_5_1     (nr__2) ! Number of cluster members used to
*                                         determine the velocity dispersion for
*                                         aperture 1.5xr_200_
      integer*4     N1_1       (nr__2) ! ?=- Number of cluster members used to
*                                         determine the velocity dispersion for
*                                         aperture 1xr_200_
      real*4        z1_5_1     (nr__2) ! Redshift for aperture 1.5xr_200_
      real*4        z1_1       (nr__2) ! ?=- Redshift for aperture 1xr_200_
      real*4        zBCG_1     (nr__2) ! ?=- BCG redshift
      integer*4     sigma200_1_5_1(nr__2) ! (km/s) Velocity dispersion for
*                                         aperture 1.5xr_200_
      integer*4     e_sigma200_1_5_1(nr__2) ! (km/s) Velocity dispersion for
*                                         aperture 1.5xr_200_ error
      integer*4     sigma200_1_1(nr__2) ! (km/s) ?=- Velocity dispersion for
*                                         aperture 1xr_200_
      integer*4     e_sigma200_1_1(nr__2) ! (km/s) ? Velocity dispersion for
*                                         aperture 1xr_200_ error
      real*4        M500_1_5_1 (nr__2) ! (10+15Msun) Mass M500 for aperture 1.5xr_200_
      real*4        e_M500_1_5_1(nr__2) ! (10+15Msun) Mass M500 for aperture 1.5xr_200_ error
      real*4        M500_1_1   (nr__2) ! (10+15Msun) ?=- Mass M500 for aperture 1xr_200_
      real*4        e_M500_1_1 (nr__2) ! (10+15Msun) ? Mass M500 for aperture 1xr_200_ error
      character*5   DataSet_1  (nr__2) ! Data set (ITP13, LP15 or SDSS)

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

C  Loading file 'tablea1.dat'	! 362 PSZ2 optical counterparts presented in
*                               this paper

C  Format for file interpretation

    1 format(
     +  I4,A1,A1,1X,A18,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,
     +  I3,1X,I3,1X,F5.3,1X,F5.3,1X,F6.4,1X,I4,1X,I3,1X,I4,1X,I3,1X,
     +  F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,I1,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,362
        read(1,'(A132)')ar__
        read(ar__,1)
     +  ID(i__),m_ID(i__),n_ID(i__),PSZ2(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),N1_5(i__),
     +  N1(i__),z1_5(i__),z1(i__),zBCG(i__),sigma200_1_5(i__),
     +  e_sigma200_1_5(i__),sigma200_1(i__),e_sigma200_1(i__),
     +  M500_1_5(i__),e_M500_1_5(i__),M500_1(i__),e_M500_1(i__),
     +  M500SZ(i__),e_M500SZ(i__),Flag(i__),DataSet(i__)
        if (N1(i__) .EQ. 45) N1(i__) =  iNULL__
        if (idig(ar__(65:69)).EQ.0) z1(i__) =  rNULL__
        if (idig(ar__(71:76)).EQ.0) zBCG(i__) =  rNULL__
        if (sigma200_1(i__) .EQ. 45) sigma200_1(i__) =  iNULL__
        if(ar__(92:94) .EQ. '') e_sigma200_1(i__) = iNULL__
        if (idig(ar__(106:109)).EQ.0) M500_1(i__) =  rNULL__
        if(ar__(111:114) .EQ. '') e_M500_1(i__) = rNULL__
        if (idig(ar__(116:119)).EQ.0) M500SZ(i__) =  rNULL__
        if(ar__(121:124) .EQ. '') e_M500SZ(i__) = rNULL__
        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)
     +  ID(i__),m_ID(i__),n_ID(i__),PSZ2(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),N1_5(i__),
     +  N1(i__),z1_5(i__),z1(i__),zBCG(i__),sigma200_1_5(i__),
     +  e_sigma200_1_5(i__),sigma200_1(i__),e_sigma200_1(i__),
     +  M500_1_5(i__),e_M500_1_5(i__),M500_1(i__),e_M500_1(i__),
     +  M500SZ(i__),e_M500SZ(i__),Flag(i__),DataSet(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 'table.dat'	! Additional table with detailed information for
*                               all cluster member detected for 362 PSZ2
*                               optical counterparts mentioned in the tablea1.dat

C  Format for file interpretation

    2 format(A18,1X,A13,1X,F9.5,1X,F9.5,1X,I6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table.dat')
      write(6,*) '....Loading file: table.dat'
      do i__=1,13637
        read(1,'(A59)')ar__1
        read(ar__1,2)
     +  PSZ2_1(i__),ID_1(i__),RAdeg_1(i__),DEdeg_1(i__),cz(i__)
c    ..............Just test output...........
        write(6,2)
     +  PSZ2_1(i__),ID_1(i__),RAdeg_1(i__),DEdeg_1(i__),cz(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! 26 clusters and groups beyond PSZ2

C  Format for file interpretation

    3 format(
     +  A18,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I2,1X,I2,1X,
     +  F5.3,1X,F5.3,1X,F6.4,1X,I4,1X,I3,1X,I4,1X,I3,1X,F4.2,1X,F4.2,
     +  1X,F4.2,1X,F4.2,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,26
        read(1,'(A111)')ar__2
        read(ar__2,3)
     +  Field(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),N1_5_1(i__),N1_1(i__),
     +  z1_5_1(i__),z1_1(i__),zBCG_1(i__),sigma200_1_5_1(i__),
     +  e_sigma200_1_5_1(i__),sigma200_1_1(i__),e_sigma200_1_1(i__),
     +  M500_1_5_1(i__),e_M500_1_5_1(i__),M500_1_1(i__),
     +  e_M500_1_1(i__),DataSet_1(i__)
        if (N1_1(i__) .EQ. 45) N1_1(i__) =  iNULL__
        if (idig(ar__2(56:60)).EQ.0) z1_1(i__) =  rNULL__
        if (idig(ar__2(62:67)).EQ.0) zBCG_1(i__) =  rNULL__
        if (sigma200_1_1(i__) .EQ. 45) sigma200_1_1(i__) =  iNULL__
        if(ar__2(83:85) .EQ. '') e_sigma200_1_1(i__) = iNULL__
        if (idig(ar__2(97:100)).EQ.0) M500_1_1(i__) =  rNULL__
        if(ar__2(102:105) .EQ. '') e_M500_1_1(i__) = rNULL__
        RAdeg_2(i__) = rNULL__
        DEdeg_2(i__) = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_2(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_2(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_2(i__).GE.0) DEdeg_2(i__)=-DEdeg_2(i__)
c    ..............Just test output...........
        write(6,3)
     +  Field(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),N1_5_1(i__),N1_1(i__),
     +  z1_5_1(i__),z1_1(i__),zBCG_1(i__),sigma200_1_5_1(i__),
     +  e_sigma200_1_5_1(i__),sigma200_1_1(i__),e_sigma200_1_1(i__),
     +  M500_1_5_1(i__),e_M500_1_5_1(i__),M500_1_1(i__),
     +  e_M500_1_1(i__),DataSet_1(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_2(i__),DEdeg_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end