FORTRAN Generation
(/./ftp/cats/J/MNRAS/470/3937)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/470/3937 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/MNRAS/470/3937    1876 open clusters multimembership catalog (Sampedro+, 2017)
*================================================================================
*A multimembership catalogue for 1876 open clusters using UCAC4 data.
*    Sampedro L., Dias W.S., Alfaro E.J., Monteiro H., Molino A.
*    <Mon. Not. R. Astron. Soc. 470, 3937 (2017)>
*    =2017MNRAS.470.3937S        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! General catalogue for the cluster and the
                                 field populations

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

C  J2000 position composed of: RAdeg DEdeg
      character*17  Name        ! Cluster name (Name)
      real*8        RAdeg       ! (deg) Right ascension (J2000) taking from Dias
*                                  Catalog (B/ocl) (RA)
      real*8        DEdeg       ! (deg) Declination (J2000) taking from Dias
*                                  Catalog (B/ocl) (DEC)
      integer*4     Nsini       ! Initial number of stars (N_stars_ini)
      integer*4     Ns          ! Number of stars to be analyzed (N_stars)
      integer*4     NOut        ! Number of Outliers (N_Outliers)
      integer*4     NM1         ! Number of members determined by M1 (N_M1)
      integer*4     NM2         ! Number of members determined by M2 (N_M2)
      integer*4     NM3         ! Number of members determined by M3 (N_M3)
      real*4        percM1      ! (%) Percentage of members determined by M1
*                                  (perc_M1)
      real*4        percM2      ! (%) Percentage of members determined by M2
*                                  (perc_M2)
      real*4        percM3      ! (%) Percentage of members determined by M3
*                                  (perc_M3)
      real*4        pxcM1       ! (mas/yr) ?=-99.99 Mean X-proper motion of the cluster
*                                  determined by M1 (px_c_M1)
      real*4        s_pxcM1     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the cluster determined by M1 (sigpx_c_M1)
      real*4        pxcM2       ! (mas/yr) ?=-99.99 Mean X-proper motion of the cluster
*                                  determined by M2 (px_c_M2)
      real*4        s_pxcM2     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the cluster determined by M2 (sigpx_c_M2)
      real*4        pxcM3       ! (mas/yr) ?=-99.99 Mean X-proper motion of the cluster
*                                  determined by M3 (px_c_M3)
      real*4        s_pxcM3     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the cluster determined by M3 (sigpx_c_M3)
      real*4        pycM1       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the cluster
*                                  determined by M1 (py_c_M1)
      real*4        s_pycM1     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the cluster determined by M1 (sigpy_c_M1)
      real*4        pycM2       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the cluster
*                                  determined by M2 (py_c_M2)
      real*4        s_pycM2     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the cluster determined by M2 (sigpy_c_M2)
      real*4        pycM3       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the cluster
*                                  determined by M3 (py_c_M3)
      real*4        s_pycM3     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the cluster determined by M3 (sigpy_c_M3)
      real*4        cccM1       ! (mas/yr) Cluster proper motion correlation coefficient
*                                  determined by M1 (coefcorr_c_M1)
      real*4        cccM2       ! (mas/yr) Cluster proper motion correlation coefficient
*                                  determined by M2 (coefcorr_c_M2)
      real*4        cccM3       ! (mas/yr) Cluster proper motion correlation coefficient
*                                  determined by M3 (coefcorr_c_M3)
      integer*4     Dist        ! (pc) ?=-9999 Distance from Dias catalogue (Distance)
      real*4        E_B_V       ! (mag) ?=-99.99 Color excess from Dias catalogue
*                                  (ColorExcess)
      real*4        logAge      ! ([yr]) ?=-99.99 Age from Dias catalogue (Age)
      real*4        Radius      ! (deg) Cluster Radius (Radius)
      real*4        pxfM1       ! (mas/yr) ?=-99.99 Mean X-proper motion of the field
*                                  stars determined by M1 (px_f_M1)
      real*4        s_pxfM1     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the field stars determined by M1
