FORTRAN Generation
(/./ftp/cats/J/ApJ/443/124)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/443/124 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 2024-Apr-19
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/ApJ/443/124               Radial Velocities of Stars in M4    (Peterson+ 1995)
*================================================================================
*Radial Velocities of Stars in the Globular Cluster M4 and the Cluster Distance
*     Peterson R.C., Rees R.F., Cudworth K.M.
*    <Astrophys. J. 443, 124 (1995)>
*    =1995ApJ...443..124P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Velocities for M4 members

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

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

      integer*4     RAh         ! (h) Right ascension (equinox 1950.0)
      integer*4     RAm         ! (min) R.A.
      real*4        RAs         ! (s) R.A.
      character*1   DE_         ! Declination sign
      integer*4     DEd         ! (deg) Declination (equinox 1950.0)
      integer*4     DEm         ! (arcmin) Dec.
      real*4        DEs         ! (arcsec) Dec.
      real*4        Dist        ! (arcmin) Radial distance from cluster center
      real*4        PA          ! (deg) Position angle positive north through east
      real*4        Vmag        ! (mag) V magnitude
      real*4        B_V         ! (mag) B-V color
      real*8        Date        ! (d) *Julian date of each observation
      real*4        RV          ! (km/s) *Measured radial velocity
      real*4        e_RV        ! (km/s) *Internal uncertainty in RV
      integer*4     Memb        ! (%) []?=-1 Percent probability of membership
      character*12  ID          ! *Identification
*Note on Date:
*  Julian date of each observation, or that of the first observation
*  if the star was observed twice or more.
*Note on RV:
*  For all multiply observed stars, this is the weighted mean of the
*  set of observations in Table 3.
*Note on e_RV:
*  The uncertainty is derived from the ratio R of the height of the
*  cross-correlation peak relative to a typical noise fluctuation,
*  according to the Tonry & Davis [1979, AJ, 84, 1511] formula
*  sigma_R = K/(1+R) (in km/s), with K=8.3 for sharp-lined spectra
*  obtained with the Mount Hopkins echelle spectrographs.
*Note on ID:
*  Star Name: Lee (1977, A&AS, 27, 367) number, no prefix;
*             Sawyer-Hogg (1973, Pub. DDO, 3, No. 6) variable, prefix V;
*             Alcaino (1975, A&AS, 21, 5) single letter or prefix A;
*             Greenstein (1939, ApJ, 90, 387) prefix G

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

C  Declarations for 'table2.dat'	! *Velocities for M4 nonmembers

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

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

      integer*4     RAh_1       ! (h) Right ascension (equinox 1950.0)
      integer*4     RAm_1       ! (min) R.A.
      real*4        RAs_1       ! (s) R.A.
      character*1   DE__1       ! Declination sign
      integer*4     DEd_1       ! (deg) Declination (equinox 1950.0)
      integer*4     DEm_1       ! (arcmin) Dec.
      real*4        DEs_1       ! (arcsec) Dec.
      real*4        Dist_1      ! (arcmin) Radial distance from cluster center
      real*4        PA_1        ! (deg) Position angle positive north through east
      real*4        Vmag_1      ! (mag) V magnitude
      real*4        B_V_1       ! (mag) B-V color
      real*8        Date_1      ! (d) Julian date of each observation
      real*4        RV_1        ! (km/s) Measured radial velocity
      real*4        e_RV_1      ! (km/s) Internal uncertainty in RV
      integer*4     Memb_1      ! (%) []? Percent probability of membership
      character*9   ID_1        ! Identification

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

C  Declarations for 'table3.dat'	! Duplicate velocities

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

      real*8        Date_2      ! (d) Julian date of each observation
      real*4        RV_2        ! (km/s) Measured radial velocity
      real*4        e_RV_2      ! (km/s) Internal uncertainty in RV
      character*4   ID_2        ! Number from Lee 1977, A&AS, 27, 367

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

