FORTRAN Generation
(/./ftp/cats/J/AJ/160/44)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/160/44 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.



++++Only one proper motion (pmDec) found for: table1.dat
      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/160/44      Upper Scorpius spectroscopy and photometry      (Luhman+, 2020)
*================================================================================
*Refining the Census of the Upper Scorpius Association with Gaia.
*    Luhman K.L., Esplin T.L.
*   <Astron. J., 160, 44 (2020)>
*   =2020AJ....160...44L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Candidate members of Upper Sco

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

C  J2000 position composed of: RAdeg DEdeg
      character*17  v2MASS     (nr__) ! 2MASS Point Source Catalog source name
      character*19  WISEA      (nr__) ! AllWISE Source Catalog source name
      character*19  UGCS       (nr__) ! UKIDSS Galactic Clusters Survey source name (1)
      integer*8     Gaia       (nr__) ! ? Gaia DR2 source name
      real*8        RAdeg      (nr__) ! (deg) [233/252] Right Ascension (J2000)
      real*8        DEdeg      (nr__) ! (deg) [-30/-16] Declination (J2000)
      character*6   r_RAdeg    (nr__) ! Reference for position (2)
      character*5   SpType     (nr__) ! Spectral type
      integer*4     r_SpType   (nr__) ! ? Spectral type reference
      real*8        pmRA       (nr__) ! (mas/yr) [-33/3]? Proper motion in RA from Gaia DR2
      real*4        e_pmRA     (nr__) ! (mas/yr) [0.07/4.1]? Error in pmRA
      real*8        pmDec      (nr__) ! (mas/yr) [-40/-3.1]? Proper motion in Dec from Gaia DR2
      real*4        e_pmDec    (nr__) ! (mas/yr) [0.03/3.2]? Error in pmDec
      real*4        plx        (nr__) ! (mas) [0.25/16]? Parallax from Gaia DR2
      real*4        e_plx      (nr__) ! (mas) [0.03/1.8]? Error in plx
      real*4        Gmag       (nr__) ! (mag) [9.02/21.2]? G magnitude from Gaia DR2
      real*4        e_Gmag     (nr__) ! (mag) [0.001/0.09]? Error in Gmag
      real*4        GBPmag     (nr__) ! (mag) [9.25/22.4]? GBP magnitude from Gaia DR2
      real*4        e_GBPmag   (nr__) ! (mag) [0.001/0.42]? Error in GBPmag
      real*4        GRPmag     (nr__) ! (mag) [8.66/19.3]? GRP magnitude from Gaia DR2
      real*4        e_GRPmag   (nr__) ! (mag) [0.001/0.21]? Error in GRPmag
      real*4        RUWE       (nr__) ! [0.82/58.5]? Renormalized unit weight error (3)
      real*4        Jmag       (nr__) ! (mag) [8.29/19.5]? J band magnitude
      real*4        e_Jmag     (nr__) ! (mag) [0.02/0.15]? Error in Jmag
      real*4        Hmag       (nr__) ! (mag) [7.9/18.5]? H band magnitude
      real*4        e_Hmag     (nr__) ! (mag) [0.02/0.15]? Error in Hmag
      real*4        Ksmag      (nr__) ! (mag) [7.48/17.3]? Ks band magnitude
      real*4        e_Ksmag    (nr__) ! (mag) [0.01/0.1]? Error in Ksmag
      character*3   r_JHKmag   (nr__) ! ? JHK reference (4)
      character*49  Sel        (nr__) ! Selection criteria satisfied by candidate (5)
      real*4        Sep        (nr__) ! (arcsec) [0.66/4.29]? Angular separation (6)
      integer*8     CompGaia   (nr__) ! ? Gaia DR2 source name (6)
*Note (1): Based on coordinates from DR10 of the UKIDSS Galactic Clusters
*          Survey for stars with Ks>10mag from 2MASS.
*Note (2): References as follows:
*          2MASS = 2MASS Point Source Catalog; II/246 (2 occurrences)
*          Gaia = Gaia DR2; I/345 (481 occurrences)
*          UKIDSS = UKIDSS Galactic Clusters Survey DR10 (76 occurrences)
*          VHS = VISTA VHS DR6 (8 occurrences)
*Note (3): From Lindegren, 2018, http://www.rssd.esa.int/doc_fetch.php?id=3757412
*Note (4):
*    2 = 2MASS Point Source Catalog, II/246
*    u = DR10 of the UKIDSS Galactic Clusters Survey;
*    v = DR6 of VISTA VHS.
*Note (5):
*                    G/W/i/Y/Z/ip/zp/yp = CMDs in Luhman et al. (2018);
*                                    pi = parallax from Gaia DR2;
*    gaia/gps/ucac/2m-gaia/2m-ps/ukidss = proper motions in
*                                         Luhman et al. (2018) and this work.
*Note (6): Of nearest known young star within 5".

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

C  Declarations for 'table2.dat'	! Observing log

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

      character*14  Tel        (nr__1) ! Telescope used
      character*11  Inst       (nr__1) ! Instrument used
      character*9   Disp       (nr__1) ! Disperser
      character*10  Aper       (nr__1) ! Aperture
      character*9   lambda     (nr__1) ! (um) Wavelength coverage
      character*6   R          (nr__1) ! Resolution
      integer*4     Ntarget    (nr__1) ! [3/179] Number of observed targets

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

