FORTRAN Generation
(/./ftp/cats/B/ocl)

Conversion of standardized ReadMe file for file /./ftp/cats/B/ocl 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 2024-Mar-28
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. B/ocl     Optically visible open clusters and Candidates (Dias+ 2002-2015)
*================================================================================
*New catalog of optically visible open clusters and candidates (V3.5)
*    Dias W.S., Alessi B.S., Moitinho A., Lepine J.R.D.
*   <Astron. Astrophys. 389, 871 (2002)>
*   =2002A&A...389..871D
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'clusters.dat'	! The Catalogue Data File (V3.5)

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*17  Cluster    (nr__) ! Cluster name
      integer*4     RAh        (nr__) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes)
      integer*4     RAs        (nr__) ! (s) Right Ascension J2000 (seconds)
      character*1   DE_        (nr__) ! Declination J2000 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination J2000 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs        (nr__) ! (arcsec) Declination J2000 (seconds)
      character*2   Class      (nr__) ! Flag for classification of the cluster (G1)
      real*4        Diam       (nr__) ! (arcmin) [0.2/1400]? Angular apparent diameter
      integer*4     Dist       (nr__) ! (pc) [25/15000]? Distance from WEBDA
      real*4        E_B_V      (nr__) ! (mag) [0/6]? Colour excess in BV
      real*4        Age        (nr__) ! ([yr]) [6/10.1]? Age (in log t)
      real*8        pmRA       (nr__) ! (mas/yr) ? Mean proper motion of the cluster in RA
      real*4        e_pmRA     (nr__) ! (mas/yr) ? Standard deviation in pmRA
      real*8        pmDE       (nr__) ! (mas/yr) ? Mean proper motion of the cluster in Dec
      real*4        e_pmDE     (nr__) ! (mas/yr) ? Standard deviation in pmDE
      integer*4     Nc         (nr__) ! [1/14341]? Estimated number of cluster members
      character*3   r_pmRA     (nr__) ! Source of mean pm determination, in refs.dat
      real*8        RV         (nr__) ! (km/s) ? Radial Velocity
      real*4        e_RV       (nr__) ! (km/s) ? Error in Radial Velocity
      integer*4     o_RV       (nr__) ! [0/537]? Number of stars used to determine RV
      character*4   r_RV       (nr__) ! Source of mean RV determination, in refs.dat
      real*4        v_Fe_H_    (nr__) ! (Sun) [-1.6/0.5]? Metallicity
      real*4        e__Fe_H_   (nr__) ! (Sun) ? Error in [Fe/H]
      integer*4     o__Fe_H_   (nr__) ! [0/60]? Number of stars used
*                                         to determine [Fe/H]
      character*8   TrType     (nr__) ! Trumpler type determined in the DSS inspection
*                                 (concentration-brightness-richness-nebulosity)

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

C  Declarations for 'refs.dat'	! References for proper motions and radial velocities

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

      character*4   Ref        (nr__1) ! Reference code
      character*19  BibCode    (nr__1) ! Bibcode of the references
      character*103 Text       (nr__1) ! Author(s) names and comments

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

C  Declarations for 'removed.dat'	! Removed clusters (V3.5)

      integer*4 nr__2
      parameter (nr__2=147)	! Number of records
      character*174 ar__2  	! Full-size record

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg_1    (nr__2) ! (deg) Right Ascension J2000
      real*8        DEdeg_1    (nr__2) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*17  Cluster_1  (nr__2) ! Cluster name
      integer*4     RAh_1      (nr__2) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm_1      (nr__2) ! (min) Right Ascension J2000 (minutes)
      integer*4     RAs_1      (nr__2) ! (s) Right Ascension J2000 (seconds)
      character*1   DE__1      (nr__2) ! Declination J2000 (sign)
      integer*4     DEd_1      (nr__2) ! (deg) Declination J2000 (degrees)
      integer*4     DEm_1      (nr__2) ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs_1      (nr__2) ! (arcsec) Declination J2000 (seconds)
      real*4        Diam_1     (nr__2) ! (arcmin) ? Angular apparent diameter
      character*29  Reason     (nr__2) ! Reason of removing the cluster
      character*95  Ref_1      (nr__2) ! Reference used for deletion

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

C  Declarations for 'sources.dat'	! References (V3.5)

      integer*4 nr__3
      parameter (nr__3=1803)	! Number of records
      character*182 ar__3  	! Full-size record

      character*23  Object     (nr__3) ! Objects associated with the reference
      character*158 Com        (nr__3) ! Comments, including the bibcode

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

C  Declarations for 'phot.dat'	! Available photometric data (on Jan 23 2002)

      integer*4 nr__4
      parameter (nr__4=569)	! Number of records
      character*44 ar__4  	! Full-size record

      character*17  Cluster_2  (nr__4) ! Cluster name
      character*5   CCD        (nr__4) ! [UBVRI ] Bands observed with CCD
      character*5   Pe         (nr__4) ! [UBVRI ] Bands observed with photomultipliers
      character*3   Pg         (nr__4) ! [UBV ] Bands observed with photographic plates
      character*10  Alias      (nr__4) ! Other name

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