C  Declarations for 'table5.dat'	! Proper-motion data superseding Table 3 of
                                 Cudworth & Rees =1990AJ.....99.1491C

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

      character*16  Names       ! *Star names
      real*8        X           ! (arcsec) *X coordinate relative to cluster center
      real*8        Y           ! (arcsec) *Y coordinate relative to cluster center
      integer*4     mu_x        ! (0.01mas/yr) Relative proper motion in X coordinate
      integer*4     e_mu_x      ! (0.01mas/yr) Standard error in mu_x
      integer*4     mu_y        ! (0.01mas/yr) Relative proper motion in Y coordinate
      integer*4     e_mu_y      ! (0.01mas/yr) Standard error in mu_y
      real*8        Vmag_2      ! (mag) V magnitude
      real*4        B_V_2       ! (mag) B-V color
      integer*4     Pr          ! (%) Probability of membership based on
*                                       relative proper motion
*Note on Names:
*  Lee (1977, A&AS, 27, 367) number, no prefix; Sawyer-Hogg (1973, Pub.
*  DDO, 3, No. 6) variable, prefix V; Alcaino (1975, A&AS, 21 5), single
*  letter or prefix A; Alcaino and Liller (1984), AL -- second number is
*  ring number; Zinn et al. (1972) UV-bright star, Z; Greenstein (1939,
*  ApJ, 90, 387), prefix G
*Note on X, Y:
*  X and Y coordinates (arcsec) relative to the cluster center of Shawl
*  and White (1986, AJ, 91, 312) and oriented along right ascension and
*  declination for equator and equinox 1950

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

C  Loading file 'table1.dat'	! Velocities for M4 members

C  Format for file interpretation

    1 format(
     +  I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F5.2,1X,F5.1,2X,
     +  F5.2,F5.2,2X,F10.2,2X,F5.2,F5.2,I3,2X,A12)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,182
        read(1,'(A88)')ar__
        read(ar__,1)
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs,Dist,PA,Vmag,B_V,Date,RV,e_RV,
     +  Memb,ID
        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)
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs,Dist,PA,Vmag,B_V,Date,RV,e_RV,
     +  Memb,ID
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! *Velocities for M4 nonmembers

C  Format for file interpretation

    2 format(
     +  I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,F6.2,1X,F5.1,2X,F5.2,
     +  F5.2,2X,F10.2,1X,F6.2,1X,F4.2,I3,2X,A9)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,11
        read(1,'(A85)')ar__1
        read(ar__1,2)
     +  RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Dist_1,PA_1,Vmag_1,
     +  B_V_1,Date_1,RV_1,e_RV_1,Memb_1,ID_1
        if(ar__1(72:74) .EQ. '') Memb_1 = iNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Dist_1,PA_1,Vmag_1,
     +  B_V_1,Date_1,RV_1,e_RV_1,Memb_1,ID_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Duplicate velocities

C  Format for file interpretation

    3 format(F10.2,1X,F6.2,1X,F4.2,2X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,93
        read(1,'(A28)')ar__2
        read(ar__2,3)Date_2,RV_2,e_RV_2,ID_2
c    ..............Just test output...........
        write(6,3)Date_2,RV_2,e_RV_2,ID_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Proper-motion data superseding Table 3 of
*                                 Cudworth & Rees =1990AJ.....99.1491C

C  Format for file interpretation

    4 format(A16,1X,F7.1,F7.1,I6,I4,I6,I4,F7.2,F6.2,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,531
        read(1,'(A68)')ar__3
        read(ar__3,4)Names,X,Y,mu_x,e_mu_x,mu_y,e_mu_y,Vmag_2,B_V_2,Pr
c    ..............Just test output...........
        write(6,4)Names,X,Y,mu_x,e_mu_x,mu_y,e_mu_y,Vmag_2,B_V_2,Pr
c    .......End.of.Just test output...........
      end do
      close(1)

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