C  Declarations for 'table3.dat'	! Spectroscopic data for candidate members of
                              Upper Sco

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

C  J2000 position composed of: RAdeg DEdeg
      character*24  Name       (nr__2) ! Source Name (1)
      real*8        RAdeg_1    (nr__2) ! (deg) [235/251] Right Ascension (J2000)
      real*8        DEdeg_1    (nr__2) ! (deg) [-30/-16] Declination (J2000)
      character*11  SpType_1   (nr__2) ! Spectral type (2)
      character*1   l_EWLi     (nr__2) ! Limit flag on EWLi
      real*4        EWLi       (nr__2) ! (0.1nm) [0.1/0.8]? Equivalent Width of Li (3)
      character*1   f_EWLi     (nr__2) ! [:] Uncertainty flag on EWLi (1 occurrence)
      character*11  Inst_1     (nr__2) ! Instrument used (4)
      integer*4     Obs_Y      (nr__2) ! (yr) [2018/2020] Year of observation
      character*3   Obs_M      (nr__2) ! ("month") Month of observation
      integer*4     Obs_D      (nr__2) ! (d) Day of observation
      integer*4     Obs_Y_2    (nr__2) ! (yr) [2019]? Year of second observation
      character*3   Obs_M_2    (nr__2) ! ("month") Month of second observation
      integer*4     Obs_D_2    (nr__2) ! (d) ? Day of second observation
      character*2   Young      (nr__2) ! Young? Y=yes, N=No or ?=unknown
*Note (1): Source names are from DR2 of Gaia, DR10 of the UKIDSS Galactic
*          Clusters Survey, and the 2MASS Point Source Catalog.
*Note (2): Uncertainties are 0.25 and 0.5 subclass for optical and IR spectral
*          types, respectively, unless indicated otherwise.
*Note (3): Typical uncertainties are 0.05{AA}.
*Note (4): Instruments as follows:
*          BC = Bok Reflector /B&C at the Steward Observatory (24 occurrences)
*          COSMOS = 4m Blanco telescope at the Cerro Tololo Inter-American
*                   Observatory (177 occurrences)
*          SpeX = The NASA Infrared Telescope Facility (179 occurrences)
*          FIRE = The Magellan Baade telescope at Las Campanas Observatory
*                 (3 occurrences)
*          FLAMINGOS-2 = Gemini South observatory (3 occurrences)
*          GNIRS = Gemini North observatory (47 occurrences)

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

C  Declarations for 'table4.dat'	! Young stars toward Upper Sco

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

C  J2000 position composed of: RAdeg DEdeg
      character*18  v2MASS_1   (nr__3) ! 2MASS Point Source Catalog source name
      character*20  WISEA_1    (nr__3) ! AllWISE Source Catalog source name (1)
      character*19  UGCS_1     (nr__3) ! UKIDSS Galactic Clusters Survey source name (2)
      integer*8     Gaia_1     (nr__3) ! ? Gaia DR2 source name
      character*54  Name_1     (nr__3) ! Other source name
      real*8        RAdeg_2    (nr__3) ! (deg) [233/254] Right Ascension (J2000)
      real*8        DEdeg_2    (nr__3) ! (deg) [-34/-14] Declination  (J2000)
      character*6   r_RAdeg_1  (nr__3) ! Reference for RA & Dec (3)
      character*23  SpType_2   (nr__3) ! Spectral type
      character*13  r_SpType_1 (nr__3) ! Spectral type reference
      character*6   SpT        (nr__3) ! Adopted spectral type
      real*4        Ak         (nr__3) ! (mag) [0/1.469]? Extinction in Ks
      character*5   f_Ak       (nr__3) ! Method of extinction estimation (4)
      real*8        pmRA_1     (nr__3) ! (mas/yr) [-39.768/2.768]? Proper motion in RA from
*                                Gaia DR2
      real*4        e_pmRA_1   (nr__3) ! (mas/yr) [0.056/4.184]? Error in pmRA
      real*8        pmDE       (nr__3) ! (mas/yr) [-48.798/-9.414]? Proper motion in DE from