*                                  (sigpx_f_M1)
      real*4        pxfM2       ! (mas/yr) ?=-99.99 Mean X-proper motion of the field
*                                  stars determined by M2 (px_f_M2)
      real*4        s_pxfM2     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the field stars determined by M2
*                                  (sigpx_f_M2)
      real*4        pxfM3       ! (mas/yr) ?=-99.99 Mean X-proper motion of the field
*                                  stars determined by M3 (px_f_M3)
      real*4        s_pxfM3     ! (mas/yr) ?=-99.99 Standard deviation of X-proper motion
*                                  of the field stars determined by M3
*                                  (sigpx_f_M3)
      real*4        pyfM1       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the field
*                                  stars determined by M1 (py_f_M1)
      real*4        s_pyfM1     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the field stars determined by M1
*                                  (sigpy_f_M1)
      real*4        pyfM2       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the field
*                                  stars determined by M2 (py_f_M2)
      real*4        s_pyfM2     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the field stars determined by M2
*                                  (sigpy_f_M2)
      real*4        pyfM3       ! (mas/yr) ?=-99.99 Mean Y-proper motion of the field
*                                  stars determined by M3 (py_f_M3)
      real*4        s_pyfM3     ! (mas/yr) ?=-99.99 Standard deviation of Y-proper motion
*                                  of the field stars determined by M3
*                                  (sigpy_f_M3)
      real*4        ccfM1       ! (mas/yr) Field stars proper motion correlation
*                                  coefficient determined by M1 (cccM1)
      real*4        ccfM2       ! (mas/yr) Field stars proper motion correlation
*                                  coefficient determined by M2 (cccM2)
      real*4        ccfM3       ! (mas/yr) Field stars proper motion correlation
*                                  coefficient determined by M3 (cccM3)
      character*21  File        ! Name of the file with individual data of the
*                                  cluster in subdirectory clusters

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

C  Declarations for 'clusters/*'	! Individual cluster data

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

C  Position composed of: RAdeg DEdeg (Epoch=J2000)
      character*10  UCAC4       ! UCAC4 recommended identifier
      real*8        RAdeg_1     ! (deg) Mean right ascension (ICRS), Ep = J2000
      integer*4     e_RAdeg     ! (mas) Mean error of RAdeg at mean epoch
      real*8        DEdeg_1     ! (deg) Mean declination (ICRS), Ep = J2000
      integer*4     e_DEdeg     ! (mas) Mean error of DEdeg at mean epoch
      integer*4     ePos        ! (mas) Total mean error on position at Ep = J2000
      real*8        EpRA        ! (yr) Central epoch for mean RA
      real*8        EpDE        ! (yr) Central epoch for mean DE
      real*8        f_mag       ! (mag) ?=-99.99 UCAC fit model magnitude (579-642nm)
      real*8        a_mag       ! (mag) ?=-99.99 UCAC aperture magnitude (579-642nm)
      real*4        e_a_mag     ! (mag) ?=-99.99 Mean error on f.mag and a.mag
      integer*4     of          ! [0/9] UCAC4 object classification flag
      integer*4     db          ! [0/36] UCAC4 double star flag (1)
      integer*4     Na          ! [0/71] Number of UCAC observations for
