FORTRAN Generation
(/./ftp/cats/J/ApJS/247/12)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/247/12 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 2026-Oct-09
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/ApJS/247/12    Strong lens models for 37 clusters from SGAS    (Sharon+, 2020)
*================================================================================
*Strong lens models for 37 clusters of galaxies from the SDSS Giant Arcs Survey.
*    Sharon K., Bayliss M.B., Dahle H., Dunham S.J., Florian M.K., Gladders M.D.,
*    Johnson T.L., Mahler G., Paterno-Mahler R., Rigby J.R., Whitaker K.E.,
*    Akhshik M., Koester B.P., Murray K., Remolina Gonzalez J.D., Wuyts E.
*   <Astrophys. J. Suppl. Ser., 247, 12 (2020)>
*   =2020ApJS..247...12S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! HST-GO-13003 observations

      integer*4 nr__
      parameter (nr__=37)	! Number of records
      character*94 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)

      character*15  Cluster     ! Cluster identifier (SDSS JHHMM+DDMM)
      integer*4     RAh         ! (h) Hour of right ascension (J2000)
      integer*4     RAm         ! (min) Minute of right ascension (J2000)
      integer*4     RAs         ! (s) Second of right ascension (J2000)
      character*1   DE_         ! Sign of 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)
      character*11  Date        ! ("date") UT date of HST/WFC3 observation
      integer*4     F390W       ! (s) [2256/2420]? Exposure time in WFC3 F390W filter
      integer*4     F475W       ! (s) [2380/2400]? Exposure time in WFC3 F475W filter
      integer*4     F606W       ! (s) [1440/2436]? Exposure time in WFC3 F606W filter
      integer*4     F775W       ! (s) [2380/2424]? Exposure time in WFC3 F775W filter
      integer*4     F814W       ! (s) [1964/2424]? Exposure time in WFC3 F814W filter
      integer*4     F105W       ! (s) [1112/1112]? Exposure time in WFC3 F105W filter
      integer*4     F110W       ! (s) [1112/1112]? Exposure time in WFC3 F110W filter
      integer*4     F125W       ! (s) [1112/1112]? Exposure time in WFC3 F125W filter
      integer*4     F160W       ! (s) [912/1212]  Exposure time in WFC3 F160W filter

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

C  Declarations for 'table2.dat'	! Cluster properties

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

      integer*4     Seq         ! [1/37] Running sequence number
      character*15  Cluster_1   ! Cluster identifier (SDSS JHHMM+DDMM)
      real*8        z           ! [0.17/0.7] Spectroscopic redshift (1)
      real*8        e_z         ! [3e-5/0.009]? z uncertainty
      integer*4     sigma       ! (km/s) [556/1597]? Velocity dispersion
      integer*4     e_sigma     ! (km/s) [69/410]? sigma uncertainty
      integer*4     Nsp         ! [1/48] Number of spectra used (2)
      real*4        M200        ! (10+14Msun) [1.5/35.7]? Mass M_200_ (3)
      real*4        e_M200      ! (10+14Msun) [0.5/20]? Negative uncertainty on M200
      real*4        E_M200_1    ! (10+14Msun) [0.7/32]? Positive uncertainty on M200
      character*26  r_z         ! Spectroscopic reference (4)
      real*4        thetaE      ! (arcsec) [1.4/23.1]? Einstein radius (5)
*Note (1): Where spectroscopic redshifts are available for several cluster-member
*    galaxies, we define the cluster redshift as the mean redshift of these
*    galaxies. Otherwise, the redshift of the cluster is assumed to be the
*    redshift of the brightest cluster galaxy (BCG).
*Note (2): The number of unique cluster-member galaxies with spectroscopic
*    redshifts that were used to compute the velocity dispersion. We used
*    the Gapper estimator for clusters with Nsp<15 and the bi-weight sample
*    variance otherwise (see Section 3.2).
*Note (3): M_200_ masses were calculated from the velocity dispersions based on
*    the scaling relations found by Evrard+ (2008ApJ...672..122E).
*Note (4): References for spectroscopic redshift measurements of cluster
*    galaxies are as follows:
*    Carrasco+17 = Carrasco+ (2017, J/ApJ/834/210),
*    Bayliss+11  = Bayliss+ (2011, J/ApJS/193/8)
*    Bayliss+14  = Bayliss+ 2014ApJ...790..144B
*    Irwin+15    = Irwin+ (2015, J/ApJ/806/268),
*    Johnson+17  = Johnson+ (2017ApJ...843...78J),
*    Kubo+10     = Kubo+ (2010ApJ...724L.137K),
*    Stark+13    = Stark+ (2013MNRAS.436.1040S)
*    SDSS DR12   = Alam+, 2015, V/147
*Note (5): The effective Einstein radii ({theta}_E_) for a source at redshift
*    z_s_=2, from the best-fit lens model derived by this work. {theta}_E_
*    is calculated as (A/{pi})^0.5 where A is the area enclosed by the
*    tangential critical curve.

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