*                                Gaia DR2
      real*4        e_pmDE     (nr__3) ! (mas/yr) [0.039/2.619]? Error in pmDE
      real*4        plx_1      (nr__3) ! (mas) [0.764/14.907]? Parallax from Gaia DR2
      real*4        e_plx_1    (nr__3) ! (mas) [0.027/2.647]? Error in plx
      real*8        RVel       (nr__3) ! (km/s) [-40/114]? Radial velocity
      real*4        e_RVel     (nr__3) ! (km/s) [0.04/4]? Error in RVel
      character*1   f_RVel     (nr__3) ! [r] Indicates RVel ranges between 1 and 2
      integer*4     r_RVel     (nr__3) ! [1/21]? Reference in RVel (5)
      real*4        U          (nr__3) ! (km/s) [-40/12.2]? U component of space velocity
      real*4        e_U        (nr__3) ! (km/s) [0.07/3.8]? Error in U
      real*4        V          (nr__3) ! (km/s) [-23.1/-9.03]? V component of space velocity
      real*4        e_V        (nr__3) ! (km/s) [0.09/2.1]? Error in V
      real*4        W          (nr__3) ! (km/s) [-16.9/3.52]? W component of space velocity
      real*4        e_W        (nr__3) ! (km/s) [0.07/1.8]? Error in W
      real*4        Gmag_1     (nr__3) ! (mag) [2.26/21.5]? G magnitude from Gaia DR2
      real*4        e_Gmag_1   (nr__3) ! (mag) [0/0.08]? Error in Gmag
      real*4        GBPmag_1   (nr__3) ! (mag) [2.98/22.2]? GBP magnitude from Gaia DR2
      real*4        e_GBPmag_1 (nr__3) ! (mag) [0.001/0.97]? Error in GBPmag
      real*4        GRPmag_1   (nr__3) ! (mag) [2.64/19.3]? GRP magnitude from Gaia DR2
      real*4        e_GRPmag_1 (nr__3) ! (mag) [0.001/0.33]? Error in GRPmag
      real*4        RUWE_1     (nr__3) ! [0.69/98]? Renormalized unit weight error (6)
      real*4        Jmag_1     (nr__3) ! (mag) [-2.73/19.5]? J band magnitude
      real*4        eJmag      (nr__3) ! (mag) [0.01/0.24]? Error in Jmag
      real*4        Hmag_1     (nr__3) ! (mag) [-3.49/18.2]? H band magnitude
      real*4        eHmag      (nr__3) ! (mag) [0.01/0.23]? Error in Hmag
      real*4        Ksmag_1    (nr__3) ! (mag) [-3.79/17.2]? Ks band magnitude
      real*4        eKsmag     (nr__3) ! (mag) [0.01/0.29]? Error in Ksmag
      character*3   r_JHKmag_1 (nr__3) ! ? JHKs reference (7)
      character*5   Pops       (nr__3) ! Gaia kinematic populations (8)
      character*1   memb_      (nr__3) ! Adopted member of Upper Sco? Y=Yes
*                                (1761 occurrences) or N=No (259 occurrences)
*Note (1): The following names are from the WISE All-Sky Source Catalog:
*          J160027.15-223850.5, J160414.16-212915.5, J161320.78-175752.3,
*          J161317.38-292220.0, J161837.22-240522.8, J162210.14-240905.4,
*          J162620.15-223312.8.
*Note (2): Based on coordinates from DR10 of the UKIDSS Galactic Clusters
*          Survey for stars with Ks>10 from 2MASS.
*Note (3): References as follows :
*          2MASS = 2MASS Point Source Catalog; II/246 (6 occurrences)
*          Gaia = Gaia = Gaia DR2; I/345 (1940 occurrences)
*          UKIDSS = UKIDSS Galactic Clusters Survey DR10 (70 occurrences)
*          bry = Bryan+, 2016ApJ...827..100B (1 occurrence)
*          ire = Ireland+, 2011ApJ...726..113I (1 occurrence)
*          lac = Lachapelle+, 2015ApJ...802...61L (2 occurrences)
*Note (4): Extinction estimated from a near-IR spectrum or the indicated color
*          assuming the intrinsic spectrum from Luhman+, 2017, J/AJ/153/46 or
*          the intrinsic color from the Appendix for the spectral type in
*          question.
*Note (5): References as follows
*    1 = Dahm+, 2012, J/ApJ/745/56
*    2 = Gaia DR2, 2018, I/345
*    3 = Jilinski+, 2006, J/A+A/448/1001
*    4 = Gontcharov, 2006, III/252
*    5 = Torres+, 2006, J/A+A/460/695
*    6 = Chen+, 2011AJ....738..122C
*    7 = Kurosawa+, 2006MNRAS.372.1879K
*    8 = Kunder+, 2017, III/279
*    9 = Durkan+, 2018A&A...618....5D
*   10 = Andersen & Nordstrom, 1983 III/127
*   11 = Muzerolle+, 2003ApJ...592..266M
*   12 = David+, 2016ApJ...827..161D
*   13 = White+, 2007, J/AJ/133/2524
*   14 = Mace+, 2012, J/AJ/144/55
*   15 = Prato+, 2002ApJ...569..863P
*   16 = Rice+, 2010ApJS..186...63R
*   17 = Alonso+, 2015A&A...584L...8A
*   18 = David+, 2016Natur.534..658D
*   19 = Eisner+, 2005ApJ...623..952E
*   20 = Wang+, 2018ApJ...865..141W
*   21 = David+, 2017ApJ...835..168D
*Note (6): From Lindegren, 2018, http://www.rssd.esa.int/doc_fetch.php?id=3757412
*Note (7): References as follows:
*    2 = 2MASS Point Source Catalog, II/246
*    u = UKIDSS Galactic Clusters Survey DR10
*    v = VISTA VHS DR6;
*    van = van der Bliek+, 1996, J/A+AS/119/547
*    duc = Ducati, 2002, II/237
*    luh = Luhman+, 2007ApJ...666.1219L
*    bow = Bowler+, 2011ApJ...743..148B
*    kra = Kraus+, 2014ApJ...781...20K
*    lac = Lachapelle+, 2015ApJ...802...61L
*Note (8): The Gaia parallax and proper motion are consistent with
*          populations as follows:
*    O/o = Ophiuchus;
*    U/u = Upper Sco;
*    S/s = remainder of Sco-Cen;
*      n = none of those populations. Upper case letters
*          Upper case letters indicate that both proper motion and parallax
*          support membership in that population. Lower case letters indicate
*          that either proper motion or parallax supports membership while
*          the other parameter is inaccurate, unreliable, or unavailable.

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