*                                   the star
      integer*4     Nu          ! [0/70] Number of used UCAC observations
      integer*4     Nc          ! [1/38] Number of catalog positions used for pm
      real*4        pmRA        ! (mas/yr) Proper motion in RA(*cos(DE))
      real*4        e_pmRA      ! (mas/yr) Mean error on pmRA
      real*4        pmDE        ! (mas/yr) Proper motion in DE
      real*4        e_pmDE      ! (mas/yr) Mean error on pmDE
      real*8        Jmag        ! (mag) ?=-99.99 2MASS J magnitude (1.2um)
      real*4        e_Jmag      ! (mag) ?=-99.99 Mean error (rounded to 0.01mag)
      integer*4     q_Jmag      ! [0,58] J-band quality-confusion flag (2)
      real*8        Hmag        ! (mag) ?=-99.99 2MASS H magnitude (1.6um)
      real*4        e_Hmag      ! (mag) ?=-99.99 Mean error (rounded to 0.01mag)
      integer*4     q_Hmag      ! [0,58] H-band quality-confusion flag (2)
      real*8        Kmag        ! (mag) ?=-99.99 2MASS Ks magnitude (2.2um)
      real*4        e_Kmag      ! (mag) ?=-99.99 Mean error (rounded to 0.01mag)
      integer*4     q_Kmag      ! [0,58] K-band quality-confusion flag (2)
      real*8        Bmag        ! (mag) ?=-99.99 B magnitude from APASS
      real*4        e_Bmag      ! (cmag) ?=-99.99 Estimated error on Bmag
      real*8        Vmag        ! (mag) ?=-99.99 V magnitude from APASS
      real*4        e_Vmag      ! (cmag) ?=-99.99 Estimated error on Vmag
      real*8        gmag        ! (mag) ?=-99.99 g magnitude from APASS
      real*4        e_gmag      ! (cmag) ?=-99.99 Estimated error on gmag
      real*8        rmag        ! (mag) ?=-99.99 r magnitude from APASS
      real*4        e_rmag      ! (cmag) ?=-99.99 Estimated error on rmag
      real*8        imag        ! (mag) ?=-99.99 i magnitude from APASS
      real*4        e_imag      ! (cmag) ?=-99.99 Estimated error on imag
      integer*4     g           ! [0,3]? g-flag from SPM (Cat. I/320) (3)
      integer*4     c           ! [0,7]? c-flag from SPM (Cat. I/320) (4)
      integer*4     H           ! [0/9]? Hipparcos/Tycho flag (5)
      integer*4     A           ! [0/8]? AC2000 (Cat. I/247) flag (6)
      integer*4     b           ! [0/8]? AGK2 Bonn match flag (6)
      integer*4     h_1         ! [0/8]? AGK2 Hamburg match flag (6)
      integer*4     Z           ! [0/8]? Zone astrographic match flag (6)
      integer*4     B_1         ! [0/8]? Black Birch match flag (6)
      integer*4     L           ! [0/8]? Lick Astrographic match flag (6)
      integer*4     N           ! [0/8]? NPM Lick match flag (6)
      integer*4     S           ! [0/8]? SPM Lick match flag (6)
      integer*4     OutFlag     ! [0/1] Outlier determination flag (1: outlier)
      real*4        PM1         ! ?=-1 Membership probabilities from M1 (7)
      real*4        PM2kinem    ! ?=-1 Membership probabilities from M2
*                                   (kinematic probability) (7)
      real*4        PM2join     ! ?=-1 Membership probabilities from M2
*                                   (join probability) (7)
      real*4        PM3         ! ?=-1 Membership probabilities from M3 (7)
      integer*4     ClassM1     ! [-1/1]? Membership classification of M1 (8)
      integer*4     ClassM2     ! [-1/1]? Membership classification of M2 (8)
      integer*4     ClassM3     ! [-1/1]? Membership classification of M3 (8)