C  Loading file 'clusters.dat'	! The Catalogue Data File (V3.5)

C  Format for file interpretation

    1 format(
     +  A17,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,A2,2X,F6.1,1X,
     +  I5,1X,F5.3,1X,F6.3,1X,F7.2,1X,F4.2,1X,F7.2,1X,F4.2,1X,I5,1X,
     +  A3,2X,F7.2,2X,F5.2,1X,I3,1X,A4,1X,F6.3,1X,F5.3,1X,I2,1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'clusters.dat')
      write(6,*) '....Loading file: clusters.dat'
      do i__=1,2167
        read(1,'(A152)')ar__
        read(ar__,1)
     +  Cluster(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Class(i__),Diam(i__),Dist(i__),E_B_V(i__),
     +  Age(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__),Nc(i__),
     +  r_pmRA(i__),RV(i__),e_RV(i__),o_RV(i__),r_RV(i__),
     +  v_Fe_H_(i__),e__Fe_H_(i__),o__Fe_H_(i__),TrType(i__)
        if(ar__(42:47) .EQ. '') Diam(i__) = rNULL__
        if(ar__(49:53) .EQ. '') Dist(i__) = iNULL__
        if(ar__(55:59) .EQ. '') E_B_V(i__) = rNULL__
        if(ar__(61:66) .EQ. '') Age(i__) = rNULL__
        if(ar__(68:74) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(76:79) .EQ. '') e_pmRA(i__) = rNULL__
        if(ar__(81:87) .EQ. '') pmDE(i__) = rNULL__
        if(ar__(89:92) .EQ. '') e_pmDE(i__) = rNULL__
        if(ar__(94:98) .EQ. '') Nc(i__) = iNULL__
        if(ar__(105:111) .EQ. '') RV(i__) = rNULL__
        if(ar__(114:118) .EQ. '') e_RV(i__) = rNULL__
        if(ar__(120:122) .EQ. '') o_RV(i__) = iNULL__
        if(ar__(129:134) .EQ. '') v_Fe_H_(i__) = rNULL__
        if(ar__(136:140) .EQ. '') e__Fe_H_(i__) = rNULL__
        if(ar__(142:143) .EQ. '') o__Fe_H_(i__) = iNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  Cluster(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Class(i__),Diam(i__),Dist(i__),E_B_V(i__),
     +  Age(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__),Nc(i__),
     +  r_pmRA(i__),RV(i__),e_RV(i__),o_RV(i__),r_RV(i__),
     +  v_Fe_H_(i__),e__Fe_H_(i__),o__Fe_H_(i__),TrType(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References for proper motions and radial velocities

C  Format for file interpretation

    2 format(A4,3X,A19,1X,A103)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,92
        read(1,'(A130)')ar__1
        read(ar__1,2)Ref(i__),BibCode(i__),Text(i__)
c    ..............Just test output...........
        write(6,2)Ref(i__),BibCode(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'removed.dat'	! Removed clusters (V3.5)

C  Format for file interpretation

    3 format(
     +  A17,1X,I2,1X,I2,1X,I2,2X,A1,I2,1X,I2,1X,I2,3X,F6.1,3X,A29,1X,
     +  A95)

C  Effective file loading

      open(unit=1,status='old',file=
     +'removed.dat')
      write(6,*) '....Loading file: removed.dat'
      do i__=1,147
        read(1,'(A174)')ar__2
        read(ar__2,3)
     +  Cluster_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Diam_1(i__),Reason(i__),
     +  Ref_1(i__)
        if(ar__2(41:46) .EQ. '') Diam_1(i__) = rNULL__
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  Cluster_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Diam_1(i__),Reason(i__),
     +  Ref_1(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'sources.dat'	! References (V3.5)

C  Format for file interpretation

    4 format(A23,1X,A158)

C  Effective file loading

      open(unit=1,status='old',file=
     +'sources.dat')
      write(6,*) '....Loading file: sources.dat'
      do i__=1,1803
        read(1,'(A182)')ar__3
        read(ar__3,4)Object(i__),Com(i__)
c    ..............Just test output...........
        write(6,4)Object(i__),Com(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'phot.dat'	! Available photometric data (on Jan 23 2002)

C  Format for file interpretation

    5 format(A17,1X,A5,1X,A5,1X,A3,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'phot.dat')
      write(6,*) '....Loading file: phot.dat'
      do i__=1,569
        read(1,'(A44)')ar__4
        read(ar__4,5)
     +  Cluster_2(i__),CCD(i__),Pe(i__),Pg(i__),Alias(i__)
c    ..............Just test output...........
        write(6,5)
     +  Cluster_2(i__),CCD(i__),Pe(i__),Pg(i__),Alias(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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