C  Declarations for 'table5.dat'	! Mid-IR photometry for adopted Members of Upper Sco

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

C  J2000 position composed of: RAdeg DEdeg
      character*18  v2MASS_2   (nr__4) ! 2MASS Point Source Catalog source name
      character*20  WISEA_2    (nr__4) ! AllWISE Source Catalog source name
      character*19  UGCS_2     (nr__4) ! UKIDSS Galactic Clusters Survey source name
      integer*8     Gaia_2     (nr__4) ! ? Gaia DR2 source name
      character*54  Name_2     (nr__4) ! Other source name
      real*8        RAdeg_3    (nr__4) ! (deg) [233/253] Right Ascension (J2000)
      real*8        DEdeg_3    (nr__4) ! (deg) [-32/-16] Declination (J2000)
      character*6   r_RAdeg_2  (nr__4) ! Reference for RA & Dec (1)
      real*4        v3_6mag    (nr__4) ! (mag) [6.03/15.3]? Spitzer/IRAC 3.6um magnitude
      real*4        e_3_6mag   (nr__4) ! (mag) [0.02/0.21]? Error in 3.6mag
      character*5   f_3_6mag   (nr__4) ! ? Flag on 3.6mag (2)
      real*4        v4_5mag    (nr__4) ! (mag) [2.89/15.1]? Spitzer/IRAC 4.5um magnitude
      real*4        e_4_5mag   (nr__4) ! (mag) [0.02/0.47]? Error in 4.5mag
      character*5   f_4_5mag   (nr__4) ! ? Flag on 4.5mag (2)
      real*4        v5_8mag    (nr__4) ! (mag) [4.88/13.7]? Spitzer/IRAC 5.8um magnitude
      real*4        e_5_8mag   (nr__4) ! (mag) [0.02/0.1]? Error in 5.8mag
      character*5   f_5_8mag   (nr__4) ! ? Flag on 5.8mag (2)
      real*4        v8_0mag    (nr__4) ! (mag) [3.02/13.3]? Spitzer/IRAC 8.0um magnitude
      real*4        e_8_0mag   (nr__4) ! (mag) [0.02/0.2]? Error in 8.0mag
      character*5   f_8_0mag   (nr__4) ! ? Flag on 8.0mag (2)
      real*4        v24mag     (nr__4) ! (mag) [0.47/11.5]? Spitzer/IRAC 24um magnitude
      real*4        e_24mag    (nr__4) ! (mag) [0.02/0.4]? Error in 24mag
      character*11  f_24mag    (nr__4) ! ? Flag on 24mag (2)
      real*4        W1mag      (nr__4) ! (mag) [-1.23/16.6]? WISE W1 magnitude
      real*4        e_W1mag    (nr__4) ! (mag) [0.01/0.43]? Error in W1mag
      character*5   f_W1mag    (nr__4) ! ? Flag on W1mag (2)
      real*4        W2mag      (nr__4) ! (mag) [6.02/15.8]? WISE W2 magnitude
      real*4        e_W2mag    (nr__4) ! (mag) [0.01/0.22]? Error in W2mag
      character*5   f_W2mag    (nr__4) ! ? Flag on W2mag (2)
      real*4        W3mag      (nr__4) ! (mag) [1.11/12.3]? WISE W3 magnitude
      real*4        e_W3mag    (nr__4) ! (mag) [0.01/0.48]? Error in W3mag
      character*11  f_W3mag    (nr__4) ! ? Flag on W3mag (2)
      real*4        W4mag      (nr__4) ! (mag) [-4.28/8.9]? WISE W4 magnitude
      real*4        e_W4mag    (nr__4) ! (mag) [0/0.52]? Error in W4mag
      character*11  f_W4mag    (nr__4) ! ? Flag on W4mag (2)
      character*2   Exc4_5     (nr__4) ! ? Excess present in 4.5?
      character*5   Exc8_0     (nr__4) ! ? Excess present in 8.0?
      character*2   Exc24      (nr__4) ! ? Excess present in 24?
      character*2   ExcW2      (nr__4) ! ? Excess present in W2?
      character*2   ExcW3      (nr__4) ! ? Excess present in W3?
      character*2   ExcW4      (nr__4) ! ? Excess present in W4?
      character*16  DiskType   (nr__4) ! ? Disk Type
*Note (1): References as follows :
*          2MASS = 2MASS Point Source Catalog; II/246 (6 occurrences)
*          Gaia = Gaia = Gaia DR2; I/345 (1682 occurrences)
*          UKIDSS = UKIDSS Galactic Clusters Survey DR10 (70 occurrences)
*          bry = Bryan+, 2016ApJ...827..100B (1 occurrence)
*          ire = Ireland+, 2011ApJ...726..113I (1 occurrence)
*          lac = Lachapelle+, 2015ApJ...802...61L (1 occurrence)
*Note (2): Flags as follows:
*     nodet = non-detection;
*       sat = saturated;
*       out = outside of the camera's field of view;
*        bl = photometry may be affected by blending with a nearby star;
*       ext = photometry is known or suspected to be contaminated by
*             extended emission (no data given when extended emission dominates);
*       dif = photometery may be affected by a diffraction spike;
*       bin = includes an unresolved binary companion;
*     unres = too close to a brighter star to be detected;
*     false = detection from WISE catalog appears false or unreliable based
*             on visual inspection;
*       off = W3 and/or W4 detection appears offset from the W1/W2 detection
*             (no data given when offset is due to a known source);
*       err = W2 magnitudes brighter than ~6 are erroneous.

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

