FORTRAN Generation
(/./ftp/cats/J/AJ/149/5)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/149/5 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-Apr-19
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/149/5    Solar neighborhood. XXXV. Distances to M dwarfs   (Winters+, 2015)
*================================================================================
*The solar neighborhood.
*XXXV. Distances to 1404 M dwarf systems within 25 pc in the southern sky.
*    Winters J.G., Hambly N.C., Jao W.-C., Dieterich S.B., Lurie J.C.,
*    Henry T.J., Hosey A.D., Slatten K.J., Boyd M.R., Ianna P.A., Riedel A.R.,
*    Subasavage J.P., Finch C.T., Bartlett J.L.
*   <Astron. J., 149, 5 (2015)>
*   =2015AJ....149....5W
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Observed data for southern red dwarf systems

      integer*4 nr__
      parameter (nr__=1748)	! Number of records
      character*160 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*14  Name       (nr__) ! Name of the M dwarf primary (G1)
      integer*4     Nc         (nr__) ! Number of known components in the system
      integer*4     Np         (nr__) ! ? Indicates how many of the components are
*                                    included in the photometry
      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)
      integer*4     DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        pm         (nr__) ! (arcsec/yr) Total proper motion magnitude
      real*4        pmPA       (nr__) ! (deg) Proper motion position angle
      integer*4     r_pm       (nr__) ! Reference for pm (in refs.dat file) (1)
      real*8        plx        (nr__) ! (mas) ? Weighted mean of published trigonometric
*                                    parallaxes (see Section 3.4)
      character*2   f_plx      (nr__) ! Note on plx (2)
      real*4        e_plx      (nr__) ! (mas) ? Error in plx
      integer*4     o_plx      (nr__) ! ? Number of measurements for plx
      character*13  r_plx      (nr__) ! Reference for plx (in ref.dat file)
      real*4        Bmag       (nr__) ! (mag) ? SuperCOSMOS B_J_ plate magnitude (3)
      character*1   f_Bmag     (nr__) ! [J] Magnitude blended due to a close companion
      real*4        Fmag       (nr__) ! (mag) ? SuperCOSMOS R_59F_ plate magnitude (3)
      character*1   f_Fmag     (nr__) ! [J] Magnitude blended due to a close companion
      real*4        Nmag       (nr__) ! (mag) ? SuperCOSMOS I_IVN_ plate magnitude (3)
      character*1   f_Nmag     (nr__) ! [J] Magnitude blended due to a close companion
      real*4        Vmag       (nr__) ! (mag) ? The Johnson V band magnitude (4)
      character*1   f_Vmag     (nr__) ! [J] Magnitude blended due to a close companion
      real*4        Rmag       (nr__) ! (mag) ? The Kron-Cousins R band magnitude (4)
      character*1   f_Rmag     (nr__) ! [J] Magnitude blended due to a close companion
      real*4        Imag       (nr__) ! (mag) ? The Kron-Cousins I band magnitude (4)
      character*1   f_Imag     (nr__) ! [J] Magnitude blended due to a close companion
      integer*4     o_Imag     (nr__) ! ? Number of VRI nights from REsearch
