FORTRAN Generation
(/./ftp/cats/III/198)

Conversion of standardized ReadMe file for file /./ftp/cats/III/198 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-18
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. III/198             Palomar/MSU nearby star spectroscopic survey  (Hawley+ 1997)
*================================================================================
*The Palomar/MSU nearby star spectroscopic survey.
*I. The northern M dwarfs-band strengths and kinematics.
*     Reid I.N., Hawley S.L., Gizis J.E.
*    <Astron. J. 110, 1838 (1995) ; Erratum Vol. 111, 2469 (1996)>
*    =1995AJ....110.1838R
*II. The southern M dwarfs and investigations of magnetic activity.
*     Hawley S.L., Gizis J.E., Reid I.N.
*    <Astron. J. 112, 2799 (1996) ; Erratum Vol. 113, 1458 (1997)>
*    =1996AJ....112.2799H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'main.dat'	! Basic data (tables 1a of both papers, and table 1d
                              from paper I for Star numbers 3804-3810)

      integer*4 nr__
      parameter (nr__=1971)	! Number of records
      character*80 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*1   Sam        (nr__) ! [ns] n=North (paper I), s=South (paper II)
      integer*4     CNS3       (nr__) ! [1/3810]+= Star number (row in CNS3) (8)
      character*13  Name       (nr__) ! Star name (1)
      character*2   n_Name     (nr__) ! [abc eghijk*] Individual Note (2)
      character*1   Bin        (nr__) ! [ps] Primary or secondary binary comp. (3)
      integer*4     RAh        (nr__) ! (h) Right ascension, J2000
      integer*4     RAm        (nr__) ! (min) Right ascension, J2000
      real*4        RAs        (nr__) ! (s) Right ascension, J2000
      character*1   DE_        (nr__) ! Declination sign
      integer*4     DEd        (nr__) ! (deg) Declination, J2000
      integer*4     DEm        (nr__) ! (arcmin) Declination, J2000
      integer*4     DEs        (nr__) ! (arcsec) Declination, J2000
      integer*4     Src        (nr__) ! [0/4] Source of positional data (G1)
      real*4        VMag       (nr__) ! (mag) Absolute V magnitude
      character*1   n_VMag     (nr__) ! [ab] Note about ptg/ptm origin of VMag (5)
      real*4        r          (nr__) ! (pc) Distance (6)
      integer*4     e_r        (nr__) ! (%) Distance uncertainty (6)
      character*1   Dist       (nr__) ! [CSp ] Origin of r & M_V_ (9)
      integer*4     wPi        (nr__) ! (%) ? Weight for trigonometric parallax
      integer*4     wSp        (nr__) ! (%) ? Weight for spectroscopic parallax
      character*1   f_Sp       (nr__) ! Limit sign (<>) on Sp, or sd luminosity class
      character*5   Sp         (nr__) ! Spectral type (may include sd luminosity class)
      character*1   n_Sp       (nr__) ! [cdfk] Note about the spectrum (7)
