FORTRAN Generation
(/./ftp/cats/J/A_A/665/A57)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/665/A57 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-May-17
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/665/A57  Substructure in the stellar halo near the Sun. I. (Lovdal+, 2022)
*================================================================================
*Substructure in the stellar halo near the Sun.
*I. Data-driven clustering in integrals-of-motion space.
*    Lovdal S.S., Ruiz-Lara T., Koppelman H.H., Matsuno T., Dodd E., Helmi A.
*    <Astron. Astrophys. 665, A57 (2022)>
*    =2022A&A...665A..57L        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Spatial location and extent of the extracted
                                 clusters

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

      integer*4     Label       ! [1/68] Cluster label
      real*8        signi       ! [3.01/13.17] Statistical significance
*                                   according to Eq. 3
      integer*4     Norig       ! [12/2137] Number of original members
*                                   according to the single linkage procedure
      integer*4     NDcut       ! [9/3032] Number of stars for which this
*                                   cluster is the closest, considering at most a
*                                   Mahalanobis distance of 2.13
      real*8        mu0         ! [-0.95/0.8] Mean energy, E
      real*8        mu1         ! [-0.99/0.42] Mean  perpendicular momentum,
*                                   Lperp
      real*8        mu2         ! [-0.64/0.86] Mean angular momentum in
*                                   z-direction, Lz
      real*4        sigma00     ! [0.00/0.03] Variance in E
      real*4        sigma01     ! [-0.01/0.01] Covariance between E and Lperp
      real*4        sigma02     ! [-0.01/0.01] Covariance between E and Lz
      real*4        sigma11     ! [0.00/0.02] Variance in Lperp
      real*4        sigma12     ! [-0.01/0.01] Covariance between Lperp and Lz
      real*4        sigma22     ! [0.00/0.01] Variance in Lz

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

C  Declarations for 'table2.dat'	! Halo star catalogue with corresponding cluster
                                 labels

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

      integer*8     GaiaEDR3    ! Gaia EDR3 source_id
      real*4        x           ! [-2.5/2.5] x-coordinate
      real*4        y           ! [-2.46/2.48] y-coordinate
      real*4        z           ! [-2.46/2.5] z-coordinate
      real*8        vx          ! (km/s) [-571/498] x-component of velocity vector
      real*8        vy          ! (km/s) [-779/272] y-component of velocity vector
      real*8        vz          ! (km/s) [-525/516] z-component of velocity vector
      real*8        E           ! (km2/s2) [-169824/-69] Energy
      real*8        Lperp       ! (kpc.km/s) [0/4287] Perpendicular angular momentum
      real*8        Lz          ! (kpc.km/s) [-4504/4588] Angular momentum in z-direction
      real*8        signi_1     ! Significance of the cluster corresponding
*                                     to Labelorig
      integer*4     Labelorig   ! [0/68] Cluster label according to the
*                                     original single linkage assignment
      integer*4     LabelDcut   ! [0/68] Closest cluster according to a
*                                     Mahalanobis distance of at least 2.13
      real*8        D           ! Mahalanobis distance to the cluster
*                                     corresponding to Labelorig

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

C  Loading file 'table1.dat'	! Spatial location and extent of the extracted
*                                 clusters

C  Format for file interpretation

    1 format(
     +  I2,1X,F19.16,1X,I4,1X,I4,1X,F20.17,1X,F20.17,1X,F22.19,1X,
     +  E22.17,1X,E24.17,1X,E24.17,1X,E22.17,1X,E24.17,1X,E21.16)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,68
        read(1,'(A240)')ar__
        read(ar__,1)
     +  Label,signi,Norig,NDcut,mu0,mu1,mu2,sigma00,sigma01,sigma02,
     +  sigma11,sigma12,sigma22
c    ..............Just test output...........
        write(6,1)
     +  Label,signi,Norig,NDcut,mu0,mu1,mu2,sigma00,sigma01,sigma02,
     +  sigma11,sigma12,sigma22
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Halo star catalogue with corresponding cluster
*                                 labels

C  Format for file interpretation

    2 format(
     +  I19,1X,E24.17,1X,E24.17,1X,E23.16,1X,F23.18,1X,F23.18,1X,
     +  F24.19,1X,F22.14,1X,F22.17,1X,F24.18,1X,F19.16,1X,I2,1X,I2,1X,
     +  F19.17)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,51671
        read(1,'(A283)')ar__1
        read(ar__1,2)
     +  GaiaEDR3,x,y,z,vx,vy,vz,E,Lperp,Lz,signi_1,Labelorig,
     +  LabelDcut,D
c    ..............Just test output...........
        write(6,2)
     +  GaiaEDR3,x,y,z,vx,vy,vz,E,Lperp,Lz,signi_1,Labelorig,
     +  LabelDcut,D
c    .......End.of.Just test output...........
      end do
      close(1)

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