FORTRAN Generation
(/./ftp/cats/J/AJ/134/2272)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/134/2272 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-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. J/AJ/134/2272     Visual binaries in the Orion Nebula Cluster  (Reipurth+, 2007)
*================================================================================
*Visual binaries in the Orion Nebula Cluster.
*    Reipurth B., Guimaraes M.M., Connelley M.S., Bally J.
*   <Astron. J., 134, 2272-2285 (2007)>
*   =2007AJ....134.2272R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Pre-main sequence binaries with angular separation
                             between 0.15 and 1.5 arcseconds, outside the 60"
                             exclusion zone around {theta}^1^ Ori C

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

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

      integer*4     JW          ! ? Jones & Walker (1988AJ.....95.1755J)
*                                     identification number
      integer*4     Mpm         ! (%) ? Membership probability from proper motion
      integer*4     Par         ! ? Parenago (Cat. II/171) identification,
*                                     Parenago NNNN in Simbad
      character*5   GCVS        ! GCVS (Cat. B/gcvs) identification
      integer*4     COUP        ! ? COUP (Cat. J/ApJS/160/319) identification
      character*5   v_H97b_     ! Hillenbrand (1997, Cat. J/AJ/113/1733)
*                                    identification
      integer*4     RAh         ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm         ! (min) Minute of Right Ascension (J2000)
      real*4        RAs         ! (s) Second of Right Ascension (J2000)
      character*1   DE_         ! Sign of the Declination (J2000)
      integer*4     DEd         ! (deg) Degree of Declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of Declination (J2000)
      integer*4     DEs         ! (arcsec) Arcsecond of Declination (J2000)
      integer*4     PA          ! (deg) System position angle
      real*4        Sep         ! (arcsec) System separation
      real*4        Imag        ! (mag) ? Apparent I band magnitude
      character*1   l_dHa       ! Limit flag on dHa (1)
      real*4        dHa         ! (mag) Difference in H{alpha} band magnitudes
      integer*4     PAOriC      ! (deg) Position angle toward {theta}^1^ Ori C
      integer*4     SepOriC     ! (arcsec) Separation from {theta}^1^ Ori C
      character*4   SpT         ! Spectral type from SIMBAD
      character*4   Memb        ! [PXHV ] Membership criteria (2)
      character*7   Bin         ! [a-f,] Binary discovery paper code (3)
      integer*4     Desc        ! [1,3]? Binary description (4)
*Note (1): Indicates that the primary is saturated (sometimes both stars),
*     thus {Delta}m is only an approximation.
*Note (2): Letter used for membership criteria:
*      P = proper motion catalog by Jones & Walker (1988AJ.....95.1755J)
*          with probability >=93%
*      X = COUP source by Getman et al. (2005, Cat. J/ApJS/160/319)
*      H = H{alpha} emission (Pettersson et al., in prep.)
*      V = variability noted by the General Catalog of Variable Stars,
*          (Cat. B/gcvs)
*Note (3): Binary discovery paper code as follows:
*      a = Prosser et al. (1994ApJ...421..517P)
*      b = Padgett et al. (1997ApJ...477..705P)
*      c = Simon et al. (1999, Cat. J/AJ/117/1375)
*      d = Koehler et al. (2006, Cat. J/A+A/458/461)
*      e = Getman et al. (2005, Cat. J/ApJS/160/319)
*      f = Lucas  et al. (2005, Cat. J/MNRAS/361/211)
*Note (4): Binary description as follows:
*      1 = Binary with angular separation <0.4" inside the exclusion zone
*      2 = Binary with angular separation <0.15" outside the exclusion zone
*      3 = Binary with angular separation <1.5" outside the exclusion zone
*          but with no evidence of ONC membership

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

C  Declarations for 'table2.dat'	! Other binaries with angular separations <1.5"
                             toward the ONC

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

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

      integer*4     JW_1        ! ? Jones & Walker (1988AJ.....95.1755J)
*                                     identification number
      integer*4     Mpm_1       ! (%) ? Membership probability from proper motion
      integer*4     Par_1       ! ? Parenago (Cat. II/171) identification,
*                                     Parenago NNNN in Simbad
      character*5   GCVS_1      ! GCVS (Cat. B/gcvs) identification
      integer*4     COUP_1      ! ? COUP (Cat. J/ApJS/160/319) identification
      character*5   v_H97b__1   ! Hillenbrand (1997, Cat. J/AJ/113/1733)
*                                    identification
      integer*4     RAh_1       ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_1       ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_1       ! (s) Second of Right Ascension (J2000)
      character*1   DE__1       ! Sign of the Declination (J2000)
      integer*4     DEd_1       ! (deg) Degree of Declination (J2000)
      integer*4     DEm_1       ! (arcmin) Arcminute of Declination (J2000)
      integer*4     DEs_1       ! (arcsec) Arcsecond of Declination (J2000)
      integer*4     PA_1        ! (deg) System position angle
      real*4        Sep_1       ! (arcsec) System separation
      real*4        Imag_1      ! (mag) ? Apparent I band magnitude
      character*1   l_dHa_1     ! Limit flag on dHa (1)
      real*4        dHa_1       ! (mag) Difference in H{alpha} band magnitudes
      integer*4     PAOriC_1    ! (deg) Position angle toward {theta}^1^ Ori C
      integer*4     SepOriC_1   ! (arcsec) Separation from {theta}^1^ Ori C
      character*4   SpT_1       ! Spectral type from SIMBAD
      character*4   Memb_1      ! [PXHV ] Membership criteria (2)
      character*7   Bin_1       ! [a-f,] Binary discovery paper code (3)
      integer*4     Desc_1      ! [1,3]? Binary description (4)