*                                    Consortium On Nearby Stars (RECONS;
*                                    http://www.recons.org/)
      integer*4     r_Imag     (nr__) ! ? Reference for RECONS VRI magnitudes
      character*1   New        (nr__) ! [U] Indicates updated RECONS VRI values (5)
      real*4        Jmag       (nr__) ! (mag) 2MASS J band magnitude
      character*2   f_Jmag     (nr__) ! Blended or inaccurate Jmag (6)
      real*4        Hmag       (nr__) ! (mag) 2MASS H band magnitude
      character*2   f_Hmag     (nr__) ! Blended or inaccurate Hmag (6)
      real*4        Kmag       (nr__) ! (mag) 2MASS Ks band magnitude
      character*2   f_Kmag     (nr__) ! Blended or inaccurate Kmag (6)
*Note (1): All proper motions are from SuperCOSMOS, except where noted. Some of
*     the proper motion values from the SuperCOSMOS Sky Survey for SCR objects
*     presented here differ slightly from those in the original discovery papers.
*     For the new values, a more comprehensive method has been used that provides
*     multiple measurements of proper motion between various plate pairs, while
*     before only a single value was available that incorporated all plates into
*     the solution simultaneously. The proper motions provided here are those
*     that yield consistent values among multiple determinations and are
*     preferred.
*Note (2): Flag on parallax defined as follows:
* a = The weighted mean parallax includes the parallax of both the primary and
*     the secondary components;
* b = The HIP parallax is markedly different from that published in the Yale
*     Parallax Catalog (YPC; Also called The General Catalogue of Trigonometric
*     Stellar Parallaxes, Fourth Edition, van Altena 1995, cat. I/174) and has
*     an error of ~45mas.
*Note (3): The wavelength ranges for the B_J_, R_59F_, and I_IVN_ filters are
*     3950-5400{AA}, 5900-6900{AA}, and 7150-9000{AA}, respectively (Morgan,
*     1995ASPC...84..137M, p137). See Section 3.1 for more details about the
*     B_J_R_59F_I_IVN_ plate photometry. The plate R_59F_ magnitude is the
*     second, more recent R epoch measurement of the two available in the
*     SuperCOSMOS Sky Survey.
*Note (4): Primarily the V_J_, R_KC_, I_KC_ magnitudes measured by REsearch
*     Consortium On Nearby Stars (RECONS; http://www.recons.org/) group at Cerro
*     Tololo Inter-American Observatory (CTIO) and the number of observations,
*     or VRI from a trusted source. The central wavelengths for the V_J_(old),
*     V_J_(new), R_KC_, and I_KC_ filters are 5438, 5475, 6425, and 8075{AA},
*     respectively. See Jao et al., 2011AJ....141..117J, for a discussion of the
*     nearly identical V_J_(old) and V_J_(new) filters. See Section 3.2 for more
*     details about the V_J_R_KC_I_KC_ CCD photometry.
*Note (5):
* u = We have previously published photometry for this object, but have since
*     then acquired more data and updated the value.
*Note (6): Flag on 2MASS magnitude defined as follows:
* J = Indicates that light from a close companion has resulted in blended
*     photometry;
* c = 2MASS magnitude error greater than 0.05mag.

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

C  Declarations for 'table2.dat'	! Derived data for southern red dwarf systems

      integer*4 nr__1
      parameter (nr__1=1748)	! Number of records
      character*98 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)

      character*14  Name2      (nr__1) ! Name of the M dwarf primary (G1)
      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)
      integer*4     DEs_1      (nr__1) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        dplt       (nr__1) ! (pc) ? The plate derived distance (7)
      character*3   f_dplt     (nr__1) ! Distance closer or further than estimated (8)
      real*4        e_dplt     (nr__1) ! (pc) ? Total error in dplt
      integer*4     o_dplt     (nr__1) ! Number of relations used in dplt
      real*4        dccd       (nr__1) ! (pc) ? The CCD derived distance (9)
      character*3   f_dccd     (nr__1) ! Distance closer or further than estimated (8)
      real*4        e_dccd     (nr__1) ! (pc) ? Total error in dccd
      integer*4     o_dccd     (nr__1) ! ? Number of relations used in dccd
      real*4        dtrig      (nr__1) ! (pc) ? Distance from weighted mean of published
*                                   parallaxes (see Section 3.4 for details)
      character*1   f_dtrig    (nr__1) ! [a] Indicates the weighted mean distance
*                                   includes that of both the primary and the
*                                   secondary components
      real*4        e_dtrig    (nr__1) ! (pc) ? Weighted mean error in dtrig
      integer*4     o_dtrig    (nr__1) ! ? Number of parallaxes used in dtrig
      real*4        dbest      (nr__1) ! (pc) [2.7/214] Most reliable distance
      character*1   f_dbest    (nr__1) ! Distance closer or further than estimated (8)
      character*3   n_dbest    (nr__1) ! Most reliable distance type (ccd, plt, trg)
*Note (7): Calculated by combining SuperCOSMOS BRI photometry with 2MASS infrared
*     photometry via a suite of 15 color-M_K_ relations using BRIJHK, as
*     described in Hambly et al. (2004AJ....128..437H). See Secion 4.1 for
*     additional details.
*Note (8): The flags on distance are defined as follows:
* c = Confirmed or candidate subdwarf (distance typically closer than estimated);
* f = Distance based on blended photometry (distance typically further than
*     estimated).
*Note (9): Determined using a method similar to that used for the plate derived
*     distances and as described by Henry et al. (2004AJ....128..437H). The
*     difference is that we use more accurate CCD VRI magnitudes obtained at
*     Cerro Tololo Inter-American Observatory (CTIO) instead of plate magnitudes
*     from SuperCOSMOS to determine the suite of color-M_K_ relations.
*     See Secion 4.2 for more details.

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref        (nr__2) ! Reference identifier
      character*19  BibCode    (nr__2) ! Bibliographic code
      character*21  Aut        (nr__2) ! Author's name
      character*21  Cat        (nr__2) ! Catalog in VizieR database

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

C  Loading file 'table1.dat'	! Observed data for southern red dwarf systems