*Note (1): The double star flag is used to indicate the type/quality of double
*    star fit. It is a combination of 2 flags, dsf+dst:
* *  dsf = double star flag, represents the overall classification:
*      0 = single star
*     10 = component #1 of "good" double star
*     20 = component #2 of "good" double star
*     30 = blended image
* *  dst = double star type, derived from pixel data image profile fits
*           (largest value of all images used for this star):
*      0 = no double star, not sufficient #pixels or elongation to even call
*            double star fit subroutine
*      1 = elongated image but no more than 1 peak detected
*      2 = 2 separate peaks detected -> try double star fit
*      3 = secondary peak found on each side of primary
*      4 = case 1 after successful double fit (small separation, blended image)
*      5 = case 2 after successful double fit (most likely real double)
*      6 = case 3 after successful double fit (brighter secondary picked)
*Note (2): For each 2MASS bandpass a combined flag was created (cc_flg + ph_qual)
*  consisting of the contamination flag (0 to 50) and the photometric quality
*  flag (0 to 8).
*Note (3): g-flag from SPM (Cat. I/320) as follows:
*   0 = there is no indication the object is non-stellar.
*   1 = the object is a 2MASS extended source (Cat. VII/233)
*   2 = the object is a LEDA confirmed galaxy (Cat. VII/242)
*   3 = the object is from the Veron-Cetty & Veron QSO catalog (Cat. VII/248)
*Note (4): c-flag from SPM (Cat. I/320) as follows:
*   1 = the object is from Hipparcos (Cat. I/311)
*   2 = the object is from Tycho-2 (Cat. I/259)
*   3 = the object is from UCAC2 (Cat. I/289)
*   4 = the object is from the 2MASS point source catalog (Cat. II/246)
*   5 = the object is from the 2MASS extended source catalog (Cat. VII/233)
*   6 = the object is from the LEDA galaxy catalog (Cat. VII/242)
*   7 = the object is from the Veron-Cetty & Veron QSO catalog (Cat. VII/248)
*Note (5): Hipparcos/Tycho flag as follows:
*   0 = not a Hipparcos or Tycho star
*   1 = Hipparcos 1997 version main catalog (Cat I/239)
*   2 = Hipparcos double star annex
*   3 = Tycho-2 (Cat. I/259)
*   4 = Tycho annex 1
*   5 = Tycho annex 2
*   6 = FK6 position and proper motion (instead of Hipparcos data)
*   7 = Hippparcos 2007 solution position and proper motion (Cat. I/311)
*   8 = FK6, only PM substitution (not in UCAC4 data)
*   9 = Hipparcos 2007, only proper motion substituted (Cat. I/311)
*Note (6): flags  as follows:
*   0 = star not matched with this catalog
*   1 = unique-unique match, not involving a double star
*   2 = unique-unique match, but involving a flagged double star
*   3 = multiple match but unique in high confidence level group, no double
*   4 = as 3, but involving a flagged double star
*   5 = closest match, not involving a double, likely o.k.
*   6 = closest match, but involving a flagged double star
*   7 = maybe o.k. smallest separation match in both directions, no double
*   8 = as 7, but involving a flagged double star
*Note (7): -1: unclassified
*Note (8): Membership classification as follows:
*   1 = cluster member
*   0 = field star
*  -1 = unclassified

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

C  Loading file 'catalog.dat'	! General catalogue for the cluster and the
*                                 field populations

C  Format for file interpretation

    1 format(
     +  A17,1X,F9.5,1X,F9.5,1X,I5,1X,I4,1X,I3,1X,I4,1X,I4,1X,I4,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,
     +  1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
     +  F6.2,1X,F6.2,1X,F6.2,1X,I5,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
     +  F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,
     +  1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,A21)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,1876
        read(1,'(A344)')ar__
        read(ar__,1)
     +  Name,RAdeg,DEdeg,Nsini,Ns,NOut,NM1,NM2,NM3,percM1,percM2,
     +  percM3,pxcM1,s_pxcM1,pxcM2,s_pxcM2,pxcM3,s_pxcM3,pycM1,
     +  s_pycM1,pycM2,s_pycM2,pycM3,s_pycM3,cccM1,cccM2,cccM3,Dist,
     +  E_B_V,logAge,Radius,pxfM1,s_pxfM1,pxfM2,s_pxfM2,pxfM3,s_pxfM3,
     +  pyfM1,s_pyfM1,pyfM2,s_pyfM2,pyfM3,s_pyfM3,ccfM1,ccfM2,ccfM3,
     +  File
c    ..............Just test output...........
        write(6,1)
     +  Name,RAdeg,DEdeg,Nsini,Ns,NOut,NM1,NM2,NM3,percM1,percM2,
     +  percM3,pxcM1,s_pxcM1,pxcM2,s_pxcM2,pxcM3,s_pxcM3,pycM1,
     +  s_pycM1,pycM2,s_pycM2,pycM3,s_pycM3,cccM1,cccM2,cccM3,Dist,
     +  E_B_V,logAge,Radius,pxfM1,s_pxfM1,pxfM2,s_pxfM2,pxfM3,s_pxfM3,
     +  pyfM1,s_pyfM1,pyfM2,s_pyfM2,pyfM3,s_pyfM3,ccfM1,ccfM2,ccfM3,
     +  File
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'clusters/*'	! Individual cluster data