C  Declarations for 'table3.dat'	! Summary of spectroscopic observations

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

      character*15  Cluster_2   ! Cluster identifier (SDSS JHHMM+DDMM)
      character*24  Tel         ! Telescope / Instrument for the spectroscopic
*                                   observation(s) if any
      character*30  sDate       ! Date(s) of spectroscopic observation(s)
      character*27  sExp        ! (s) Exposure time(s) for sDate(s)
      character*13  PID         ! Spectroscopic program ID

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

C  Declarations for 'lensing.dat'	! List of lensing constraints for the 37 clusters
                              (Tables 4-10)

      integer*4 nr__3
      parameter (nr__3=668)	! Number of records
      character*149 ar__3  	! Full-size record

C  J2000 position composed of: RAdeg DEdeg
      character*15  Cluster_3   ! Cluster identifier (SDSS JHHMM+DDMM)
      character*7   ID          ! Image identifier (1)
      real*8        RAdeg_1     ! (deg) [1.2/341] Right Ascension (J2000)
      real*8        DEdeg_1     ! (deg) [-9.7/65] Declination (J2000)
      real*8        zspec       ! [0/5.2]? Spectroscopic redshift
      character*28  r_zspec     ! Reference for zspec (2)
      character*61  Notes       ! Additional notes
*Note (1): The IDs of images of lensed galaxies are labeled as AB.X where A is
*          a number or a letter indicating the source ID (or system name); B is
*          a number or a letter indicating the ID of the emission knot within
*          the system; and X is a number indicating the ID of the lensed image
*          within the multiple image family.
*Note (2): References are as follows:
*  Bayliss+10 = 2010ApJ...720.1559B
*  Bayliss+11 = 2011ApJS..193....8B (Cat. J/ApJS/193/8)
*  Bayliss+12 = 2012ApJ...744..156B
*  Bayliss+14 = 2014ApJ...790..144B
*    Diehl+09 = 2009ApJ...707..686D
*  Johnson+17 = 2017ApJ...843...78J
*  Koester+10 = 2010ApJ...723L..73K
*     Kubo+10 = 2010ApJ...724L.137K
*     Ofek+08 = 2008MNRAS.389..311O
*    Rigby+18 = 2018AJ....155..104R (Cat. J/AJ/155/104)
*    Stark+13 = 2013MNRAS.436.1040S

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

C  Declarations for 'table11.dat'	! List of spectroscopic redshifts; updated version
                              sent by the author

      integer*4 nr__4
      parameter (nr__4=158)	! Number of records
      character*86 ar__4  	! Full-size record

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

      character*15  Cluster_4   ! Cluster identifier (SDSS JHHMM+DDMM)
      integer*4     RAh_1       ! (h) Hour of right ascension (J2000)
      integer*4     RAm_1       ! (min) Minute of right ascension (J2000)
      real*4        RAs_1       ! (s) Second of right ascension (J2000)
      character*1   DE__1       ! Sign of declination (J2000)
      integer*4     DEd_1       ! (deg) Degree of declination (J2000)
      integer*4     DEm_1       ! (arcmin) Arcminute of declination (J2000)
      real*4        DEs_1       ! (arcsec) Arcsecond of declination (J2000)
      real*8        z_1         ! [0.18/0.7] Spectroscopic redshift
*                                   of cluster-member galaxies
      character*34  r_z_1       ! Reference or Observation ID

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

C  Loading file 'table1.dat'	! HST-GO-13003 observations