C  Declarations for 'tablec1.dat'	! Intrinsic colors of young stars and brown dwarfs

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

      character*2   SpType_3   (nr__5) ! Spectral Type
      real*4        BP_RP      (nr__5) ! (mag) ? GBP-GRP for Gaia DR2 bands
      real*4        G_RP       (nr__5) ! (mag) ? G-GRP for Gaia DR2 bands
      real*4        RP_K       (nr__5) ! (mag) ? GRP-Ks  for Gaia DR2 bands
      real*4        J_H        (nr__5) ! (mag) J-H for 2MASS bands
      real*4        H_K        (nr__5) ! (mag) H-Ks for 2MASS bands
      real*4        K_3_6      (nr__5) ! (mag) ? Ks-3.6 for 2MASS and Spitzer bands
      real*4        K_4_5      (nr__5) ! (mag) Ks-4.5 for 2MASS and Spitzer bands (1)
      real*4        K_5_8      (nr__5) ! (mag) Ks-5.8 for 2MASS and Spitzer bands
      real*4        K_8_0      (nr__5) ! (mag) Ks-8.0 for 2MASS and Spitzer bands
      real*4        K_24       (nr__5) ! (mag) ? Ks-24 for 2MASS and Spitzer bands (2)
      real*4        K_W1       (nr__5) ! (mag) ? Ks-W1 for 2MASS and WISE bands
      real*4        K_W2       (nr__5) ! (mag) Ks-W2 for 2MASS and WISE bands (1)
      real*4        K_W3       (nr__5) ! (mag) ? Ks-W3 for 2MASS and WISE bands
      real*4        K_W4       (nr__5) ! (mag) ? Ks-W4 for 2MASS and WISE bands (2)
*Note (1): Same values listed for Ks-4.5 and Ks-W2.
*Note (2): Same values listed for Ks-[24] and Ks-W4.

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

C  Declarations for 'ref.dat'	! References used for spectral types

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

      integer*4     Ref        (nr__6) ! [1/93] Reference number
      character*21  Autor      (nr__6) ! Main autor of the reference
      character*19  BIB        (nr__6) ! BIBcode
      character*63  Cat        (nr__6) ! Catalogue or comment

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

C  Loading file 'table1.dat'	! Candidate members of Upper Sco