C  Format for file interpretation

    2 format(
     +  A10,1X,F11.7,1X,I3,1X,F11.7,1X,I3,1X,I3,1X,F7.2,1X,F7.2,1X,
     +  F7.3,1X,F7.3,1X,F6.2,1X,I1,1X,I2,1X,I2,1X,I2,1X,I2,F6.1,1X,
     +  F4.1,F6.1,1X,F4.1,1X,F7.3,1X,F6.2,1X,I2,1X,F7.3,1X,F6.2,1X,I2,
     +  1X,F7.3,1X,F6.2,1X,I2,1X,F7.3,1X,F6.2,1X,F7.3,1X,F6.2,1X,F7.3,
     +  1X,F6.2,1X,F7.3,1X,F6.2,1X,F7.3,1X,F6.2,1X,I1,1X,I1,1X,I1,1X,
     +  I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,I2,1X,I2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'clusters/*')
      write(6,*) '....Loading file: clusters/*'
      do i__=1,1876
        read(1,'(A307)')ar__1
        read(ar__1,2)
     +  UCAC4,RAdeg_1,e_RAdeg,DEdeg_1,e_DEdeg,ePos,EpRA,EpDE,f_mag,
     +  a_mag,e_a_mag,of,db,Na,Nu,Nc,pmRA,e_pmRA,pmDE,e_pmDE,Jmag,
     +  e_Jmag,q_Jmag,Hmag,e_Hmag,q_Hmag,Kmag,e_Kmag,q_Kmag,Bmag,
     +  e_Bmag,Vmag,e_Vmag,gmag,e_gmag,rmag,e_rmag,imag,e_imag,g,c,H,
     +  A,b,h_1,Z,B_1,L,N,S,OutFlag,PM1,PM2kinem,PM2join,PM3,ClassM1,
     +  ClassM2,ClassM3
        if(ar__1(252:252) .EQ. '') g = iNULL__
        if(ar__1(254:254) .EQ. '') c = iNULL__
        if(ar__1(256:256) .EQ. '') H = iNULL__
        if(ar__1(258:258) .EQ. '') A = iNULL__
        if(ar__1(260:260) .EQ. '') b = iNULL__
        if(ar__1(262:262) .EQ. '') h_1 = iNULL__
        if(ar__1(264:264) .EQ. '') Z = iNULL__
        if(ar__1(266:266) .EQ. '') B_1 = iNULL__
        if(ar__1(268:268) .EQ. '') L = iNULL__
        if(ar__1(270:270) .EQ. '') N = iNULL__
        if(ar__1(272:272) .EQ. '') S = iNULL__
        if(ar__1(300:301) .EQ. '') ClassM1 = iNULL__
        if(ar__1(303:304) .EQ. '') ClassM2 = iNULL__
        if(ar__1(306:307) .EQ. '') ClassM3 = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  UCAC4,RAdeg_1,e_RAdeg,DEdeg_1,e_DEdeg,ePos,EpRA,EpDE,f_mag,
     +  a_mag,e_a_mag,of,db,Na,Nu,Nc,pmRA,e_pmRA,pmDE,e_pmDE,Jmag,
     +  e_Jmag,q_Jmag,Hmag,e_Hmag,q_Hmag,Kmag,e_Kmag,q_Kmag,Bmag,
     +  e_Bmag,Vmag,e_Vmag,gmag,e_gmag,rmag,e_rmag,imag,e_imag,g,c,H,
     +  A,b,h_1,Z,B_1,L,N,S,OutFlag,PM1,PM2kinem,PM2join,PM3,ClassM1,
     +  ClassM2,ClassM3
c    .......End.of.Just test output...........
      end do
      close(1)

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