C  Format for file interpretation

    1 format(
     +  A15,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,F5.2,1X,A11,1X,I4,1X,
     +  I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,37
        read(1,'(A94)')ar__
        read(ar__,1)
     +  Cluster,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Date,F390W,F475W,F606W,
     +  F775W,F814W,F105W,F110W,F125W,F160W
        if(ar__(51:54) .EQ. '') F390W = iNULL__
        if(ar__(56:59) .EQ. '') F475W = iNULL__
        if(ar__(61:64) .EQ. '') F606W = iNULL__
        if(ar__(66:69) .EQ. '') F775W = iNULL__
        if(ar__(71:74) .EQ. '') F814W = iNULL__
        if(ar__(76:79) .EQ. '') F105W = iNULL__
        if(ar__(81:84) .EQ. '') F110W = iNULL__
        if(ar__(86:89) .EQ. '') F125W = 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)
     +  Cluster,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Date,F390W,F475W,F606W,
     +  F775W,F814W,F105W,F110W,F125W,F160W
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Cluster properties

C  Format for file interpretation

    2 format(
     +  I2,1X,A15,1X,F7.5,1X,F7.5,1X,I4,1X,I3,1X,I2,1X,F4.1,1X,F4.1,
     +  1X,F4.1,1X,A26,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,37
        read(1,'(A93)')ar__1
        read(ar__1,2)
     +  Seq,Cluster_1,z,e_z,sigma,e_sigma,Nsp,M200,e_M200,E_M200_1,
     +  r_z,thetaE
        if(ar__1(28:34) .EQ. '') e_z = rNULL__
        if(ar__1(36:39) .EQ. '') sigma = iNULL__
        if(ar__1(41:43) .EQ. '') e_sigma = iNULL__
        if(ar__1(48:51) .EQ. '') M200 = rNULL__
        if(ar__1(53:56) .EQ. '') e_M200 = rNULL__
        if(ar__1(58:61) .EQ. '') E_M200_1 = rNULL__
        if(ar__1(90:93) .EQ. '') thetaE = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Seq,Cluster_1,z,e_z,sigma,e_sigma,Nsp,M200,e_M200,E_M200_1,
     +  r_z,thetaE
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Summary of spectroscopic observations

C  Format for file interpretation

    3 format(A15,1X,A24,1X,A30,1X,A27,1X,A13)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,28
        read(1,'(A113)')ar__2
        read(ar__2,3)Cluster_2,Tel,sDate,sExp,PID
c    ..............Just test output...........
        write(6,3)Cluster_2,Tel,sDate,sExp,PID
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'lensing.dat'	! List of lensing constraints for the 37 clusters
*                              (Tables 4-10)

C  Format for file interpretation

    4 format(A15,1X,A7,1X,F12.8,1X,F12.9,1X,F8.6,1X,A28,1X,A61)

C  Effective file loading

      open(unit=1,status='old',file=
     +'lensing.dat')
      write(6,*) '....Loading file: lensing.dat'
      do i__=1,668
        read(1,'(A149)')ar__3
        read(ar__3,4)Cluster_3,ID,RAdeg_1,DEdeg_1,zspec,r_zspec,Notes
        if(ar__3(51:58) .EQ. '') zspec = rNULL__
c    ..............Just test output...........
        write(6,4)Cluster_3,ID,RAdeg_1,DEdeg_1,zspec,r_zspec,Notes
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table11.dat'	! List of spectroscopic redshifts; updated version
*                              sent by the author

C  Format for file interpretation

    5 format(
     +  A15,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F6.3,1X,F8.6,1X,A34)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table11.dat')
      write(6,*) '....Loading file: table11.dat'
      do i__=1,158
        read(1,'(A86)')ar__4
        read(ar__4,5)
     +  Cluster_4,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,z_1,r_z_1
        RAdeg_2 = rNULL__
        DEdeg_2 = 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 .GT. -180) RAdeg_2=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_2=RAdeg_2+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_2=RAdeg_2+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_2=DEd_1
        if(DEm_1 .GE. 0) DEdeg_2=DEdeg_2+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_2=DEdeg_2+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_2.GE.0) DEdeg_2=-DEdeg_2
c    ..............Just test output...........
        write(6,5)
     +  Cluster_4,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,z_1,r_z_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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