*Note (1): Indicates that the primary is saturated (sometimes both stars),
*     thus {Delta}m is only an approximation.
*Note (2): Letter used for membership criteria:
*      P = proper motion catalog by Jones & Walker (1988AJ.....95.1755J)
*          with probability >=93%
*      X = COUP source by Getman et al. (2005, Cat. J/ApJS/160/319)
*      H = H{alpha} emission (Pettersson et al., in prep.)
*      V = variability noted by the General Catalog of Variable Stars,
*          (Cat. B/gcvs)
*Note (3): Binary discovery paper code as follows:
*      a = Prosser et al. (1994ApJ...421..517P)
*      b = Padgett et al. (1997ApJ...477..705P)
*      c = Simon et al. (1999, Cat. J/AJ/117/1375)
*      d = Koehler et al. (2006, Cat. J/A+A/458/461)
*      e = Getman et al. (2005, Cat. J/ApJS/160/319)
*      f = Lucas  et al. (2005, Cat. J/MNRAS/361/211)
*Note (4): Binary description as follows:
*      1 = Binary with angular separation <0.4" inside the exclusion zone
*      2 = Binary with angular separation <0.15" outside the exclusion zone
*      3 = Binary with angular separation <1.5" outside the exclusion zone
*          but with no evidence of ONC membership

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

C  Loading file 'table1.dat'	! Pre-main sequence binaries with angular separation
*                             between 0.15 and 1.5 arcseconds, outside the 60"
*                             exclusion zone around {theta}^1^ Ori C

C  Format for file interpretation

    1 format(
     +  I3,1X,I2,1X,I4,1X,A5,1X,I4,1X,A5,1X,I1,1X,I2,1X,F4.1,1X,A1,I1,
     +  1X,I2,1X,I2,1X,I3,1X,F4.2,1X,F5.2,1X,A1,F4.1,1X,I3,1X,I3,1X,
     +  A4,1X,A4,1X,A7,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,78
        read(1,'(A96)')ar__
        read(ar__,1)
     +  JW,Mpm,Par,GCVS,COUP,v_H97b_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,PA,
     +  Sep,Imag,l_dHa,dHa,PAOriC,SepOriC,SpT,Memb,Bin,Desc
        if(ar__(1:3) .EQ. '') JW = iNULL__
        if(ar__(5:6) .EQ. '') Mpm = iNULL__
        if(ar__(8:11) .EQ. '') Par = iNULL__
        if(ar__(19:22) .EQ. '') COUP = iNULL__
        if(ar__(58:62) .EQ. '') Imag = rNULL__
        if(ar__(96:96) .EQ. '') Desc = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  JW,Mpm,Par,GCVS,COUP,v_H97b_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,PA,
     +  Sep,Imag,l_dHa,dHa,PAOriC,SepOriC,SpT,Memb,Bin,Desc
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Other binaries with angular separations <1.5"
*                             toward the ONC

C  Format for file interpretation

    2 format(
     +  I3,1X,I2,1X,I4,1X,A5,1X,I4,1X,A5,1X,I1,1X,I2,1X,F4.1,1X,A1,I1,
     +  1X,I2,1X,I2,1X,I3,1X,F4.2,1X,F5.2,1X,A1,F4.1,1X,I3,1X,I3,1X,
     +  A4,1X,A4,1X,A7,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,13
        read(1,'(A96)')ar__1
        read(ar__1,2)
     +  JW_1,Mpm_1,Par_1,GCVS_1,COUP_1,v_H97b__1,RAh_1,RAm_1,RAs_1,
     +  DE__1,DEd_1,DEm_1,DEs_1,PA_1,Sep_1,Imag_1,l_dHa_1,dHa_1,
     +  PAOriC_1,SepOriC_1,SpT_1,Memb_1,Bin_1,Desc_1
        if(ar__1(1:3) .EQ. '') JW_1 = iNULL__
        if(ar__1(5:6) .EQ. '') Mpm_1 = iNULL__
        if(ar__1(8:11) .EQ. '') Par_1 = iNULL__
        if(ar__1(19:22) .EQ. '') COUP_1 = iNULL__
        if(ar__1(58:62) .EQ. '') Imag_1 = rNULL__
        if(ar__1(96:96) .EQ. '') Desc_1 = iNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = 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 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  JW_1,Mpm_1,Par_1,GCVS_1,COUP_1,v_H97b__1,RAh_1,RAm_1,RAs_1,
     +  DE__1,DEd_1,DEm_1,DEs_1,PA_1,Sep_1,Imag_1,l_dHa_1,dHa_1,
     +  PAOriC_1,SepOriC_1,SpT_1,Memb_1,Bin_1,Desc_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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