FORTRAN Generation
(/./ftp/cats/J/A_A/660/A4)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/660/A4 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-08
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/660/A4        Gaia EDR3 new Galactic open clusters            (Hao+, 2022)
*================================================================================
*Newly detected open clusters in the Galactic disk using Gaia EDR3.
*    Hao C.J., Xu Y., Wu Z.Y., Lin Z.H., Liu D.J., Li Y.J.
*    <Astron. Astrophys. 660, A4 (2022)>
*    =2022A&A...660A...4H        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Mean parameters for the reported open clusters

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

C  Position composed of: RAdeg DEdeg (Epoch=2016.0)
      character*7   Cluster     ! Cluster name (OC-NNNN)
      real*8        RAdeg       ! (deg) Mean Right Ascension (ICRS) at Ep=2016.0
      real*8        e_RAdeg     ! (deg) Right Ascension standard deviation
      real*8        DEdeg       ! (deg) Mean Declination (ICRS) at Ep=2016.0
      real*8        e_DEdeg     ! (deg) Declination standard deviation
      real*8        GLON        ! (deg) Mean Galactic longitude
      real*8        e_GLON      ! (deg) Galactic longitude standard deviation
      real*8        GLAT        ! (deg) Mean Galactic latitude
      real*8        e_GLAT      ! (deg) Galactic latitude standard deviation
      real*8        adeg        ! (deg) Apparent angular size
      real*8        plx         ! (mas) Mean Parallax
      real*8        e_plx       ! (mas) Parallax standard deviation
      real*8        pmRA        ! (mas/yr) Mean Proper motion in right ascension
      real*8        e_pmRA      ! (mas/yr) Proper motion in right ascension
*                                      standard deviation
      real*8        pmDE        ! (mas/yr) Mean Proper motion in declination
      real*8        e_pmDE      ! (mas/yr) Proper motion in declination
*                                      standard deviation
      real*4        age         ! (yr) Cluster age
      real*4        e_age       ! (yr) Error of Cluster age
      real*4        AG          ! (mag) Extinction
      real*4        Z           ! Metal fraction of cluster
      real*8        RV          ! (km/s) ?=- Mean radial velocity
      real*8        s_RV        ! (km/s) ?=- Standard deviation of RV
      integer*4     N           ! Number of members found
      integer*4     o_RV        ! Number of members used to compute
*                                      mean radial velocity

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

C  Declarations for 'table2.dat'	! Members for the reported open clusters

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

C  Position composed of: RAdeg DEdeg (Epoch=2016.0)
      integer*8     GaiaEDR3    ! Gaia source_id (rounded numbers
*                                        to last 2 digits)
      real*8        RAdeg_1     ! (deg) Right Ascension (ICRS) at ep=2016.0
      real*8        DEdeg_1     ! (deg) Declination (ICRS) at ep=2016.0
      real*8        GLON_1      ! (deg) Galactic longitude
      real*8        GLAT_1      ! (deg) Galactic latitude
      real*8        plx_1       ! (mas) Parallax
      real*8        pmRA_1      ! (mas/yr) Proper motion in right ascension
      real*8        pmDE_1      ! (mas/yr) Proper motion in declination
      real*8        RV_1        ! (km/s) ?=0 Radial velocity
      real*8        e_RV        ! (km/s) ?=0 Error of Radial velocity
      real*8        Gmag        ! (mag) Gaia G magnitude
      real*8        BP_RP       ! (mag) ?=0 Gaia BP-RP colour index
      character*7   Cluster_1   ! Cluster name (OC-NNNN)

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

C  Loading file 'table1.dat'	! Mean parameters for the reported open clusters

C  Format for file interpretation

    1 format(
     +  A7,1X,F12.8,1X,F10.8,1X,F12.8,1X,F10.8,1X,F12.8,1X,F10.8,1X,
     +  F12.8,1X,F10.8,1X,F10.8,1X,F10.8,1X,F10.8,1X,F12.8,1X,F10.8,
     +  1X,F12.8,1X,F10.8,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.3,1X,F12.8,1X,
     +  F12.8,1X,I3,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,704
        read(1,'(A237)')ar__
        read(ar__,1)
     +  Cluster,RAdeg,e_RAdeg,DEdeg,e_DEdeg,GLON,e_GLON,GLAT,e_GLAT,
     +  adeg,plx,e_plx,pmRA,e_pmRA,pmDE,e_pmDE,age,e_age,AG,Z,RV,s_RV,
     +  N,o_RV
        if (idig(ar__(207:218)).EQ.0) RV =  rNULL__
        if (idig(ar__(220:231)).EQ.0) s_RV =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Cluster,RAdeg,e_RAdeg,DEdeg,e_DEdeg,GLON,e_GLON,GLAT,e_GLAT,
     +  adeg,plx,e_plx,pmRA,e_pmRA,pmDE,e_pmDE,age,e_age,AG,Z,RV,s_RV,
     +  N,o_RV
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Members for the reported open clusters

C  Format for file interpretation

    2 format(
     +  2X,I19,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F10.8,1X,F12.8,
     +  1X,F12.8,1X,F13.8,1X,F11.8,1X,F11.8,1X,F11.8,1X,A7)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,19425
        read(1,'(A168)')ar__1
        read(ar__1,2)
     +  GaiaEDR3,RAdeg_1,DEdeg_1,GLON_1,GLAT_1,plx_1,pmRA_1,pmDE_1,
     +  RV_1,e_RV,Gmag,BP_RP,Cluster_1
c    ..............Just test output...........
        write(6,2)
     +  GaiaEDR3,RAdeg_1,DEdeg_1,GLON_1,GLAT_1,plx_1,pmRA_1,pmDE_1,
     +  RV_1,e_RV,Gmag,BP_RP,Cluster_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