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 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-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      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     Gr         (nr__) ! [1/2]? Group 1=Red dwarfs, 2=White Dwarf (1)
      character*10  SCR        (nr__) ! Object identification (HHMM-DDMMA)
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        pm         (nr__) ! (arcsec/yr) ? Relative proper motion
      real*4        pmPA       (nr__) ! (deg) ? Position angle of proper motion
      real*4        BJmag      (nr__) ! (mag) ? SuperCOSMOS B_J_ plate emulsion magnitude
      real*4        RFmag      (nr__) ! (mag) ? SuperCOSMOS R_59F_ plate emulsion magnitude
      real*4        Imag       (nr__) ! (mag) ? SuperCOSMOS I_IVN_ plate emulsion magnitude
      real*4        Jmag       (nr__) ! (mag) ? 2MASS J band magnitude
      real*4        Hmag       (nr__) ! (mag) ? 2MASS H band magnitude
      real*4        Kmag       (nr__) ! (mag) ? 2MASS K_s_ band magnitude
      real*4        RF_J       (nr__) ! (mag) ? The (R_59F_ - J) color
      real*4        Dist       (nr__) ! (pc) ? Estimated plate distance
      character*1   u_Dist     (nr__) ! []] Unreliable distance (2)
      character*4   Note       (nr__) ! Additional note(s) (3)
      real*4        Dist1      (nr__) ! (pc) ? More reliable distance when unreliable
*                                     distance estimate (table4 only)
      real*4        e_Dist1    (nr__) ! (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    (nr__1) ! (deg) Right Ascension J2000
      real*8        DEdeg_1    (nr__1) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     Gr_1       (nr__1) ! [1/2]? Group 1=Red dwarfs, 2=White Dwarf (1)
      character*10  SCR_1      (nr__1) ! Object identification (HHMM-DDMMA)
      integer*4     RAh_1      (nr__1) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_1      (nr__1) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_1      (nr__1) ! (s) Second of Right Ascension (J2000)
      character*1   DE__1      (nr__1) ! Sign of the Declination (J2000)
      integer*4     DEd_1      (nr__1) ! (deg) Degree of Declination (J2000)
      integer*4     DEm_1      (nr__1) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs_1      (nr__1) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        pm_1       (nr__1) ! (arcsec/yr) ? Relative proper motion
      real*4        pmPA_1     (nr__1) ! (deg) ? Position angle of proper motion
      real*4        BJmag_1    (nr__1) ! (mag) ? SuperCOSMOS B_J_ plate emulsion magnitude
      real*4        RFmag_1    (nr__1) ! (mag) ? SuperCOSMOS R_59F_ plate emulsion magnitude
      real*4        Imag_1     (nr__1) ! (mag) ? SuperCOSMOS I_IVN_ plate emulsion magnitude
      real*4        Jmag_1     (nr__1) ! (mag) ? 2MASS J band magnitude
      real*4        Hmag_1     (nr__1) ! (mag) ? 2MASS H band magnitude
      real*4        Kmag_1     (nr__1) ! (mag) ? 2MASS K_s_ band magnitude
      real*4        RF_J_1     (nr__1) ! (mag) ? The (R_59F_ - J) color
      real*4        Dist_1     (nr__1) ! (pc) ? Estimated plate distance
      character*1   u_Dist_1   (nr__1) ! []] Unreliable distance (2)
      character*4   Note_1     (nr__1) ! Additional note(s) (3)
      real*4        Dist1_1    (nr__1) ! (pc) ? More reliable distance when unreliable
