FORTRAN Generation
(/./ftp/cats/J/AJ/133/2898)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/133/2898 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-Sep-07
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/133/2898        New proper-motion stars (-90<DE< -47)        (Finch+, 2007)
*================================================================================
*The solar neighborhood.
*XVIII. Discovery of new proper-motion stars with 0.40"/yr>{mu}>=0.18"/yr
*between declinations -90{deg} and -47{deg}.
*    Finch C.T., Henry T.J., Subasavage J.P., Jao W.-C., Hambly N.C.
*   <Astron. J., 133, 2898-2907 (2007)>
*   =2007AJ....133.2898F
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Characteristics of new SCR systems with
                           0.40"/yr>{mu}>=0.18"/yr from -90{deg}>DE>=-47{deg}

      integer*4 nr__
      parameter (nr__=1662)	! Number of records
      character*117 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     Gr          ! [1/2]? Group 1=Red dwarfs, 2=White Dwarf (1)
      character*10  SCR         ! Object identification (HHMM-DDMMA)
      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)
      real*4        DEs         ! (arcsec) Arcsecond of Declination (J2000)
      real*4        pm          ! (arcsec/yr) ? Relative proper motion
      real*4        pmPA        ! (deg) ? Position angle of proper motion
      real*4        BJmag       ! (mag) ? SuperCOSMOS B_J_ plate emulsion magnitude
      real*4        RFmag       ! (mag) ? SuperCOSMOS R_59F_ plate emulsion magnitude
      real*4        Imag        ! (mag) ? SuperCOSMOS I_IVN_ plate emulsion magnitude
      real*4        Jmag        ! (mag) ? 2MASS J band magnitude
      real*4        Hmag        ! (mag) ? 2MASS H band magnitude
      real*4        Kmag        ! (mag) ? 2MASS K_s_ band magnitude
      real*4        RF_J        ! (mag) ? The (R_59F_ - J) color
      real*4        Dist        ! (pc) ? Estimated plate distance
      character*1   u_Dist      ! []] Unreliable distance (2)
      character*4   Note        ! Additional note(s) (3)
      real*4        Dist1       ! (pc) ? More reliable distance when unreliable
*                                     distance estimate (table4 only)
      real*4        e_Dist1     ! (pc) ? rms uncertainty on Dist1
*Note (1): For stars nearer than 25pc (table'4):
*      1 = SCR Red Dwarf Candidates <25pc
*      2 = SCR WD Candidates
*Note (2): the bracket indicates an incorrect plate distance estimate
*     because source is either white dwarf or subdwarf candidate
*Note (3): Notes as follows:
*      a = Common proper motion companion; see Table 5.
*      b = White dwarf candidate selected from RPM diagram; if white dwarf,
*          plate distance is incorrect; see Table 4.
*      c = Not detected during automated search but noticed by eye during
*          the blinking process.
*      d = Subdwarf candidate selected from RPM diagram; if subdwarf, plate
*          distance is incorrect.
*      e = Source not in 2MASS.
*      f = WD candidate with unreliable distance estimate (in brackets);
*          more reliable WD distance estimate in note
*      g = All colors are too blue or too red for distance relations
*      h = WD confirmed via spectroscopy; results to be published in a
*          future paper by coauthor J.P. Subasavage
*      * = see file "errata.htx" (added at CDS)

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

C  Declarations for 'table4.dat'	! Characteristics of new SCR systems estimated to be
                           nearer than 25pc and new white dwarf candidates with
                           0.40"/yr>{mu}>=0.18"/yr from -90{deg}<DE>=-47{deg}

      integer*4 nr__1
      parameter (nr__1=44)	! Number of records
      character*117 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     Gr_1        ! [1/2]? Group 1=Red dwarfs, 2=White Dwarf (1)
      character*10  SCR_1       ! Object identification (HHMM-DDMMA)
      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)
      real*4        DEs_1       ! (arcsec) Arcsecond of Declination (J2000)
      real*4        pm_1        ! (arcsec/yr) ? Relative proper motion
      real*4        pmPA_1      ! (deg) ? Position angle of proper motion
      real*4        BJmag_1     ! (mag) ? SuperCOSMOS B_J_ plate emulsion magnitude
      real*4        RFmag_1     ! (mag) ? SuperCOSMOS R_59F_ plate emulsion magnitude
      real*4        Imag_1      ! (mag) ? SuperCOSMOS I_IVN_ plate emulsion magnitude
      real*4        Jmag_1      ! (mag) ? 2MASS J band magnitude
      real*4        Hmag_1      ! (mag) ? 2MASS H band magnitude
      real*4        Kmag_1      ! (mag) ? 2MASS K_s_ band magnitude
      real*4        RF_J_1      ! (mag) ? The (R_59F_ - J) color
      real*4        Dist_1      ! (pc) ? Estimated plate distance
      character*1   u_Dist_1    ! []] Unreliable distance (2)
      character*4   Note_1      ! Additional note(s) (3)
      real*4        Dist1_1     ! (pc) ? More reliable distance when unreliable