C  Format for file interpretation

    1 format(
     +  A17,1X,A19,1X,A19,1X,I19,1X,F10.6,1X,F10.6,1X,A6,1X,A5,1X,I2,
     +  F7.3,1X,F5.3,1X,F7.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,
     +  1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.2,1X,F5.2,1X,F4.2,1X,
     +  F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,A3,1X,A49,1X,F4.2,1X,I19)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,567
        read(1,'(A312)')ar__
        read(ar__,1)
     +  v2MASS(i__),WISEA(i__),UGCS(i__),Gaia(i__),RAdeg(i__),
     +  DEdeg(i__),r_RAdeg(i__),SpType(i__),r_SpType(i__),pmRA(i__),
     +  e_pmRA(i__),pmDec(i__),e_pmDec(i__),plx(i__),e_plx(i__),
     +  Gmag(i__),e_Gmag(i__),GBPmag(i__),e_GBPmag(i__),GRPmag(i__),
     +  e_GRPmag(i__),RUWE(i__),Jmag(i__),e_Jmag(i__),Hmag(i__),
     +  e_Hmag(i__),Ksmag(i__),e_Ksmag(i__),r_JHKmag(i__),Sel(i__),
     +  Sep(i__),CompGaia(i__)
        if(ar__(59:77) .EQ. '') Gaia(i__) = iNULL__
        if(ar__(114:115) .EQ. '') r_SpType(i__) = iNULL__
        if(ar__(116:122) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(124:128) .EQ. '') e_pmRA(i__) = rNULL__
        if(ar__(130:136) .EQ. '') pmDec(i__) = rNULL__
        if(ar__(138:142) .EQ. '') e_pmDec(i__) = rNULL__
        if(ar__(144:149) .EQ. '') plx(i__) = rNULL__
        if(ar__(151:155) .EQ. '') e_plx(i__) = rNULL__
        if(ar__(157:162) .EQ. '') Gmag(i__) = rNULL__
        if(ar__(164:168) .EQ. '') e_Gmag(i__) = rNULL__
        if(ar__(170:175) .EQ. '') GBPmag(i__) = rNULL__
        if(ar__(177:181) .EQ. '') e_GBPmag(i__) = rNULL__
        if(ar__(183:188) .EQ. '') GRPmag(i__) = rNULL__
        if(ar__(190:194) .EQ. '') e_GRPmag(i__) = rNULL__
        if(ar__(196:200) .EQ. '') RUWE(i__) = rNULL__
        if(ar__(202:206) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(208:211) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__(213:217) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(219:222) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__(224:228) .EQ. '') Ksmag(i__) = rNULL__
        if(ar__(230:233) .EQ. '') e_Ksmag(i__) = rNULL__
        if(ar__(289:292) .EQ. '') Sep(i__) = rNULL__
        if(ar__(294:312) .EQ. '') CompGaia(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  v2MASS(i__),WISEA(i__),UGCS(i__),Gaia(i__),RAdeg(i__),
     +  DEdeg(i__),r_RAdeg(i__),SpType(i__),r_SpType(i__),pmRA(i__),
     +  e_pmRA(i__),pmDec(i__),e_pmDec(i__),plx(i__),e_plx(i__),
     +  Gmag(i__),e_Gmag(i__),GBPmag(i__),e_GBPmag(i__),GRPmag(i__),
     +  e_GRPmag(i__),RUWE(i__),Jmag(i__),e_Jmag(i__),Hmag(i__),
     +  e_Hmag(i__),Ksmag(i__),e_Ksmag(i__),r_JHKmag(i__),Sel(i__),
     +  Sep(i__),CompGaia(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Observing log

C  Format for file interpretation

    2 format(A14,1X,A11,1X,A9,1X,A10,1X,A9,1X,A6,1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,6
        read(1,'(A68)')ar__1
        read(ar__1,2)
     +  Tel(i__),Inst(i__),Disp(i__),Aper(i__),lambda(i__),R(i__),
     +  Ntarget(i__)
c    ..............Just test output...........
        write(6,2)
     +  Tel(i__),Inst(i__),Disp(i__),Aper(i__),lambda(i__),R(i__),
     +  Ntarget(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Spectroscopic data for candidate members of
*                              Upper Sco

C  Format for file interpretation

    3 format(
     +  A24,1X,F10.6,1X,F10.6,1X,A11,1X,A1,F4.2,A1,1X,A11,1X,I4,1X,A3,
     +  1X,I2,1X,I4,1X,A3,1X,I2,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,431
        read(1,'(A104)')ar__2
        read(ar__2,3)
     +  Name(i__),RAdeg_1(i__),DEdeg_1(i__),SpType_1(i__),l_EWLi(i__),
     +  EWLi(i__),f_EWLi(i__),Inst_1(i__),Obs_Y(i__),Obs_M(i__),
     +  Obs_D(i__),Obs_Y_2(i__),Obs_M_2(i__),Obs_D_2(i__),Young(i__)
        if(ar__2(61:64) .EQ. '') EWLi(i__) = rNULL__
        if(ar__2(91:94) .EQ. '') Obs_Y_2(i__) = iNULL__
        if(ar__2(100:101) .EQ. '') Obs_D_2(i__) = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name(i__),RAdeg_1(i__),DEdeg_1(i__),SpType_1(i__),l_EWLi(i__),
     +  EWLi(i__),f_EWLi(i__),Inst_1(i__),Obs_Y(i__),Obs_M(i__),
     +  Obs_D(i__),Obs_Y_2(i__),Obs_M_2(i__),Obs_D_2(i__),Young(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Young stars toward Upper Sco

C  Format for file interpretation

    4 format(
     +  A18,1X,A20,1X,A19,1X,I19,1X,A54,1X,F10.6,1X,F10.6,1X,A6,1X,
     +  A23,1X,A13,1X,A6,1X,F5.3,1X,A5,1X,F7.3,1X,F5.3,1X,F7.3,1X,
     +  F5.3,1X,F6.3,1X,F5.3,1X,F7.3,1X,F5.3,A1,1X,I2,1X,F6.2,1X,F4.2,
     +  1X,F6.2,1X,F4.2,1X,F6.2,1X,F4.2,1X,F6.3,1X,F5.3,1X,F6.3,1X,
     +  F5.3,1X,F6.3,1X,F5.3,1X,F5.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,
     +  1X,F5.2,1X,F4.2,1X,A3,1X,A5,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,2020
        read(1,'(A405)')ar__3
        read(ar__3,4)
     +  v2MASS_1(i__),WISEA_1(i__),UGCS_1(i__),Gaia_1(i__),
     +  Name_1(i__),RAdeg_2(i__),DEdeg_2(i__),r_RAdeg_1(i__),
     +  SpType_2(i__),r_SpType_1(i__),SpT(i__),Ak(i__),f_Ak(i__),
     +  pmRA_1(i__),e_pmRA_1(i__),pmDE(i__),e_pmDE(i__),plx_1(i__),
     +  e_plx_1(i__),RVel(i__),e_RVel(i__),f_RVel(i__),r_RVel(i__),
     +  U(i__),e_U(i__),V(i__),e_V(i__),W(i__),e_W(i__),Gmag_1(i__),
     +  e_Gmag_1(i__),GBPmag_1(i__),e_GBPmag_1(i__),GRPmag_1(i__),
     +  e_GRPmag_1(i__),RUWE_1(i__),Jmag_1(i__),eJmag(i__),
     +  Hmag_1(i__),eHmag(i__),Ksmag_1(i__),eKsmag(i__),
     +  r_JHKmag_1(i__),Pops(i__),memb_(i__)
        if(ar__3(61:79) .EQ. '') Gaia_1(i__) = iNULL__
        if(ar__3(210:214) .EQ. '') Ak(i__) = rNULL__
        if(ar__3(222:228) .EQ. '') pmRA_1(i__) = rNULL__
        if(ar__3(230:234) .EQ. '') e_pmRA_1(i__) = rNULL__
        if(ar__3(236:242) .EQ. '') pmDE(i__) = rNULL__
        if(ar__3(244:248) .EQ. '') e_pmDE(i__) = rNULL__
        if(ar__3(250:255) .EQ. '') plx_1(i__) = rNULL__
        if(ar__3(257:261) .EQ. '') e_plx_1(i__) = rNULL__
        if(ar__3(263:269) .EQ. '') RVel(i__) = rNULL__
        if(ar__3(271:275) .EQ. '') e_RVel(i__) = rNULL__
        if(ar__3(278:279) .EQ. '') r_RVel(i__) = iNULL__
        if(ar__3(281:286) .EQ. '') U(i__) = rNULL__
        if(ar__3(288:291) .EQ. '') e_U(i__) = rNULL__
        if(ar__3(293:298) .EQ. '') V(i__) = rNULL__
        if(ar__3(300:303) .EQ. '') e_V(i__) = rNULL__
        if(ar__3(305:310) .EQ. '') W(i__) = rNULL__
        if(ar__3(312:315) .EQ. '') e_W(i__) = rNULL__
        if(ar__3(317:322) .EQ. '') Gmag_1(i__) = rNULL__
        if(ar__3(324:328) .EQ. '') e_Gmag_1(i__) = rNULL__
        if(ar__3(330:335) .EQ. '') GBPmag_1(i__) = rNULL__
        if(ar__3(337:341) .EQ. '') e_GBPmag_1(i__) = rNULL__
        if(ar__3(343:348) .EQ. '') GRPmag_1(i__) = rNULL__
        if(ar__3(350:354) .EQ. '') e_GRPmag_1(i__) = rNULL__
        if(ar__3(356:360) .EQ. '') RUWE_1(i__) = rNULL__
        if(ar__3(362:366) .EQ. '') Jmag_1(i__) = rNULL__
        if(ar__3(368:371) .EQ. '') eJmag(i__) = rNULL__
        if(ar__3(373:377) .EQ. '') Hmag_1(i__) = rNULL__
        if(ar__3(379:382) .EQ. '') eHmag(i__) = rNULL__
        if(ar__3(384:388) .EQ. '') Ksmag_1(i__) = rNULL__
        if(ar__3(390:393) .EQ. '') eKsmag(i__) = rNULL__
c    ..............Just test output...........
        write(6,4)
     +  v2MASS_1(i__),WISEA_1(i__),UGCS_1(i__),Gaia_1(i__),
     +  Name_1(i__),RAdeg_2(i__),DEdeg_2(i__),r_RAdeg_1(i__),
     +  SpType_2(i__),r_SpType_1(i__),SpT(i__),Ak(i__),f_Ak(i__),
     +  pmRA_1(i__),e_pmRA_1(i__),pmDE(i__),e_pmDE(i__),plx_1(i__),
     +  e_plx_1(i__),RVel(i__),e_RVel(i__),f_RVel(i__),r_RVel(i__),
     +  U(i__),e_U(i__),V(i__),e_V(i__),W(i__),e_W(i__),Gmag_1(i__),
     +  e_Gmag_1(i__),GBPmag_1(i__),e_GBPmag_1(i__),GRPmag_1(i__),
     +  e_GRPmag_1(i__),RUWE_1(i__),Jmag_1(i__),eJmag(i__),
     +  Hmag_1(i__),eHmag(i__),Ksmag_1(i__),eKsmag(i__),
     +  r_JHKmag_1(i__),Pops(i__),memb_(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Mid-IR photometry for adopted Members of Upper Sco

C  Format for file interpretation

    5 format(
     +  A18,1X,A20,1X,A19,1X,I19,1X,A54,1X,F10.6,1X,F10.6,1X,A6,1X,
     +  F5.2,1X,F4.2,1X,A5,1X,F5.2,1X,F4.2,1X,A5,1X,F5.2,1X,F4.2,1X,
     +  A5,1X,F5.2,1X,F4.2,1X,A5,1X,F5.2,1X,F4.2,1X,A11,1X,F5.2,1X,
     +  F4.2,1X,A5,1X,F5.2,1X,F4.2,1X,A5,1X,F5.2,1X,F4.2,1X,A11,1X,
     +  F5.2,1X,F4.2,1X,A11,1X,A2,1X,A5,1X,A2,1X,A2,1X,A2,1X,A2,1X,A16)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,1761
        read(1,'(A372)')ar__4
        read(ar__4,5)
     +  v2MASS_2(i__),WISEA_2(i__),UGCS_2(i__),Gaia_2(i__),
     +  Name_2(i__),RAdeg_3(i__),DEdeg_3(i__),r_RAdeg_2(i__),
     +  v3_6mag(i__),e_3_6mag(i__),f_3_6mag(i__),v4_5mag(i__),
     +  e_4_5mag(i__),f_4_5mag(i__),v5_8mag(i__),e_5_8mag(i__),
     +  f_5_8mag(i__),v8_0mag(i__),e_8_0mag(i__),f_8_0mag(i__),
     +  v24mag(i__),e_24mag(i__),f_24mag(i__),W1mag(i__),e_W1mag(i__),
     +  f_W1mag(i__),W2mag(i__),e_W2mag(i__),f_W2mag(i__),W3mag(i__),
     +  e_W3mag(i__),f_W3mag(i__),W4mag(i__),e_W4mag(i__),
     +  f_W4mag(i__),Exc4_5(i__),Exc8_0(i__),Exc24(i__),ExcW2(i__),
     +  ExcW3(i__),ExcW4(i__),DiskType(i__)
        if(ar__4(61:79) .EQ. '') Gaia_2(i__) = iNULL__
        if(ar__4(165:169) .EQ. '') v3_6mag(i__) = rNULL__
        if(ar__4(171:174) .EQ. '') e_3_6mag(i__) = rNULL__
        if(ar__4(182:186) .EQ. '') v4_5mag(i__) = rNULL__
        if(ar__4(188:191) .EQ. '') e_4_5mag(i__) = rNULL__
        if(ar__4(199:203) .EQ. '') v5_8mag(i__) = rNULL__
        if(ar__4(205:208) .EQ. '') e_5_8mag(i__) = rNULL__
        if(ar__4(216:220) .EQ. '') v8_0mag(i__) = rNULL__
        if(ar__4(222:225) .EQ. '') e_8_0mag(i__) = rNULL__
        if(ar__4(233:237) .EQ. '') v24mag(i__) = rNULL__
        if(ar__4(239:242) .EQ. '') e_24mag(i__) = rNULL__
        if(ar__4(256:260) .EQ. '') W1mag(i__) = rNULL__
        if(ar__4(262:265) .EQ. '') e_W1mag(i__) = rNULL__
        if(ar__4(273:277) .EQ. '') W2mag(i__) = rNULL__
        if(ar__4(279:282) .EQ. '') e_W2mag(i__) = rNULL__
        if(ar__4(290:294) .EQ. '') W3mag(i__) = rNULL__
        if(ar__4(296:299) .EQ. '') e_W3mag(i__) = rNULL__
        if(ar__4(313:317) .EQ. '') W4mag(i__) = rNULL__
        if(ar__4(319:322) .EQ. '') e_W4mag(i__) = rNULL__
c    ..............Just test output...........
        write(6,5)
     +  v2MASS_2(i__),WISEA_2(i__),UGCS_2(i__),Gaia_2(i__),
     +  Name_2(i__),RAdeg_3(i__),DEdeg_3(i__),r_RAdeg_2(i__),
     +  v3_6mag(i__),e_3_6mag(i__),f_3_6mag(i__),v4_5mag(i__),
     +  e_4_5mag(i__),f_4_5mag(i__),v5_8mag(i__),e_5_8mag(i__),
     +  f_5_8mag(i__),v8_0mag(i__),e_8_0mag(i__),f_8_0mag(i__),
     +  v24mag(i__),e_24mag(i__),f_24mag(i__),W1mag(i__),e_W1mag(i__),
     +  f_W1mag(i__),W2mag(i__),e_W2mag(i__),f_W2mag(i__),W3mag(i__),
     +  e_W3mag(i__),f_W3mag(i__),W4mag(i__),e_W4mag(i__),
     +  f_W4mag(i__),Exc4_5(i__),Exc8_0(i__),Exc24(i__),ExcW2(i__),
     +  ExcW3(i__),ExcW4(i__),DiskType(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablec1.dat'	! Intrinsic colors of young stars and brown dwarfs

C  Format for file interpretation

    6 format(
     +  A2,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,
     +  F5.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablec1.dat')
      write(6,*) '....Loading file: tablec1.dat'
      do i__=1,59
        read(1,'(A99)')ar__5
        read(ar__5,6)
     +  SpType_3(i__),BP_RP(i__),G_RP(i__),RP_K(i__),J_H(i__),
     +  H_K(i__),K_3_6(i__),K_4_5(i__),K_5_8(i__),K_8_0(i__),
     +  K_24(i__),K_W1(i__),K_W2(i__),K_W3(i__),K_W4(i__)
        if(ar__5(4:9) .EQ. '') BP_RP(i__) = rNULL__
        if(ar__5(11:16) .EQ. '') G_RP(i__) = rNULL__
        if(ar__5(18:23) .EQ. '') RP_K(i__) = rNULL__
        if(ar__5(39:44) .EQ. '') K_3_6(i__) = rNULL__
        if(ar__5(66:71) .EQ. '') K_24(i__) = rNULL__
        if(ar__5(73:78) .EQ. '') K_W1(i__) = rNULL__
        if(ar__5(87:92) .EQ. '') K_W3(i__) = rNULL__
        if(ar__5(94:99) .EQ. '') K_W4(i__) = rNULL__
c    ..............Just test output...........
        write(6,6)
     +  SpType_3(i__),BP_RP(i__),G_RP(i__),RP_K(i__),J_H(i__),
     +  H_K(i__),K_3_6(i__),K_4_5(i__),K_5_8(i__),K_8_0(i__),
     +  K_24(i__),K_W1(i__),K_W2(i__),K_W3(i__),K_W4(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'ref.dat'	! References used for spectral types

C  Format for file interpretation

    7 format(I2,1X,A21,1X,A19,1X,A63)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ref.dat')
      write(6,*) '....Loading file: ref.dat'
      do i__=1,93
        read(1,'(A108)')ar__6
        read(ar__6,7)Ref(i__),Autor(i__),BIB(i__),Cat(i__)
c    ..............Just test output...........
        write(6,7)Ref(i__),Autor(i__),BIB(i__),Cat(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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