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 loading all data files into arrays.

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    (nr__) ! Cluster name (OC-NNNN)
      real*8        RAdeg      (nr__) ! (deg) Mean Right Ascension (ICRS) at Ep=2016.0
      real*8        e_RAdeg    (nr__) ! (deg) Right Ascension standard deviation
      real*8        DEdeg      (nr__) ! (deg) Mean Declination (ICRS) at Ep=2016.0
      real*8        e_DEdeg    (nr__) ! (deg) Declination standard deviation
      real*8        GLON       (nr__) ! (deg) Mean Galactic longitude
      real*8        e_GLON     (nr__) ! (deg) Galactic longitude standard deviation
      real*8        GLAT       (nr__) ! (deg) Mean Galactic latitude
      real*8        e_GLAT     (nr__) ! (deg) Galactic latitude standard deviation
      real*8        adeg       (nr__) ! (deg) Apparent angular size
      real*8        plx        (nr__) ! (mas) Mean Parallax
      real*8        e_plx      (nr__) ! (mas) Parallax standard deviation
      real*8        pmRA       (nr__) ! (mas/yr) Mean Proper motion in right ascension
      real*8        e_pmRA     (nr__) ! (mas/yr) Proper motion in right ascension
*                                      standard deviation
      real*8        pmDE       (nr__) ! (mas/yr) Mean Proper motion in declination
      real*8        e_pmDE     (nr__) ! (mas/yr) Proper motion in declination
*                                      standard deviation
      real*4        age        (nr__) ! (yr) Cluster age
      real*4        e_age      (nr__) ! (yr) Error of Cluster age
      real*4        AG         (nr__) ! (mag) Extinction
      real*4        Z          (nr__) ! Metal fraction of cluster
      real*8        RV         (nr__) ! (km/s) ?=- Mean radial velocity
      real*8        s_RV       (nr__) ! (km/s) ?=- Standard deviation of RV
      integer*4     N          (nr__) ! Number of members found
      integer*4     o_RV       (nr__) ! 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   (nr__1) ! Gaia source_id (rounded numbers
*                                        to last 2 digits)
      real*8        RAdeg_1    (nr__1) ! (deg) Right Ascension (ICRS) at ep=2016.0
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (ICRS) at ep=2016.0
      real*8        GLON_1     (nr__1) ! (deg) Galactic longitude
      real*8        GLAT_1     (nr__1) ! (deg) Galactic latitude
      real*8        plx_1      (nr__1) ! (mas) Parallax
      real*8        pmRA_1     (nr__1) ! (mas/yr) Proper motion in right ascension
      real*8        pmDE_1     (nr__1) ! (mas/yr) Proper motion in declination
      real*8        RV_1       (nr__1) ! (km/s) ?=0 Radial velocity
      real*8        e_RV       (nr__1) ! (km/s) ?=0 Error of Radial velocity
      real*8        Gmag       (nr__1) ! (mag) Gaia G magnitude
      real*8        BP_RP      (nr__1) ! (mag) ?=0 Gaia BP-RP colour index
      character*7   Cluster_1  (nr__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(i__),RAdeg(i__),e_RAdeg(i__),DEdeg(i__),e_DEdeg(i__),
     +  GLON(i__),e_GLON(i__),GLAT(i__),e_GLAT(i__),adeg(i__),
     +  plx(i__),e_plx(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),
     +  e_pmDE(i__),age(i__),e_age(i__),AG(i__),Z(i__),RV(i__),
     +  s_RV(i__),N(i__),o_RV(i__)
        if (idig(ar__(207:218)).EQ.0) RV(i__) =  rNULL__
        if (idig(ar__(220:231)).EQ.0) s_RV(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Cluster(i__),RAdeg(i__),e_RAdeg(i__),DEdeg(i__),e_DEdeg(i__),
     +  GLON(i__),e_GLON(i__),GLAT(i__),e_GLAT(i__),adeg(i__),
     +  plx(i__),e_plx(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),
     +  e_pmDE(i__),age(i__),e_age(i__),AG(i__),Z(i__),RV(i__),
     +  s_RV(i__),N(i__),o_RV(i__)
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(i__),RAdeg_1(i__),DEdeg_1(i__),GLON_1(i__),
     +  GLAT_1(i__),plx_1(i__),pmRA_1(i__),pmDE_1(i__),RV_1(i__),
     +  e_RV(i__),Gmag(i__),BP_RP(i__),Cluster_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  GaiaEDR3(i__),RAdeg_1(i__),DEdeg_1(i__),GLON_1(i__),
     +  GLAT_1(i__),plx_1(i__),pmRA_1(i__),pmDE_1(i__),RV_1(i__),
     +  e_RV(i__),Gmag(i__),BP_RP(i__),Cluster_1(i__)
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