*                                     distance estimate (table4 only)
      real*4        e_Dist1_1   ! (pc) ? rms uncertainty on Dist1
*Note (1): For stars nearer than 25pc (table'4):
*      1 = SCR Red Dwarf Candidates <25pc
*      2 = SCR WD Candidates
*Note (2): the bracket indicates an incorrect plate distance estimate
*     because source is either white dwarf or subdwarf candidate
*Note (3): Notes as follows:
*      a = Common proper motion companion; see Table 5.
*      b = White dwarf candidate selected from RPM diagram; if white dwarf,
*          plate distance is incorrect; see Table 4.
*      c = Not detected during automated search but noticed by eye during
*          the blinking process.
*      d = Subdwarf candidate selected from RPM diagram; if subdwarf, plate
*          distance is incorrect.
*      e = Source not in 2MASS.
*      f = WD candidate with unreliable distance estimate (in brackets);
*          more reliable WD distance estimate in note
*      g = All colors are too blue or too red for distance relations
*      h = WD confirmed via spectroscopy; results to be published in a
*          future paper by coauthor J.P. Subasavage
*      * = see file "errata.htx" (added at CDS)

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

C  Declarations for 'table5.dat'	! Common proper motion systems

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

      character*14  Name1       ! Primary name
      real*4        pm1         ! (arcsec/yr) ? Primary total proper motion
      real*4        pmPA1       ! (deg) ? Primary position angle of proper motion
      real*4        Dist1_2     ! (pc) ? Primary distance
      character*1   u_Dist1     ! [])] Unreliable distance (1)
      character*14  Name2       ! Secondary name
      real*4        pm2         ! (arcsec/yr) ?=- Secondary total proper motion
      real*4        pmPA2       ! (deg) ?=- Secondary position angle of proper motion
      real*4        Dist2       ! (pc) ?=- Secondary distance
      character*1   n_Dist2     ! Note on DistS (1)
      real*4        Sep         ! (arcsec) ?=- Angular separation between the 2 stars
      real*4        PA          ! (deg) ?=- Position angle between the 2 stars
      character*34  Notes       ! Notes
      character*4   Flag        ! Remarks (2)
*Note (1): The symbols are:
*      ) = distance unreliable;
*      ] = distance estimate unreliable
*Note (2): Flags as follows:
*      a = Distance estimate unreliable when listed (in brackets);
*          if distance not given, BRI photometry not available
*      b = Companion not detected during automated search but noticed to
*          be a CPM companion during visual inspection
*      c = Fewer than six relations; therefore, distance estimate
*          unreliable (in parentheses); Hipparcos distance given in notes
*          when available
*      d = WD candidate with unreliable distance when listed (in brackets)
*      e = No 2MASS photometry available for companion
*      f = I photometry suspect, therefore distance unreliable (in parentheses)
*      g = Subdwarf candidate with unreliable distance listed (in brackets)
*      h = Distance estimate unreliable (in parentheses) because primary
*          is likely a double

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

C  Loading file 'table3.dat'	! Characteristics of new SCR systems with
*                           0.40"/yr>{mu}>=0.18"/yr from -90{deg}>DE>=-47{deg}