C  Format for file interpretation

    1 format(
     +  A14,1X,I1,1X,I1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,
     +  F5.3,1X,F5.1,1X,I2,1X,F7.2,1X,A2,3X,F4.2,1X,I1,1X,A13,1X,F5.2,
     +  A1,1X,F5.2,A1,1X,F5.2,A1,1X,F5.2,A1,1X,F5.2,A1,1X,F5.2,A1,1X,
     +  I1,1X,I2,A1,1X,F5.2,A2,1X,F5.2,A2,1X,F5.2,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,1748
        read(1,'(A160)')ar__
        read(ar__,1)
     +  Name(i__),Nc(i__),Np(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),pm(i__),pmPA(i__),r_pm(i__),
     +  plx(i__),f_plx(i__),e_plx(i__),o_plx(i__),r_plx(i__),
     +  Bmag(i__),f_Bmag(i__),Fmag(i__),f_Fmag(i__),Nmag(i__),
     +  f_Nmag(i__),Vmag(i__),f_Vmag(i__),Rmag(i__),f_Rmag(i__),
     +  Imag(i__),f_Imag(i__),o_Imag(i__),r_Imag(i__),New(i__),
     +  Jmag(i__),f_Jmag(i__),Hmag(i__),f_Hmag(i__),Kmag(i__),
     +  f_Kmag(i__)
        if(ar__(18:18) .EQ. '') Np(i__) = iNULL__
        if(ar__(56:62) .EQ. '') plx(i__) = rNULL__
        if(ar__(69:72) .EQ. '') e_plx(i__) = rNULL__
        if(ar__(74:74) .EQ. '') o_plx(i__) = iNULL__
        if(ar__(90:94) .EQ. '') Bmag(i__) = rNULL__
        if(ar__(97:101) .EQ. '') Fmag(i__) = rNULL__
        if(ar__(104:108) .EQ. '') Nmag(i__) = rNULL__
        if(ar__(111:115) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(118:122) .EQ. '') Rmag(i__) = rNULL__
        if(ar__(125:129) .EQ. '') Imag(i__) = rNULL__
        if(ar__(132:132) .EQ. '') o_Imag(i__) = iNULL__
        if(ar__(134:135) .EQ. '') r_Imag(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)
     +  Name(i__),Nc(i__),Np(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),pm(i__),pmPA(i__),r_pm(i__),
     +  plx(i__),f_plx(i__),e_plx(i__),o_plx(i__),r_plx(i__),
     +  Bmag(i__),f_Bmag(i__),Fmag(i__),f_Fmag(i__),Nmag(i__),
     +  f_Nmag(i__),Vmag(i__),f_Vmag(i__),Rmag(i__),f_Rmag(i__),
     +  Imag(i__),f_Imag(i__),o_Imag(i__),r_Imag(i__),New(i__),
     +  Jmag(i__),f_Jmag(i__),Hmag(i__),f_Hmag(i__),Kmag(i__),
     +  f_Kmag(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 'table2.dat'	! Derived data for southern red dwarf systems

C  Format for file interpretation

    2 format(
     +  A14,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,F5.1,1X,A3,1X,
     +  F4.1,1X,I2,1X,F5.1,1X,A3,1X,F4.1,1X,I2,1X,F5.1,1X,A1,1X,F5.1,
     +  1X,I1,1X,F5.1,A1,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,1748
        read(1,'(A98)')ar__1
        read(ar__1,2)
     +  Name2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),dplt(i__),f_dplt(i__),
     +  e_dplt(i__),o_dplt(i__),dccd(i__),f_dccd(i__),e_dccd(i__),
     +  o_dccd(i__),dtrig(i__),f_dtrig(i__),e_dtrig(i__),o_dtrig(i__),
     +  dbest(i__),f_dbest(i__),n_dbest(i__)
        if(ar__1(37:41) .EQ. '') dplt(i__) = rNULL__
        if(ar__1(47:50) .EQ. '') e_dplt(i__) = rNULL__
        if(ar__1(55:59) .EQ. '') dccd(i__) = rNULL__
        if(ar__1(65:68) .EQ. '') e_dccd(i__) = rNULL__
        if(ar__1(70:71) .EQ. '') o_dccd(i__) = iNULL__
        if(ar__1(73:77) .EQ. '') dtrig(i__) = rNULL__
        if(ar__1(81:85) .EQ. '') e_dtrig(i__) = rNULL__
        if(ar__1(87:87) .EQ. '') o_dtrig(i__) = iNULL__
        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)
     +  Name2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),dplt(i__),f_dplt(i__),
     +  e_dplt(i__),o_dplt(i__),dccd(i__),f_dccd(i__),e_dccd(i__),
     +  o_dccd(i__),dtrig(i__),f_dtrig(i__),e_dtrig(i__),o_dtrig(i__),
     +  dbest(i__),f_dbest(i__),n_dbest(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 'refs.dat'	! References

C  Format for file interpretation

    3 format(I2,1X,A19,1X,A21,1X,A21)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,74
        read(1,'(A66)')ar__2
        read(ar__2,3)Ref(i__),BibCode(i__),Aut(i__),Cat(i__)
c    ..............Just test output...........
        write(6,3)Ref(i__),BibCode(i__),Aut(i__),Cat(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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