*Note (1): Lists are abbreviated as:
*  Gl  = Gliese (1969, Veroff. Astr. Rechen-Instituts, Heidelberg, Nr. 22)
*  GJ  = Gliese & Jahreiss                               =1979A&AS...38..423G
*  Wo  = Woolley et al (1970, R. Obs. Ann., No. 5)       =Cat. <V/32>
*  LHS = Luyten Half-Second Catalogue                    =Cat. <I/87>
*  LTT = Luyten Two-Tenths Catalogue
*  LP  = Luyten Palomar proper-motion catalogue
*  G   = Giclas et al (1971, Lowell Proper Motion Survey) =Cat. <I/79>
*  GR  = Giclas et al (1971) red star               (see =1980LowOB...8..157G)
*  GH  = Giclas et al (1971) Hyades star            (see =1962LowOB...5..257G)
*        (Nomenclature note: should be named "HG")
*  Rob = Robertson (should be named RBTS)                =1984AJ.....89.1229R
*  Steph = Stephenson (1986, AJ, 91, 137)                =Cat. <III/123>
*        (Nomenclature note: should be named "StKM")
*  PS  = Pesch & Sanduleak                               =1978AJ.....83.1090P
*  San = Sanduleak                                       =1976AJ.....81..350S
*  vA  = van Altena                                      =1969AJ.....74....2V
*  V   = Vyssotsky (1963, Stars and Stellar Systems III, Basic Astronomical Data,
*        edited by K. Aa Strand; University of Chicago Press, Chicago; p. 192)
*        (Nomemclature Note: should be named MCC         =Cat. <III/13>)
*Note (2): Flags as follows:
*   a = Low quality trigonometric parallax
*   b = Poor photometry
*   c = Accurate parallax and good photometry. Both components of Gl 799
*       lie above the main-sequence.
*   e = 629 (Hy 207) appears twice in the preliminary version of the CNS3
*   g = 2172: This star is not listed as double in the LHS
*   h = 2426 (GJ 2112 A): Eggen (1980ApJS...43..457E) notes that this
*       star appears to be a double in good seeing, but there are no
*       confirming observations.
*   i = 2805 (GSC036B-821) is listed in the CNS3 as a companion of V796,
*       but the authors find that the radial velocity differs by 50km/s
*   j = star from Brosch & Goldberg (1994MNRAS.268L..27B)
*   k = star from Irwin et al. (1991MNRAS.252p..61I)
*   * = star position corrected at CDS (see also the file "errata.htx")
*Note (3): Components in a binary system are identified as
*      p (primary) or s (secondary, tertiary).
*Note (5): Flag as follows:
*   a = CNS3 lists a photographic magnitude - the authors assumed an
*       (m(pg)-V) colour of 1.5 magnitudes
*   b = CNS3 lists a `photometric' magnitude for this star
*Note (6): Distance and estimated uncertainty (%) from the authors' data, using
*     a weighted combination of trigonometric and spectroscopic parallaxes.
*Note (7): Flag as follows:
*   c = Spectral type from Kirkpatrick et al (1995AJ....109..797K)
*   d = Strong CaH - probable metal-poor disk dwarf or halo subdwarf
*   f = 1752: Leggett & Hawkins (1988MNRAS.234.1065L) suggest, on the 
*       basis of JHK colours, that this star might be a giant, but our 
*       spectra are consistent with classification as a dwarf. Note that
*       the V magnitude listed by LH88 is 8.07, while the CNS3 magnitude 
*       is 11.4 (photometric estimate). The authors observed a star of 
*       the latter magnitude. There is a nearby 8th magnitude SAO star 
*       (SAO 7382) - listed as K5, luminosity class unknown but {mu}~0"/yr
*       which Leggett & Hawkins may have observed by mistake.
*   k = Spectral type from Kirkpatrick et al. (1995AJ....109..797K)
*Note (8): Numbers 3804 to 3810 are the additional stars from
*          table 1d in paper I.
*Note (9): Origin of distance and absolute magnitude as follows:
*   C = distance and absolute magnitude from CNS3
*   S = distance estimate is based on the authors' spectroscopic data
*   p = Distance estimate is based on trigonometric parallax

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

C  Declarations for 'binary.dat'	! Inaccessible binary companions (tables 1b)

      integer*4 nr__1
      parameter (nr__1=142)	! Number of records
      character*70 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*1   Sam_1      (nr__1) ! [ns] n=North (paper I), s=South (paper II)
      integer*4     CNS3_1     (nr__1) ! [1/3803]+= Star number (row number in CNS3)
      character*10  Name_1     (nr__1) ! Star name, references same as main.dat
      character*1   n_Name_1   (nr__1) ! [cdef] Individual Note (1)
      integer*4     RAh_1      (nr__1) ! (h) Right ascension, J2000
      integer*4     RAm_1      (nr__1) ! (min) Right ascension, J2000
      real*4        RAs_1      (nr__1) ! (s) Right ascension, J2000
      character*1   DE__1      (nr__1) ! Declination sign
      integer*4     DEd_1      (nr__1) ! (deg) Declination, J2000
      integer*4     DEm_1      (nr__1) ! (arcmin) Declination, J2000
      integer*4     DEs_1      (nr__1) ! (arcsec) Declination, J2000
      integer*4     Src_1      (nr__1) ! [0/4] Source of position, as in main.dat (G1)
      real*4        VMag_1     (nr__1) ! (mag) Absolute V magnitude (2)
      character*1   n_VMag_1   (nr__1) ! [ab] a=ptg, b=ptm VMag estimate (3)
      real*4        r_1        (nr__1) ! (pc) Distance (4)
      integer*4     e_r_1      (nr__1) ! (%) Distance uncertainty (4)
      real*4        Vmag1      (nr__1) ! (mag) Magnitude of primary star in the system
      real*4        dV         (nr__1) ! (mag) Magnitude difference
      character*1   l_dP       (nr__1) ! [~] Limit flag on dP
      real*4        dP         (nr__1) ! (arcsec) Separation
*Note (1): Flag as follows:
*   c = Gl 452B (1863) is listed as an f-type companion to Gl 452A, 7.5
*       magnitudes fainter and ~15 arcseconds distant. We were unable to
*       locate this star on the TV guider (r_lim_ ~21) of the Keck telescope.
*   d = The companion to LHS 2789 (2172) is listed in the LTT, but not in
*       the LHS and may not exist
*   e = Known VLM companion - Forrest et al., (1988ApJ...330L.119F)
*   f = Eggen (1980ApJS...43..457E) noted that the primary star appeared
*       double in good seeing, but there is no strong evidence for a
*       binary companion.
*Note (2): Absolute magnitudes have been calculated using the magnitudes
*     listed in the CNS3 and the distance estimate to the primary star
*     (either from CNS3 or main file)
*Note (3):
*   a = CNS3 lists a photographic magnitude
*   b = CNS3 lists a 'photometric' magnitude estimate
*Note (4): Distance and estimated uncertainty (%) from the authors' data,
*     using a weighted combination of trigonometric and spectroscopic parallaxes.

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

C  Declarations for 'notobs.dat'	! Stars not observed (table 1d, paper II)

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

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

      integer*4     CNS3_2     (nr__2) ! [1/3803] Star number (row number in CNS3)
      character*9   Name_2     (nr__2) ! Star name
      character*1   n_Name_2   (nr__2) ! [ab] Individual note (1)
      character*1   Bin_1      (nr__2) ! [ps] Primary or secondary binary component
      integer*4     RAh_2      (nr__2) ! (h) Right ascension, J2000
      integer*4     RAm_2      (nr__2) ! (min) Right ascension, J2000
      real*4        RAs_2      (nr__2) ! (s) Right ascension, J2000
      character*1   DE__2      (nr__2) ! Declination sign
      integer*4     DEd_2      (nr__2) ! (deg) Declination, J2000
      integer*4     DEm_2      (nr__2) ! (arcmin) Declination, J2000
      integer*4     DEs_2      (nr__2) ! (arcsec) Declination, J2000
      integer*4     Src_2      (nr__2) ! [0/4] Source of position, as in main.dat (G1)
      real*4        VMag_2     (nr__2) ! (mag) Absolute V magnitude
      real*4        r_2        (nr__2) ! (pc) Distance
      integer*4     e_r_2      (nr__2) ! (%) Distance uncertainty
*Note (1): Flag as follows:
*  a = Gl 127.1B probably does not exist. Gliese (1969, Veroff. Astr.
*      Rechen-Instituts, Heidelberg, Nr. 22) lists a 'red companion at 8
*      arcseconds', but no companion brighter than R~17 was visible with the
*      LCO Du Pont telescope. Bessell (1990A&AS...83..357B) lists colours of
*      (B-V)=0.615, (V-I)=0.70, suggesting either a white dwarf companion or
*      observations of a background star.
*  b = Our spectrum indicates that this star is an M-dwarf, but the 
*      6th magnitude primary, CP-73 2192, at 8 arcseconds distance prevents
*      accurate bandstrength measurements.

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

C  Declarations for 'early.dat'	! Early-type stars, giants and degenerates (tables 1c)

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

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

      character*1   Sam_2      (nr__3) ! [ns] n=North (paper I), s=South (paper II)
      integer*4     CNS3_3     (nr__3) ! [1/3803]+ Star number (row number in CNS3)
      character*14  Name_3     (nr__3) ! Star name, references same as main.dat
      character*1   f_Name     (nr__3) ! [e] Possible error flag (4)
      character*1   Bin_2      (nr__3) ! [ps] Primary or secondary binary comp. (1)
      integer*4     RAh_3      (nr__3) ! (h) Right ascension, J2000
      integer*4     RAm_3      (nr__3) ! (min) Right ascension, J2000
      real*4        RAs_3      (nr__3) ! (s) Right ascension, J2000
      character*1   DE__3      (nr__3) ! Declination sign
      integer*4     DEd_3      (nr__3) ! (deg) Declination, J2000
      integer*4     DEm_3      (nr__3) ! (arcmin) Declination, J2000
      integer*4     DEs_3      (nr__3) ! (arcsec) Declination, J2000
      integer*4     Src_3      (nr__3) ! [0/4] Source of position, as in main.dat (G1)
      real*4        Vmag_3     (nr__3) ! (mag) V magnitude from the CNS3
      real*4        VMag_4     (nr__3) ! (mag) Absolute V magnitude (2)
      character*3   n_r        (nr__3) ! [abcd fg] Note about distance (4)
      integer*4     r_3        (nr__3) ! (pc) Distance
      character*7   Sp_1       (nr__3) ! Spectral type
      character*1   Note       (nr__3) ! [def] Additional notes (5)
*Note (1): Components in a binary system are identified as
*         p (primary) or s (secondary, tertiary).
*Note (2): absolute magnitudes are derived:
*  * In North, using Reid & Murray's (1992AJ....103..514R) (M_V_, (B-V)) 
*    relation unless otherwise indicated.
*  * In South, from (B-V) colours listed in the CNS3 unless otherwise indicated.
*Note (4): Flag as follows:
*   a = distance estimated from spectral type;
*   b = distance estimated based on companion star;
*   c = spectral types suggest that these stars are not associated
*       with the nominal primary star.
*   d = distance from CNS3
*   e = listed in the LHS as proper motion companion to LHS 2405
*       (I/87 main file); it is possible that we have observed the wrong star
*   f = FS Comae: distance based on Jura & Kleinmann's (1992ApJS...83..329J) M_K_
*   g = distance from McCook & Sion (1987ApJS...65..603M) (M_V_, B-V) relations
*Note (5): Flag as follows:
*   d = 757: foreground reddening probably present
*   e = Gl 288B is the well-known low-luminosity white dwarf, van Biesbroeck 3
*   f = Gl 432B is the well-known low-luminosity white dwarf, van Biesbroeck 4

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

C  Declarations for 'spectro.dat'	! Bandstrengths (table 3 of paper I and
                              table 2 of paper II)

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

      character*1   Sam_3      (nr__4) ! [ns] n=North (paper I), s=South (paper II)
      integer*4     CNS3_4     (nr__4) ! [1/3810]+= Star number (row number in CNS3)
      character*1   m_CNS3     (nr__4) ! Multiplicity index on star
      real*4        TiO1       (nr__4) ! ? TiO1 index: F(6718-6723)/F(6703-6708)
      real*4        TiO2       (nr__4) ! ? TiO2 index: F(7058-7061)/F(7043-7046)
      real*4        TiO3       (nr__4) ! ? TiO3 index: F(7092-7097)/F(7079-7084)
      real*4        TiO4       (nr__4) ! ? TiO4 index: F(7130-7135)/F(7115-7120)
      real*4        TiO5       (nr__4) ! ? TiO5 index: F(7126-7135)/F(7042-7046)
      real*4        CaH1       (nr__4) ! ? CaH1 index: F(6380-6390)/F(6345-6355,6410-6420))
      real*4        CaH2       (nr__4) ! ? CaH2 index: F(6814-6846)/F(7042-7046)
      real*4        CaH3       (nr__4) ! ? CaH3 index: F(6960-6990)/F(7042-7046)
      real*4        CaOH       (nr__4) ! ? CaOH index: F(6230-6240)/F(6345-6354)
      real*4        Halpha     (nr__4) ! ? H-{alpha} index: F(6560-6566)/F(6545-6555)

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

C  Declarations for 'vel.dat'	! Radial velocities and space motions
                              (table 5 of paper I and table 3 of paper II)

      integer*4 nr__5
      parameter (nr__5=1971)	! Number of records
      character*51 ar__5  	! Full-size record

      character*1   Sam_4      (nr__5) ! [ns] n=North (paper I), s=South (paper II)
      integer*4     CNS3_5     (nr__5) ! [1/3810]+= Star number (row number in CNS3)
      character*1   m_CNS3_1   (nr__5) ! Multiplicity index on star
      real*4        pmRA       (nr__5) ! (arcsec/yr) ? Proper motion in right ascension, from CNS3
      real*4        pmDE       (nr__5) ! (arcsec/yr) ? Proper motion in declination, from CNS3
      real*8        RV         (nr__5) ! (km/s) ? Radial velocity
      character*1   Note_1     (nr__5) ! [*] If no proper motions are available
      integer*4     U          (nr__5) ! (km/s) ? U space velocity
      integer*4     V          (nr__5) ! (km/s) ? V space velocity
      integer*4     W          (nr__5) ! (km/s) ? W space velocity
      real*4        VMag_5     (nr__5) ! (mag) Absolute V magnitude (from main.dat)

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

C  Declarations for 'dmestar.dat'	! Photometric and spectroscopic data for dMe stars
                              (table 4a of paper II)

      integer*4 nr__6
      parameter (nr__6=321)	! Number of records
      character*83 ar__6  	! Full-size record

      integer*4     CNS3_6     (nr__6) ! [1/3803]+ Star number (row number in CNS3)
      real*4        Halp       (nr__6) ! ? H-{alpha} index: F(6560-6566)/F(6545-6555)
      real*4        TiO2_1     (nr__6) ! ? TiO2 index: F(7058-7061)/F(7043-7046)
      real*4        TiO4_1     (nr__6) ! ? TiO4 index: F(7130-7135)/F(7115-7120)
      real*4        TiO5_1     (nr__6) ! ? TiO5 index: F(7126-7135)/F(7042-7046)
      real*4        Sp_2       (nr__6) ! Spectral type
      real*4        Mv         (nr__6) ! (mag) Absolute V magnitude
      real*4        Vmag_6     (nr__6) ! (mag) V magnitude
      real*4        R_I        (nr__6) ! (mag) ? R-I colour index
      real*4        V_I        (nr__6) ! (mag) ? V-I colour index
      integer*4     r_V_I      (nr__6) ! ? Reference for VRI photometry
      real*4        V_K        (nr__6) ! (mag) ? V-K colour index
      real*4        S_Hb       (nr__6) ! (10-13mW/m2) ? H{beta} flux
      real*4        S_Ha__S_Hb (nr__6) ! ? H{alpha} versus H{beta} flux ratio
      real*4        log_L_Ha__Lbol(nr__6) ! ? H{alpha} vs. bolometric luminosity ratio
      real*4        Mbol       (nr__6) ! (mag) ? Bolometric magnitude

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

C  Declarations for 'hyades.dat'	! Photometric and spectroscopic data for
                             Hyades stars (table 4b of paper II)

      integer*4 nr__7
      parameter (nr__7=25)	! Number of records
      character*68 ar__7  	! Full-size record

      integer*4     CNS3_7     (nr__7) ! [1/3803]+ Star number (row number in CNS3)
      real*4        Halp_1     (nr__7) ! ? H-{alpha} index: F(6560-6566)/F(6545-6555)
      real*4        TiO2_2     (nr__7) ! ? TiO2 index: F(7058-7061)/F(7043-7046)
      real*4        TiO4_2     (nr__7) ! ? TiO4 index: F(7130-7135)/F(7115-7120)
      real*4        TiO5_2     (nr__7) ! ? TiO5 index: F(7126-7135)/F(7042-7046)
      real*4        Sp_3       (nr__7) ! Spectral type
      real*4        Mv_1       (nr__7) ! (mag) Absolute V magnitude
      real*4        Vmag_7     (nr__7) ! (mag) V magnitude
      real*4        V_I_1      (nr__7) ! (mag) ? V-I colour index
      real*4        log_L_Ha__Lbol_1(nr__7) ! ? H{alpha} versus bolometric luminosity ratio
      real*4        log_LX_Lbol(nr__7) ! ? X-ray versus bolometric luminosity ratio
      real*4        Mbol_1     (nr__7) ! (mag) ? Bolometric magnitude

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

C  Declarations for 'ic2602.dat'	! Photometric and spectroscopic data for
                             IC 2602 stars (table 4c of paper II)

      integer*4 nr__8
      parameter (nr__8=26)	! Number of records
      character*68 ar__8  	! Full-size record

      integer*4     CNS3_8     (nr__8) ! [1/3803]+ Star number (row number in CNS3)
      real*4        Halp_2     (nr__8) ! ? H-{alpha} index: F(6560-6566)/F(6545-6555)
      real*4        TiO2_3     (nr__8) ! ? TiO2 index: F(7058-7061)/F(7043-7046)
      real*4        TiO4_3     (nr__8) ! ? TiO4 index: F(7130-7135)/F(7115-7120)
      real*4        TiO5_3     (nr__8) ! ? TiO5 index: F(7126-7135)/F(7042-7046)
      real*4        Sp_4       (nr__8) ! Spectral type
      real*4        Mv_2       (nr__8) ! (mag) Absolute V magnitude
      real*4        Vmag_8     (nr__8) ! (mag) V magnitude
      real*4        V_I_2      (nr__8) ! (mag) ? V-I colour index
      real*4        log_L_Ha__Lbol_1(nr__8) ! ? H{alpha} versus bolometric luminosity ratio
      real*4        log_LX_Lbol_1(nr__8) ! ? X-ray versus bolometric luminosity ratio
      real*4        Mbol_2     (nr__8) ! (mag) ? Bolometric magnitude

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

C  Loading file 'main.dat'	! Basic data (tables 1a of both papers, and table 1d
*                              from paper I for Star numbers 3804-3810)

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'main.dat')
      write(6,*) '....Loading file: main.dat'
      do i__=1,1971
        read(1,'(A80)')ar__
        read(ar__,1)
     +  Sam(i__),CNS3(i__),Name(i__),n_Name(i__),Bin(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  Src(i__),VMag(i__),n_VMag(i__),r(i__),e_r(i__),Dist(i__),
     +  wPi(i__),wSp(i__),f_Sp(i__),Sp(i__),n_Sp(i__)
        if(ar__(65:67) .EQ. '') wPi(i__) = iNULL__
        if(ar__(69:71) .EQ. '') wSp(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)
     +  Sam(i__),CNS3(i__),Name(i__),n_Name(i__),Bin(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  Src(i__),VMag(i__),n_VMag(i__),r(i__),e_r(i__),Dist(i__),
     +  wPi(i__),wSp(i__),f_Sp(i__),Sp(i__),n_Sp(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 'binary.dat'	! Inaccessible binary companions (tables 1b)

C  Format for file interpretation

    2 format(
     +  A1,I4,1X,A10,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,
     +  1X,I1,1X,F4.1,A1,1X,F4.1,1X,I2,1X,F4.1,1X,F4.1,A1,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'binary.dat')
      write(6,*) '....Loading file: binary.dat'
      do i__=1,142
        read(1,'(A70)')ar__1
        read(ar__1,2)
     +  Sam_1(i__),CNS3_1(i__),Name_1(i__),n_Name_1(i__),RAh_1(i__),
     +  RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),
     +  DEs_1(i__),Src_1(i__),VMag_1(i__),n_VMag_1(i__),r_1(i__),
     +  e_r_1(i__),Vmag1(i__),dV(i__),l_dP(i__),dP(i__)
        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)
     +  Sam_1(i__),CNS3_1(i__),Name_1(i__),n_Name_1(i__),RAh_1(i__),
     +  RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__),
     +  DEs_1(i__),Src_1(i__),VMag_1(i__),n_VMag_1(i__),r_1(i__),
     +  e_r_1(i__),Vmag1(i__),dV(i__),l_dP(i__),dP(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 'notobs.dat'	! Stars not observed (table 1d, paper II)

C  Format for file interpretation

    3 format(
     +  I4,1X,A9,1X,A1,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,
     +  1X,I1,1X,F5.2,1X,F4.1,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notobs.dat')
      write(6,*) '....Loading file: notobs.dat'
      do i__=1,21
        read(1,'(A55)')ar__2
        read(ar__2,3)
     +  CNS3_2(i__),Name_2(i__),n_Name_2(i__),Bin_1(i__),RAh_2(i__),
     +  RAm_2(i__),RAs_2(i__),DE__2(i__),DEd_2(i__),DEm_2(i__),
     +  DEs_2(i__),Src_2(i__),VMag_2(i__),r_2(i__),e_r_2(i__)
        RAdeg_2(i__) = rNULL__
        DEdeg_2(i__) = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2(i__) .GT. -180) RAdeg_2(i__)=RAh_2(i__)*15.
        if(RAm_2(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAm_2(i__)/4.
        if(RAs_2(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAs_2(i__)/240.
        if(DEd_2(i__) .GE. 0) DEdeg_2(i__)=DEd_2(i__)
        if(DEm_2(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEm_2(i__)/60.
        if(DEs_2(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEs_2(i__)/3600.
        if(DE__2(i__).EQ.'-'.AND.DEdeg_2(i__).GE.0) DEdeg_2(i__)=-DEdeg_2(i__)
c    ..............Just test output...........
        write(6,3)
     +  CNS3_2(i__),Name_2(i__),n_Name_2(i__),Bin_1(i__),RAh_2(i__),
     +  RAm_2(i__),RAs_2(i__),DE__2(i__),DEd_2(i__),DEm_2(i__),
     +  DEs_2(i__),Src_2(i__),VMag_2(i__),r_2(i__),e_r_2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_2(i__),DEdeg_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'early.dat'	! Early-type stars, giants and degenerates (tables 1c)

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'early.dat')
      write(6,*) '....Loading file: early.dat'
      do i__=1,98
        read(1,'(A74)')ar__3
        read(ar__3,4)
     +  Sam_2(i__),CNS3_3(i__),Name_3(i__),f_Name(i__),Bin_2(i__),
     +  RAh_3(i__),RAm_3(i__),RAs_3(i__),DE__3(i__),DEd_3(i__),
     +  DEm_3(i__),DEs_3(i__),Src_3(i__),Vmag_3(i__),VMag_4(i__),
     +  n_r(i__),r_3(i__),Sp_1(i__),Note(i__)
        RAdeg_3(i__) = rNULL__
        DEdeg_3(i__) = rNULL__
c  Derive coordinates RAdeg_3 and DEdeg_3 from input data
c  (RAdeg_3 and DEdeg_3 are set to rNULL__ when unknown)
        if(RAh_3(i__) .GT. -180) RAdeg_3(i__)=RAh_3(i__)*15.
        if(RAm_3(i__) .GT. -180) RAdeg_3(i__)=RAdeg_3(i__)+RAm_3(i__)/4.
        if(RAs_3(i__) .GT. -180) RAdeg_3(i__)=RAdeg_3(i__)+RAs_3(i__)/240.
        if(DEd_3(i__) .GE. 0) DEdeg_3(i__)=DEd_3(i__)
        if(DEm_3(i__) .GE. 0) DEdeg_3(i__)=DEdeg_3(i__)+DEm_3(i__)/60.
        if(DEs_3(i__) .GE. 0) DEdeg_3(i__)=DEdeg_3(i__)+DEs_3(i__)/3600.
        if(DE__3(i__).EQ.'-'.AND.DEdeg_3(i__).GE.0) DEdeg_3(i__)=-DEdeg_3(i__)
c    ..............Just test output...........
        write(6,4)
     +  Sam_2(i__),CNS3_3(i__),Name_3(i__),f_Name(i__),Bin_2(i__),
     +  RAh_3(i__),RAm_3(i__),RAs_3(i__),DE__3(i__),DEd_3(i__),
     +  DEm_3(i__),DEs_3(i__),Src_3(i__),Vmag_3(i__),VMag_4(i__),
     +  n_r(i__),r_3(i__),Sp_1(i__),Note(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_3(i__),DEdeg_3(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'spectro.dat'	! Bandstrengths (table 3 of paper I and
*                              table 2 of paper II)

C  Format for file interpretation

    5 format(
     +  A1,I4,A1,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,
     +  F4.2,1X,F4.2,1X,F4.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'spectro.dat')
      write(6,*) '....Loading file: spectro.dat'
      do i__=1,2008
        read(1,'(A57)')ar__4
        read(ar__4,5)
     +  Sam_3(i__),CNS3_4(i__),m_CNS3(i__),TiO1(i__),TiO2(i__),
     +  TiO3(i__),TiO4(i__),TiO5(i__),CaH1(i__),CaH2(i__),CaH3(i__),
     +  CaOH(i__),Halpha(i__)
        if(ar__4(8:11) .EQ. '') TiO1(i__) = rNULL__
        if(ar__4(13:16) .EQ. '') TiO2(i__) = rNULL__
        if(ar__4(18:21) .EQ. '') TiO3(i__) = rNULL__
        if(ar__4(23:26) .EQ. '') TiO4(i__) = rNULL__
        if(ar__4(28:31) .EQ. '') TiO5(i__) = rNULL__
        if(ar__4(33:36) .EQ. '') CaH1(i__) = rNULL__
        if(ar__4(38:41) .EQ. '') CaH2(i__) = rNULL__
        if(ar__4(43:46) .EQ. '') CaH3(i__) = rNULL__
        if(ar__4(48:51) .EQ. '') CaOH(i__) = rNULL__
        if(ar__4(53:57) .EQ. '') Halpha(i__) = rNULL__
c    ..............Just test output...........
        write(6,5)
     +  Sam_3(i__),CNS3_4(i__),m_CNS3(i__),TiO1(i__),TiO2(i__),
     +  TiO3(i__),TiO4(i__),TiO5(i__),CaH1(i__),CaH2(i__),CaH3(i__),
     +  CaOH(i__),Halpha(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'vel.dat'	! Radial velocities and space motions
*                              (table 5 of paper I and table 3 of paper II)

C  Format for file interpretation

    6 format(
     +  A1,I4,A1,1X,F6.3,1X,F6.3,1X,F7.1,1X,A1,I5,1X,I4,1X,I4,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'vel.dat')
      write(6,*) '....Loading file: vel.dat'
      do i__=1,1971
        read(1,'(A51)')ar__5
        read(ar__5,6)
     +  Sam_4(i__),CNS3_5(i__),m_CNS3_1(i__),pmRA(i__),pmDE(i__),
     +  RV(i__),Note_1(i__),U(i__),V(i__),W(i__),VMag_5(i__)
        if(ar__5(8:13) .EQ. '') pmRA(i__) = rNULL__
        if(ar__5(15:20) .EQ. '') pmDE(i__) = rNULL__
        if(ar__5(22:28) .EQ. '') RV(i__) = rNULL__
        if(ar__5(31:35) .EQ. '') U(i__) = iNULL__
        if(ar__5(37:40) .EQ. '') V(i__) = iNULL__
        if(ar__5(42:45) .EQ. '') W(i__) = iNULL__
c    ..............Just test output...........
        write(6,6)
     +  Sam_4(i__),CNS3_5(i__),m_CNS3_1(i__),pmRA(i__),pmDE(i__),
     +  RV(i__),Note_1(i__),U(i__),V(i__),W(i__),VMag_5(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'dmestar.dat'	! Photometric and spectroscopic data for dMe stars
*                              (table 4a of paper II)

C  Format for file interpretation

    7 format(
     +  I4,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.1,1X,F5.2,1X,F5.2,1X,
     +  F4.2,1X,F4.2,1X,I1,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dmestar.dat')
      write(6,*) '....Loading file: dmestar.dat'
      do i__=1,321
        read(1,'(A83)')ar__6
        read(ar__6,7)
     +  CNS3_6(i__),Halp(i__),TiO2_1(i__),TiO4_1(i__),TiO5_1(i__),
     +  Sp_2(i__),Mv(i__),Vmag_6(i__),R_I(i__),V_I(i__),r_V_I(i__),
     +  V_K(i__),S_Hb(i__),S_Ha__S_Hb(i__),log_L_Ha__Lbol(i__),
     +  Mbol(i__)
        if(ar__6(6:10) .EQ. '') Halp(i__) = rNULL__
        if(ar__6(12:15) .EQ. '') TiO2_1(i__) = rNULL__
        if(ar__6(17:20) .EQ. '') TiO4_1(i__) = rNULL__
        if(ar__6(22:25) .EQ. '') TiO5_1(i__) = rNULL__
        if(ar__6(44:47) .EQ. '') R_I(i__) = rNULL__
        if(ar__6(49:52) .EQ. '') V_I(i__) = rNULL__
        if(ar__6(54:54) .EQ. '') r_V_I(i__) = iNULL__
        if(ar__6(56:59) .EQ. '') V_K(i__) = rNULL__
        if(ar__6(61:65) .EQ. '') S_Hb(i__) = rNULL__
        if(ar__6(67:71) .EQ. '') S_Ha__S_Hb(i__) = rNULL__
        if(ar__6(73:77) .EQ. '') log_L_Ha__Lbol(i__) = rNULL__
        if(ar__6(79:83) .EQ. '') Mbol(i__) = rNULL__
c    ..............Just test output...........
        write(6,7)
     +  CNS3_6(i__),Halp(i__),TiO2_1(i__),TiO4_1(i__),TiO5_1(i__),
     +  Sp_2(i__),Mv(i__),Vmag_6(i__),R_I(i__),V_I(i__),r_V_I(i__),
     +  V_K(i__),S_Hb(i__),S_Ha__S_Hb(i__),log_L_Ha__Lbol(i__),
     +  Mbol(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'hyades.dat'	! Photometric and spectroscopic data for
*                             Hyades stars (table 4b of paper II)

C  Format for file interpretation

    8 format(
     +  I4,1X,F5.2,1X,F5.3,1X,F5.3,1X,F5.3,1X,F4.1,1X,F5.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'hyades.dat')
      write(6,*) '....Loading file: hyades.dat'
      do i__=1,25
        read(1,'(A68)')ar__7
        read(ar__7,8)
     +  CNS3_7(i__),Halp_1(i__),TiO2_2(i__),TiO4_2(i__),TiO5_2(i__),
     +  Sp_3(i__),Mv_1(i__),Vmag_7(i__),V_I_1(i__),
     +  log_L_Ha__Lbol_1(i__),log_LX_Lbol(i__),Mbol_1(i__)
        if(ar__7(6:10) .EQ. '') Halp_1(i__) = rNULL__
        if(ar__7(12:16) .EQ. '') TiO2_2(i__) = rNULL__
        if(ar__7(18:22) .EQ. '') TiO4_2(i__) = rNULL__
        if(ar__7(24:28) .EQ. '') TiO5_2(i__) = rNULL__
        if(ar__7(47:50) .EQ. '') V_I_1(i__) = rNULL__
        if(ar__7(52:56) .EQ. '') log_L_Ha__Lbol_1(i__) = rNULL__
        if(ar__7(58:62) .EQ. '') log_LX_Lbol(i__) = rNULL__
        if(ar__7(64:68) .EQ. '') Mbol_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,8)
     +  CNS3_7(i__),Halp_1(i__),TiO2_2(i__),TiO4_2(i__),TiO5_2(i__),
     +  Sp_3(i__),Mv_1(i__),Vmag_7(i__),V_I_1(i__),
     +  log_L_Ha__Lbol_1(i__),log_LX_Lbol(i__),Mbol_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'ic2602.dat'	! Photometric and spectroscopic data for
*                             IC 2602 stars (table 4c of paper II)

C  Format for file interpretation

    9 format(
     +  I4,1X,F5.2,1X,F5.3,1X,F5.3,1X,F5.3,1X,F4.1,1X,F5.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ic2602.dat')
      write(6,*) '....Loading file: ic2602.dat'
      do i__=1,26
        read(1,'(A68)')ar__8
        read(ar__8,9)
     +  CNS3_8(i__),Halp_2(i__),TiO2_3(i__),TiO4_3(i__),TiO5_3(i__),
     +  Sp_4(i__),Mv_2(i__),Vmag_8(i__),V_I_2(i__),
     +  log_L_Ha__Lbol_1(i__),log_LX_Lbol_1(i__),Mbol_2(i__)
        if(ar__8(6:10) .EQ. '') Halp_2(i__) = rNULL__
        if(ar__8(12:16) .EQ. '') TiO2_3(i__) = rNULL__
        if(ar__8(18:22) .EQ. '') TiO4_3(i__) = rNULL__
        if(ar__8(24:28) .EQ. '') TiO5_3(i__) = rNULL__
        if(ar__8(47:50) .EQ. '') V_I_2(i__) = rNULL__
        if(ar__8(52:56) .EQ. '') log_L_Ha__Lbol_1(i__) = rNULL__
        if(ar__8(58:62) .EQ. '') log_LX_Lbol_1(i__) = rNULL__
        if(ar__8(64:68) .EQ. '') Mbol_2(i__) = rNULL__
c    ..............Just test output...........
        write(6,9)
     +  CNS3_8(i__),Halp_2(i__),TiO2_3(i__),TiO4_3(i__),TiO5_3(i__),
     +  Sp_4(i__),Mv_2(i__),Vmag_8(i__),V_I_2(i__),
     +  log_L_Ha__Lbol_1(i__),log_LX_Lbol_1(i__),Mbol_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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