C  Format for file interpretation

    1 format(
     +  I1,5X,A10,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F5.3,
     +  1X,F5.1,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,F6.1,A1,1X,A4,1X,F4.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,1662
        read(1,'(A117)')ar__
        read(ar__,1)
     +  Gr,SCR,RAh,RAm,RAs,DE_,DEd,DEm,DEs,pm,pmPA,BJmag,RFmag,Imag,
     +  Jmag,Hmag,Kmag,RF_J,Dist,u_Dist,Note,Dist1,e_Dist1
        if(ar__(1:1) .EQ. '') Gr = iNULL__
        if(ar__(42:46) .EQ. '') pm = rNULL__
        if(ar__(48:52) .EQ. '') pmPA = rNULL__
        if(ar__(54:58) .EQ. '') BJmag = rNULL__
        if(ar__(60:64) .EQ. '') RFmag = rNULL__
        if(ar__(66:70) .EQ. '') Imag = rNULL__
        if(ar__(72:76) .EQ. '') Jmag = rNULL__
        if(ar__(78:82) .EQ. '') Hmag = rNULL__
        if(ar__(84:88) .EQ. '') Kmag = rNULL__
        if(ar__(90:94) .EQ. '') RF_J = rNULL__
        if(ar__(96:101) .EQ. '') Dist = rNULL__
        if(ar__(109:112) .EQ. '') Dist1 = rNULL__
        if(ar__(114:117) .EQ. '') e_Dist1 = rNULL__
        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)
     +  Gr,SCR,RAh,RAm,RAs,DE_,DEd,DEm,DEs,pm,pmPA,BJmag,RFmag,Imag,
     +  Jmag,Hmag,Kmag,RF_J,Dist,u_Dist,Note,Dist1,e_Dist1
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Characteristics of new SCR systems estimated to be
*                           nearer than 25pc and new white dwarf candidates with
*                           0.40"/yr>{mu}>=0.18"/yr from -90{deg}<DE>=-47{deg}

C  Format for file interpretation

    2 format(
     +  I1,5X,A10,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F5.3,
     +  1X,F5.1,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,F6.1,A1,1X,A4,1X,F4.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,44
        read(1,'(A117)')ar__1
        read(ar__1,2)
     +  Gr_1,SCR_1,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,pm_1,
     +  pmPA_1,BJmag_1,RFmag_1,Imag_1,Jmag_1,Hmag_1,Kmag_1,RF_J_1,
     +  Dist_1,u_Dist_1,Note_1,Dist1_1,e_Dist1_1
        if(ar__1(1:1) .EQ. '') Gr_1 = iNULL__
        if(ar__1(42:46) .EQ. '') pm_1 = rNULL__
        if(ar__1(48:52) .EQ. '') pmPA_1 = rNULL__
        if(ar__1(54:58) .EQ. '') BJmag_1 = rNULL__
        if(ar__1(60:64) .EQ. '') RFmag_1 = rNULL__
        if(ar__1(66:70) .EQ. '') Imag_1 = rNULL__
        if(ar__1(72:76) .EQ. '') Jmag_1 = rNULL__
        if(ar__1(78:82) .EQ. '') Hmag_1 = rNULL__
        if(ar__1(84:88) .EQ. '') Kmag_1 = rNULL__
        if(ar__1(90:94) .EQ. '') RF_J_1 = rNULL__
        if(ar__1(96:101) .EQ. '') Dist_1 = rNULL__
        if(ar__1(109:112) .EQ. '') Dist1_1 = rNULL__
        if(ar__1(114:117) .EQ. '') e_Dist1_1 = rNULL__
        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)
     +  Gr_1,SCR_1,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,pm_1,
     +  pmPA_1,BJmag_1,RFmag_1,Imag_1,Jmag_1,Hmag_1,Kmag_1,RF_J_1,
     +  Dist_1,u_Dist_1,Note_1,Dist1_1,e_Dist1_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Common proper motion systems

C  Format for file interpretation

    3 format(
     +  A14,1X,F5.3,1X,F5.1,2X,F5.1,A1,1X,A14,1X,F5.3,1X,F5.1,1X,F6.1,
     +  A1,1X,F5.1,1X,F5.1,1X,A34,1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,56
        read(1,'(A121)')ar__2
        read(ar__2,3)
     +  Name1,pm1,pmPA1,Dist1_2,u_Dist1,Name2,pm2,pmPA2,Dist2,n_Dist2,
     +  Sep,PA,Notes,Flag
        if(ar__2(16:20) .EQ. '') pm1 = rNULL__
        if(ar__2(22:26) .EQ. '') pmPA1 = rNULL__
        if(ar__2(29:33) .EQ. '') Dist1_2 = rNULL__
        if (idig(ar__2(51:55)).EQ.0) pm2 =  rNULL__
        if (idig(ar__2(57:61)).EQ.0) pmPA2 =  rNULL__
        if (idig(ar__2(63:68)).EQ.0) Dist2 =  rNULL__
        if (idig(ar__2(71:75)).EQ.0) Sep =  rNULL__
        if (idig(ar__2(77:81)).EQ.0) PA =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name1,pm1,pmPA1,Dist1_2,u_Dist1,Name2,pm2,pmPA2,Dist2,n_Dist2,
     +  Sep,PA,Notes,Flag
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