FORTRAN Generation
(/./ftp/cats/J/A_A/597/A114)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/597/A114 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-20
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/597/A114     Hi-GAL cluster candidates physical properties (Beuret+, 2017)
*================================================================================
*Source clustering in the Hi-GAL survey determined using a minimum spanning tree
*method.
*    Beuret M., Billot N., Cambresy L., Eden D.J., Elia D., Molinari S.,
*    Pezzuto S., Schisano E.
*   <Astron. Astrophys. 597, A114 (2017)>
*   =2017A&A...597A.114B (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Reliable cluster candidates

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

C  Position composed of: GLON GLAT
      character*12  Name        ! Cluster candidate name
      real*4        GLON        ! (deg) Galactic longitude
      real*4        GLAT        ! (deg) Galactic latitude
      real*4        amaj        ! (arcmin) Major axis
      real*4        bmin        ! (arcmin) Minor axis
      real*4        PA          ! (deg) Position angle
      real*4        Dpeak       ! (kpc) Heliocentric distance estimated from the peak
*                                   of the heliocentric distance estimates
*                                   histogram of the clumps
      real*4        Dmean       ! (kpc) Mean of the heliocentric distance estimates of
*                                   the clumps
      real*4        Dgal        ! (kpc) Galactocentric distance (1)
      real*8        Z           ! (pc) Scale height (2)
      real*4        Lamaj       ! (pc) Linear major axis (2)
      real*4        Lbmin       ! (pc) Linear minor axis (2)
      real*4        Dens        ! (pc-2) Surface density
      integer*4     Nclumps     ! Number of clumps
      real*4        Rclumps     ! ?=- Ratio of the number of pre-stellar
*                                   clumps over proto-stellar clumps
      character*1   n_Rclumps   ! [ab] Note when no value (3)
      character*15  HII         ! Closest HII region (4)
      integer*4     Flag        ! [1,2]? Catalog flag (5)
*Note (1): Compute with Dpeak and R_0_=8.5kpc.
*Note (2): Compute with Dpeak.
*Note (3): Note as follows:
*    a = no pre-stellar clumps
*    b = no proto-stellar clumps
*Note (4): "Closest" means that at least one clump is located in the radius of
*  the HII region.
*Note (5): HII regions belong to two catalogs as follows:
*          1 = Anderson et al. (2014ApJS..212....1A, Cat. J/ApJS/212/1)
*          2 = Paladini et al. (2003A&A...397..213P, Cat. J/A+A/397/213)

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

C  Declarations for 'table2.dat'	! Potential cluster candidates

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

C  Position composed of: GLON GLAT
      character*12  Name_1      ! Cluster candidate name
      real*4        GLON_1      ! (deg) Galactic longitude
      real*4        GLAT_1      ! (deg) Galactic latitude
      real*4        amaj_1      ! (arcmin) Major axis
      real*4        bmin_1      ! (arcmin) Minor axis
      real*4        PA_1        ! (deg) Position angle
      real*4        Dens_1      ! (arcmin-2) Surface density
      integer*4     Nclumps_1   ! Number of clumps
      real*4        Rclumps_1   ! ?=- Ratio of the number of pre-stellar
*                                    clumps over proto-stellar clumps
      character*1   n_Rclumps_1 ! [ab] Note when no value (1)
      character*3   Flag_1      ! [NDA, SD, SCC] Classification flag (2)
*Note (1): Note as follows:
*    a = no pre-stellar clumps
*    b = no proto-stellar clumps
*Note (2): Classification of the potential cluster candidates as follows:
*   NDA = No Distance Available, classifies sources without HDE
*   SD  = Spread Distance, cluster to which no particular distance can be
*          assigned as there are only a few clumps with HDEs and these HDEs
*          show some spread
*   SCC = Satisfying Compactness Criteria, more reliable cluster candidates but
*          with a confused line of sight

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

C  Loading file 'table1.dat'	! Reliable cluster candidates

C  Format for file interpretation

    1 format(
     +  A12,2X,F6.2,2X,F5.2,2X,F5.2,2X,F5.2,2X,F6.2,2X,F5.2,2X,F5.2,
     +  2X,F5.2,2X,F7.2,2X,F5.2,2X,F5.2,2X,F4.2,2X,I3,2X,F5.2,A1,1X,
     +  A15,2X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,496
        read(1,'(A131)')ar__
        read(ar__,1)
     +  Name,GLON,GLAT,amaj,bmin,PA,Dpeak,Dmean,Dgal,Z,Lamaj,Lbmin,
     +  Dens,Nclumps,Rclumps,n_Rclumps,HII,Flag
        if (idig(ar__(107:111)).EQ.0) Rclumps =  rNULL__
        if(ar__(131:131) .EQ. '') Flag = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,GLON,GLAT,amaj,bmin,PA,Dpeak,Dmean,Dgal,Z,Lamaj,Lbmin,
     +  Dens,Nclumps,Rclumps,n_Rclumps,HII,Flag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Potential cluster candidates

C  Format for file interpretation

    2 format(
     +  A12,2X,F6.2,2X,F5.2,2X,F5.2,2X,F5.2,2X,F6.2,2X,F4.2,2X,I3,2X,
     +  F5.2,A1,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,1137
        read(1,'(A72)')ar__1
        read(ar__1,2)
     +  Name_1,GLON_1,GLAT_1,amaj_1,bmin_1,PA_1,Dens_1,Nclumps_1,
     +  Rclumps_1,n_Rclumps_1,Flag_1
        if (idig(ar__1(63:67)).EQ.0) Rclumps_1 =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1,GLON_1,GLAT_1,amaj_1,bmin_1,PA_1,Dens_1,Nclumps_1,
     +  Rclumps_1,n_Rclumps_1,Flag_1
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