*                                     distance estimate (table4 only)
      real*4        e_Dist1_1  (nr__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      (nr__2) ! Primary name
      real*4        pm1        (nr__2) ! (arcsec/yr) ? Primary total proper motion
      real*4        pmPA1      (nr__2) ! (deg) ? Primary position angle of proper motion
      real*4        Dist1_2    (nr__2) ! (pc) ? Primary distance
      character*1   u_Dist1    (nr__2) ! [])] Unreliable distance (1)
      character*14  Name2      (nr__2) ! Secondary name
      real*4        pm2        (nr__2) ! (arcsec/yr) ?=- Secondary total proper motion
      real*4        pmPA2      (nr__2) ! (deg) ?=- Secondary position angle of proper motion
      real*4        Dist2      (nr__2) ! (pc) ?=- Secondary distance
      character*1   n_Dist2    (nr__2) ! Note on DistS (1)
      real*4        Sep        (nr__2) ! (arcsec) ?=- Angular separation between the 2 stars
      real*4        PA         (nr__2) ! (deg) ?=- Position angle between the 2 stars
      character*34  Notes      (nr__2) ! Notes
      character*4   Flag       (nr__2) ! 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(i__),SCR(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),pm(i__),pmPA(i__),BJmag(i__),RFmag(i__),
     +  Imag(i__),Jmag(i__),Hmag(i__),Kmag(i__),RF_J(i__),Dist(i__),
     +  u_Dist(i__),Note(i__),Dist1(i__),e_Dist1(i__)
        if(ar__(1:1) .EQ. '') Gr(i__) = iNULL__
        if(ar__(42:46) .EQ. '') pm(i__) = rNULL__
        if(ar__(48:52) .EQ. '') pmPA(i__) = rNULL__
        if(ar__(54:58) .EQ. '') BJmag(i__) = rNULL__
        if(ar__(60:64) .EQ. '') RFmag(i__) = rNULL__
        if(ar__(66:70) .EQ. '') Imag(i__) = rNULL__
        if(ar__(72:76) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(78:82) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(84:88) .EQ. '') Kmag(i__) = rNULL__
        if(ar__(90:94) .EQ. '') RF_J(i__) = rNULL__
        if(ar__(96:101) .EQ. '') Dist(i__) = rNULL__
        if(ar__(109:112) .EQ. '') Dist1(i__) = rNULL__
        if(ar__(114:117) .EQ. '') e_Dist1(i__) = rNULL__
        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)
     +  Gr(i__),SCR(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),pm(i__),pmPA(i__),BJmag(i__),RFmag(i__),
     +  Imag(i__),Jmag(i__),Hmag(i__),Kmag(i__),RF_J(i__),Dist(i__),
     +  u_Dist(i__),Note(i__),Dist1(i__),e_Dist1(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 '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(i__),SCR_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),
     +  DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),pm_1(i__),
     +  pmPA_1(i__),BJmag_1(i__),RFmag_1(i__),Imag_1(i__),Jmag_1(i__),
     +  Hmag_1(i__),Kmag_1(i__),RF_J_1(i__),Dist_1(i__),u_Dist_1(i__),
     +  Note_1(i__),Dist1_1(i__),e_Dist1_1(i__)
        if(ar__1(1:1) .EQ. '') Gr_1(i__) = iNULL__
        if(ar__1(42:46) .EQ. '') pm_1(i__) = rNULL__
        if(ar__1(48:52) .EQ. '') pmPA_1(i__) = rNULL__
        if(ar__1(54:58) .EQ. '') BJmag_1(i__) = rNULL__
        if(ar__1(60:64) .EQ. '') RFmag_1(i__) = rNULL__
        if(ar__1(66:70) .EQ. '') Imag_1(i__) = rNULL__
        if(ar__1(72:76) .EQ. '') Jmag_1(i__) = rNULL__
        if(ar__1(78:82) .EQ. '') Hmag_1(i__) = rNULL__
        if(ar__1(84:88) .EQ. '') Kmag_1(i__) = rNULL__
        if(ar__1(90:94) .EQ. '') RF_J_1(i__) = rNULL__
        if(ar__1(96:101) .EQ. '') Dist_1(i__) = rNULL__
        if(ar__1(109:112) .EQ. '') Dist1_1(i__) = rNULL__
        if(ar__1(114:117) .EQ. '') e_Dist1_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,2)
     +  Gr_1(i__),SCR_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),
     +  DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),pm_1(i__),
     +  pmPA_1(i__),BJmag_1(i__),RFmag_1(i__),Imag_1(i__),Jmag_1(i__),
     +  Hmag_1(i__),Kmag_1(i__),RF_J_1(i__),Dist_1(i__),u_Dist_1(i__),
     +  Note_1(i__),Dist1_1(i__),e_Dist1_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 '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(i__),pm1(i__),pmPA1(i__),Dist1_2(i__),u_Dist1(i__),
     +  Name2(i__),pm2(i__),pmPA2(i__),Dist2(i__),n_Dist2(i__),
     +  Sep(i__),PA(i__),Notes(i__),Flag(i__)
        if(ar__2(16:20) .EQ. '') pm1(i__) = rNULL__
        if(ar__2(22:26) .EQ. '') pmPA1(i__) = rNULL__
        if(ar__2(29:33) .EQ. '') Dist1_2(i__) = rNULL__
        if (idig(ar__2(51:55)).EQ.0) pm2(i__) =  rNULL__
        if (idig(ar__2(57:61)).EQ.0) pmPA2(i__) =  rNULL__
        if (idig(ar__2(63:68)).EQ.0) Dist2(i__) =  rNULL__
        if (idig(ar__2(71:75)).EQ.0) Sep(i__) =  rNULL__
        if (idig(ar__2(77:81)).EQ.0) PA(i__) =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name1(i__),pm1(i__),pmPA1(i__),Dist1_2(i__),u_Dist1(i__),
     +  Name2(i__),pm2(i__),pmPA2(i__),Dist2(i__),n_Dist2(i__),
     +  Sep(i__),PA(i__),Notes(i__),Flag(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