FORTRAN Generation
(/./ftp/cats/J/A_A/648/A4)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/648/A4 into FORTRAN code for loading all data files into arrays.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2026-Oct-09
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/A+A/648/A4        LoTSS Deep Fields DR1 photometric redshifts  (Duncan+, 2021)
*================================================================================
*The LOFAR Two-metre Sky Survey: Deep Fields Data Release 1.
*IV. Photometric redshifts and stellar masses.
*    Duncan K.J., Kondapally R., Brown M.J.I., Bonato M., Best P.N.,
*    Roettgering H.J.A., Bondi M., Bowler R.A.A., Cochrane R.K., Guerkan G.,
*    Hardcastle M.J., Jarvis M.J., Kunert-Bajraszewska M., Leslie S.K., Malek K.,
*    Morabito L.K., O'Sullivan S.P., Prandoni I., Sabater J., Shimwell T.W.,
*    Smith D.J.B., Wang L., Wolowska A.
*    <Astron. Astrophys. 648, A4 (2021)>
*    =2021A&A...648A...4D        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'bootes.dat'	! Bootes Field Photometric redshift catalogue

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     ID         (nr__) ! Unique object identifier for multi-wavelength
*                                   catalogue in this field
      integer*4     IDOpt      (nr__) ! Identifier for the optical-NIR detected chi2
*                                   catalogue (ID_OPTICAL)
      integer*4     IDSpitzer  (nr__) ! ?=-99 Identifier for the Spitzer detected chi2
*                                   catalogue (ID_SPITZER)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (J2000) (RA)
      real*8        DEdeg      (nr__) ! (deg) Declination (J2000) (DEC)
      real*4        E_B_V      (nr__) ! E(B-V) galactic extinction for the source
*                                   based on its position and
*                                   Schlegel+(1998ApJ...500..525S)
      real*8        Class      (nr__) ! Stellarity Parameter (CLASSSTAR)
      integer*4     overlap    (nr__) ! [0/1] Bit flag indicating the multi-wavelength
*                                   coverage (FLAGOVERLAP)
      integer*4     clean      (nr__) ! [0/3] 3-valued flag indicating bright star
*                                   masking (FLAGCLEAN)
      real*8        zbest      (nr__) ! Best available redshift estimate (Z_BEST)
      integer*4     f_zbest    (nr__) ! [0/1] Source of z_best, 0 = photometric,
*                                   1 = spectroscopic (Z_BEST_SOURCE)
      real*8        zspec      (nr__) ! ?=-99 Literature Spectroscopic Redshift
*                                   (Z_SPEC)
      integer*4     r_zspec    (nr__) ! ?=-99 Source of the spectroscopic redshift
*                                   (Z_SOURCE)
      integer*4     q_zspec    (nr__) ! ?=-99 Spectroscopic redshift quality: flag Q=3
*                                   means probable, Q>=4 means reliable (Z_QUAL)
      real*8        z1med      (nr__) ! Median of the primary redshift peak above
*                                   80% HPD CI (z1_median)
      real*8        z1min      (nr__) ! Lower bound of the primary 80% HPD CI peak
*                                   (z1_min)
      real*8        z1max      (nr__) ! Upper bound of the primary 80% HPD CI peak
*                                   (z1_max)
      real*8        z1area     (nr__) ! Integrated area of the primary 80% HPD CI peak
*                                   (z1_area)
      real*8        z2med      (nr__) ! Median of the secondary redshift peak
*                                   (if present) above 80% HPD CI (z2_median)
      real*8        z2min      (nr__) ! Lower bound of the secondary 80% HPD CI peak
*                                   (z2_min)
      real*8        z2max      (nr__) ! Upper bound of the secondary 80% HPD CI peak
*                                   (z2_max)
      real*8        z2area     (nr__) ! Integrated area of the secondary 80% HPD CI
*                                   peak (z2_area)
      integer*4     nfiltEazy  (nr__) ! ?=-99 Number of filters included in EAZY
*                                   template fit (nfilt_eazy) (G1)
      integer*4     nfiltAtl   (nr__) ! ?=-99 Number of filters included in Atlas+AGN
*                                   template fit (nfilt_atlas) (G2)
      integer*4     nfiltAna   (nr__) ! ?=-99 Number of filters included in Ananna+
*                                   template fit (nfilt_ananna) (G3)
      real*8        chirBest   (nr__) ! ?=-99 Chi^2 / nfilt for best-fit galaxy/AGN
*                                   template (any library) (chi_r_best)
      real*8        chirStelR  (nr__) ! ?=-99 Chi^2 / nfilt for best-fit stellar
*                                   template (chi_r_stellar)
      character*6   StelType   (nr__) ! Stellar type of best-fit stellar template
*                                   (stellar_type)
      integer*4     AGN        (nr__) ! [0/1] Sources flagged by any one of
*                                   optAGN/IRAGN/XrayAGN
      integer*4     optAGN     (nr__) ! [0/1] Source is included in Million Quasar
*                                   Catalog (Flesch 2015PASA...32...10F)
*                                   compilation or spectroscopically identified
*                                   AGN
      integer*4     IRAGN      (nr__) ! [0/1] Source satisfies Donley et al.
*                                   (2012ApJ...748..142D) IR AGN criteria
      integer*4     XrayAGN    (nr__) ! [0/1] Source has X-ray counterpart
      real*4        XrayFlux   (nr__) ! (W/m2) ?=-9.90E-02 XBootes Soft X-ray Flux 
*                                   (XrayFlux_0.5-2)
      real*8        HRX        (nr__) ! ?=-99 XBootes X-ray Hardness Ratio
      real*8        aptmz      (nr__) ! ?=-99 Estimated z-band total flux correction
*                                   from Legacy Surveys model flux (z)
*                                   (ap_to_model_z)
      real*8        e_aptmz    (nr__) ! ?=999 Statistical uncertainty on tot_z
*                                   (ap_to_model_err_z)
      real*8        aptmzS     (nr__) ! ?=-99 Estimated z-band total flux correction
*                                   from Legacy Surveys model flux (z_Subaru)
*                                   (ap_to_model_z_Subaru)
      real*8        e_aptmzS   (nr__) ! ?=999 Statistical uncertainty on tot_z_Subaru
*                                   (ap_to_model_err_z_Subaru)
      real*8        zmodel     (nr__) ! ?=-99 Model grid redshift used in stellar mass
*                                   fit
      real*8        chibest    (nr__) ! ?=-99 Minimum Chi^2 in stellar mass fit
*                                   (for Z_BEST) (chi_best)
      real*8        Massmed    (nr__) ! ([Msun]) ?=-99 50th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_median)
      real*8        Massl68    (nr__) ! ([Msun]) ?=-99 16th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_l68)
      real*8        Massu68    (nr__) ! ([Msun]) ?=-99 84th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_u68)
      integer*4     Nfilts     (nr__) ! ?=-99 Number of bands included in stellar
*                                   mass fit
      real*8        umag       (nr__) ! (mag) ?=-99 Rest-frame u-band magnitude for best-fit
*                                   SED (for Z_BEST) (u_rest)
      real*8        Bwmag      (nr__) ! (mag) ?=-99 Rest-frame Bw-band magnitude for
*                                   best-fit SED (for Z_BEST) (Bw_rest)
      real*8        Rmag       (nr__) ! (mag) ?=-99 Rest-frame R-band magnitude for
*                                   best-fit SED (for Z_BEST) (R_rest)
      real*8        imag       (nr__) ! (mag) ?=-99 Rest-frame I-band magnitude for
*                                   best-fit SED (for Z_BEST) (I_rest)
      real*8        zmag       (nr__) ! (mag) ?=-99 Rest-frame z-band magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        zSmag      (nr__) ! (mag) ?=-99 Rest-frame z_Subaru-band magnitude for
*                                   best-fit SED (for Z_BEST) (z_Subaru_rest)
      real*8        ymag       (nr__) ! (mag) ?=-99 Rest-frame y-band magnitude for
*                                   best-fit SED (for Z_BEST) (y_rest)
      real*8        Jmag       (nr__) ! (mag) ?=-99 Rest-frame J-band magnitude for
*                                   best-fit SED (for Z_BEST) (J_rest)
      real*8        Hmag       (nr__) ! (mag) ?=-99 Rest-frame H-band magnitude for
*                                   best-fit SED (for Z_BEST) (H_rest)
      real*8        Kmag       (nr__) ! (mag) ?=-99 Rest-frame K-band magnitude for
*                                   best-fit SED (for Z_BEST) (K_rest)
      real*8        Ksmag      (nr__) ! (mag) ?=-99 Rest-frame Ks-band magnitude for
*                                   best-fit SED (for Z_BEST) (Ks_rest)
      real*8        IRAC1      (nr__) ! (mag) ?=-99 Rest-frame IRAC 3.6micron magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        IRAC2      (nr__) ! (mag) ?=-99 Rest-frame IRAC 4.5micron magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        IRAC3      (nr__) ! (mag) ?=-99 Rest-frame IRAC 5.8micron magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        IRAC4      (nr__) ! (mag) ?=-99 Rest-frame IRAC 8.0micron magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)

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

C  Declarations for 'en1.dat'	! ELAIS-N1 Photometric redshift catalogue

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     ID_1       (nr__1) ! Unique object identifier for multi-wavelength
*                                   catalogue in this field
      integer*4     IDOpt_1    (nr__1) ! Identifier for the optical-NIR detected chi2
*                                   catalogue (ID_OPTICAL)
      integer*4     IDSpitzer_1(nr__1) ! ?=-99 Identifier for the Spitzer detected chi2
*                                   catalogue (ID_SPITZER)
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension (J2000) (RA)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (J2000) (DEC)
      real*4        E_B_V_1    (nr__1) ! (mag) E(B-V) galactic extinction for the source
*                                   based on its position and
*                                   Schlegel et al. (1998ApJ...500..525S)
      real*4        Class_1    (nr__1) ! Stellarity Parameter
      integer*4     overlap_1  (nr__1) ! [0/7] Bit flag indicating the multi-wavelength
*                                   coverage
      integer*4     clean_1    (nr__1) ! [1/3] 3-valued flag indicating bright star
*                                   masking
      real*8        zbest_1    (nr__1) ! Best available redshift estimate (Z_BEST)
      integer*4     f_zbest_1  (nr__1) ! [0/1] Source of z_best, 0 = photometric,
*                                   1 = spectroscopic (Z_BEST_SOURCE)
      real*8        zspec_1    (nr__1) ! ?=-99 Literature Spectroscopic Redshift
*                                   (Z_SPEC)
      integer*4     e_zspec    (nr__1) ! ?=-99 Source of the spectroscopic redshift
*                                   (Z_SOURCE)
      integer*4     q_zspec_1  (nr__1) ! ?=-99 Spectroscopic redshift quality: flag Q=3
*                                   means probable, Q>=4 means reliable (Z_QUAL)
      real*8        z1med_1    (nr__1) ! Median of the primary redshift peak above
*                                   80% HPD CI (z1_median)
      real*8        z1min_1    (nr__1) ! Lower bound of the primary 80% HPD CI peak
*                                   (z1_min)
      real*8        z1max_1    (nr__1) ! Upper bound of the primary 80% HPD CI peak
*                                   (z1_max)
      real*8        z1area_1   (nr__1) ! Integrated area of the primary 80% HPD CI peak
*                                   (z1_area)
      real*8        z2med_1    (nr__1) ! Median of the secondary redshift peak
*                                   (if present) above 80% HPD CI (z2_median)
      real*8        z2min_1    (nr__1) ! Lower bound of the secondary 80% HPD CI peak
*                                   (z2_min)
      real*8        z2max_1    (nr__1) ! Upper bound of the secondary 80% HPD CI peak
*                                   (z2_max)
      real*8        z2area_1   (nr__1) ! Integrated area of the secondary 80% HPD CI
*                                   peak (z2_area)
      integer*4     nfiltEazy_1(nr__1) ! ?=-99 Number of filters included in EAZY
*                                   template fit (nfilt_eazy) (G1)
      integer*4     nfiltAtl_1 (nr__1) ! ?=-99 Number of filters included in Atlas+AGN
*                                   template fit (nfilt_atlas) (G2)
      integer*4     nfiltAna_1 (nr__1) ! ?=-99 Number of filters included in Ananna+
*                                   template fit (nfilt_ananna) (G3)
      real*8        chirBest_1 (nr__1) ! ?=-99 Chi^2 / nfilt for best-fit galaxy/AGN 
*                                   template (any library) (chi_r_best)
      real*8        chirStel   (nr__1) ! ?=-99 Chi^2 / nfilt for best-fit stellar
*                                   template (chi_r_stellar)
      character*6   StelType_1 (nr__1) ! Stellar type of best-fit stellar template
*                                   (stellar_type)
      integer*4     AGN_1      (nr__1) ! [0/1] Sources flagged by any one of
*                                   optAGN/IRAGN/XrayAGN
      integer*4     optAGN_1   (nr__1) ! [0/1] Source is included in Million Quasar
*                                   Catalog (Flesch 2015PASA...32...10F)
*                                   compilation or spectroscopically identified
*                                   AGN
      integer*4     IRAGN_1    (nr__1) ! [0/1] Source satisfies Donley et al.
*                                   (2012ApJ...748..142D) IR AGN criteria
      integer*4     XrayAGN_1  (nr__1) ! [0/1] Source has X-ray counterpart
      character*21  v2RXSID    (nr__1) ! ? ID for 2RXS X-ray Catalog counterpart (G4)
      character*23  XMMSL2ID   (nr__1) ! ? ID for XMMSL2 X-ray Catalog counterpart (G4)
      real*8        aptmg      (nr__1) ! ?=-99 Estimated g-band total flux correction
*                                   from Legacy Surveys model flux (g)
*                                   (ap_to_model_g)
      real*8        e_aptmg    (nr__1) ! ?=999 Statistical uncertainty on atpmg
*                                   (ap_to_model_err_g)
      real*8        aptmr      (nr__1) ! ?=-99 Estimated r-band total flux correction
*                                   from Legacy Surveys model flux (r)
*                                   (ap_to_model_r)
      real*8        e_aptmr    (nr__1) ! ?=999 Statistical uncertainty on atpmg
*                                   (ap_to_model_err_r)
      real*8        aptmz_1    (nr__1) ! ?=-99 Estimated z-band total flux correction
*                                   from Legacy Surveys model flux (z)
*                                   (ap_to_model_z)
      real*8        e_aptmz_1  (nr__1) ! ?=999 Statistical uncertainty on atpmg
*                                   (ap_to_model_err_z)
      real*8        zmodel_1   (nr__1) ! ?=-99 Model grid redshift used in stellar
*                                   mass fit
      real*8        chibest_1  (nr__1) ! ?=-99 Minimum Chi^2 in stellar mass fit
*                                   (for Z_BEST)
*                                   (chi_best)
      real*8        Massmed_1  (nr__1) ! ([Msun]) ?=-99 50th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_median)
      real*8        Massl68_1  (nr__1) ! ([Msun]) ?=-99 16th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_l68)
      real*8        Massu68_1  (nr__1) ! ([Msun]) ?=-99 84th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_u68)
      integer*4     Nfilts_1   (nr__1) ! ?=-99 Number of bands included in stellar
*                                   mass fit
      real*8        umag_1     (nr__1) ! (mag) ?=-99 Rest-frame u-band magnitude for
*                                   best-fit SED (for Z_BEST) (u_rest)
      real*8        gmag       (nr__1) ! (mag) ?=-99 Rest-frame g-band magnitude for
*                                   best-fit SED (for Z_BEST) (g_rest)
      real*8        rmag_1     (nr__1) ! (mag) ?=-99 Rest-frame r-band magnitude for
*                                   best-fit SED (for Z_BEST) (r_rest)
      real*8        imag_1     (nr__1) ! (mag) ?=-99 Rest-frame i-band magnitude for
*                                   best-fit SED (for Z_BEST) (i_rest)
      real*8        zmag_1     (nr__1) ! (mag) ?=-99 Rest-frame z-band magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        ymag_1     (nr__1) ! (mag) ?=-99 Rest-frame y-band magnitude for
*                                   best-fit SED (for Z_BEST) (y_rest)
      real*8        Jmag_1     (nr__1) ! (mag) ?=-99 Rest-frame J-band magnitude for
*                                   best-fit SED (for Z_BEST) (J_rest)
      real*8        Kmag_1     (nr__1) ! (mag) ?=-99 Rest-frame K-band magnitude for
*                                   best-fit SED (for Z_BEST) (K_rest)
      real*8        IRAC1vs    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 3.6micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch1_servs_rest)
      real*8        IRAC2vs    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 4.5micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch2_servs_rest)
      real*8        IRAC1sw    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 3.6micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch1_swire_rest)
      real*8        IRAC2sw    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 4.5micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch2_swire_rest)
      real*8        IRAC3sw    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 5.8micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch3_swire_rest)
      real*8        IRAC4sw    (nr__1) ! (mag) ?=-99 Rest-frame IRAC 8.0micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch4_swire_rest)

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

C  Declarations for 'lockman.dat'	! Lockman Hole photometric redshift catalogue

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     ID_2       (nr__2) ! Unique object identifier for multi-wavelength
*                                   catalogue in this field
      integer*4     IDOpt_2    (nr__2) ! Identifier for the optical-NIR detected chi2
*                                   catalogue (ID_OPTICAL)
      integer*4     IDSpitzer_2(nr__2) ! ?=-99 Identifier for the Spitzer detected chi2
*                                   catalogue (ID_SPITZER)
      real*8        RAdeg_2    (nr__2) ! (deg) Right ascension (J2000) (RA)
      real*8        DEdeg_2    (nr__2) ! (deg) Declination (J2000) (DEC)
      real*4        E_B_V_1    (nr__2) ! (mag) E(B-V) galactic extinction for the source
*                                   based on its position and
*                                   Schlegel et al. (1998ApJ...500..525S)
      real*4        Class_2    (nr__2) ! Stellarity Parameter (CLASSSTAR)
      integer*4     clean_2    (nr__2) ! [1/3] 3-valued flag indicating bright star
*                                   masking (FLAGCLEAN)
      real*8        zbest_2    (nr__2) ! ?=-99 Best available redshift estimate
*                                   (Z_BEST)
      integer*4     f_zbest_2  (nr__2) ! [0/1] Source of z_best, 0 = photometric,
*                                   1 = spectroscopic (Z_BEST_SOURCE)
      real*8        zspec_2    (nr__2) ! ?=-99 Literature Spectroscopic Redshift
*                                   (Z_SPEC)
      real*8        z1med_2    (nr__2) ! ?=-99 Median of the primary redshift peak
*                                   above 80% HPD CI (z1_median)
      real*8        z1min_2    (nr__2) ! ?=-99 Lower bound of the primary 80% HPD CI
*                                   peak (z1_min)
      real*8        z1max_2    (nr__2) ! ?=-99 Upper bound of the primary 80% HPD CI
*                                   peak (z1_max)
      real*8        z1area_2   (nr__2) ! ?=-99 Integrated area of the primary 80%
*                                   HPD CI peak (z1_area)
      real*8        z2med_2    (nr__2) ! ?=-99 Median of the secondary redshift peak
*                                   (if present) above 80% HPD CI (z2_median)
      real*8        z2min_2    (nr__2) ! ?=-99 Lower bound of the secondary 80% HPD
*                                   CI peak (z2_min)
      real*8        z2max_2    (nr__2) ! ?=-99 Upper bound of the secondary 80% HPD
*                                   CI peak (z2_max)
      real*8        z2area_2   (nr__2) ! ?=-99 Integrated area of the secondary 80%
*                                   HPD CI peak (z2_area)
      integer*4     nfiltEazy_2(nr__2) ! ?=-99 Number of filters included in EAZY
*                                   template fit (nfilt_eazy) (G1)
      integer*4     nfiltAtl_2 (nr__2) ! ?=-99 Number of filters included in Atlas+AGN
*                                   template fit (nfilt_atlas) (G2)
      integer*4     nfiltAna_2 (nr__2) ! ?=-99 Number of filters included in Ananna+
*                                   template fit (nfilt_ananna) (G3)
      real*8        chirBest_2 (nr__2) ! ?=-99 Chi^2 / nfilt for best-fit galaxy/AGN
*                                   template (any library) (chi_r_best)
      real*8        chirStel_1 (nr__2) ! ?=-99 Chi^2 / nfilt for best-fit stellar
*                                   template (chi_r_stellar)
      character*6   StelType_2 (nr__2) ! Stellar type of best-fit stellar template
*                                   (stellar_type)
      integer*4     AGN_2      (nr__2) ! [0/1] Sources flagged by any one of
*                                   optAGN/IRAGN/XrayAGN
      integer*4     optAGN_2   (nr__2) ! [0/1] Source is included in Million Quasar
*                                   Catalog (Flesch 2015PASA...32...10F)
*                                   compilation or spectroscopically identified
*                                   AGN
      integer*4     IRAGN_2    (nr__2) ! [0/1] Source satisfies Donley et al.
*                                   (2012ApJ...748..142D) IR AGN criteria
      integer*4     XrayAGN_2  (nr__2) ! ?=-99 Source has X-ray counterpart
      character*21  v2RXSID_1  (nr__2) ! ? ID for 2RXS X-ray Catalog counterpart
      character*23  XMMSL2ID_1 (nr__2) ! ? ID for XMMSL2 X-ray Catalog counterpart
      real*8        aptmg_1    (nr__2) ! ?=-99 Estimated g-band total flux correction
*                                   from Legacy Surveys model flux (g)
*                                   (ap_to_model_g)
      real*8        e_aptmg_1  (nr__2) ! ?=999 Statistical uncertainty on atpmg
*                                   (ap_to_model_err_g)
      real*8        aptmr_1    (nr__2) ! ?=-99 Estimated r-band total flux correction
*                                   from Legacy Surveys model flux (r)
*                                   (ap_to_model_r)
      real*8        e_aptmr_1  (nr__2) ! ?=999 Statistical uncertainty on atpmr
*                                   (ap_to_model_err_r)
      real*8        aptmz_2    (nr__2) ! ?=-99 Estimated z-band total flux correction
*                                   from Legacy Surveys model flux (z)
*                                   (ap_to_model_z)
      real*8        e_aptmz_2  (nr__2) ! ?=999 Statistical uncertainty on atpmz
*                                   (ap_to_model_err_z)
      real*8        zmodel_2   (nr__2) ! ?=-99 Model grid redshift used in stellar
*                                   mass fit
      real*8        chibest_2  (nr__2) ! ?=-99 Minimum Chi^2 in stellar mass fit
*                                   (for Z_BEST) (chi_best)
      real*8        Massmed_2  (nr__2) ! ([Msun]) ?=-99 50th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_median)
      real*8        Massl68_2  (nr__2) ! ([Msun]) ?=-99 16th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_l68)
      real*8        Massu68_2  (nr__2) ! ([Msun]) ?=-99 84th percentile of the marginalised
*                                   stellar mass posterior (for Z_BEST)
*                                   (Mass_u68)
      integer*4     Nfilts_2   (nr__2) ! ?=-99 Number of bands included in stellar
*                                   mass fit
      real*8        umag_2     (nr__2) ! (mag) ?=-99 Rest-frame u-band magnitude for
*                                   best-fit SED (for Z_BEST) (u_rest)
      real*8        gmag_1     (nr__2) ! (mag) ?=-99 Rest-frame g-band magnitude for
*                                   best-fit SED (for Z_BEST) (g_rest)
      real*8        rmag_2     (nr__2) ! (mag) ?=-99 Rest-frame r-band magnitude for
*                                   best-fit SED (for Z_BEST) (r_rest)
      real*8        zmag_2     (nr__2) ! (mag) ?=-99 Rest-frame z-band magnitude for
*                                   best-fit SED (for Z_BEST) (z_rest)
      real*8        grcsmag    (nr__2) ! (mag) ?=-99 Rest-frame g_rcs-band magnitude for
*                                   best-fit SED (for Z_BEST) (g_rcs_rest)
      real*8        rrcsmag    (nr__2) ! (mag) ?=-99 Rest-frame r_rcs-band magnitude for
*                                   best-fit SED (for Z_BEST) (r_rcs_rest)
      real*8        ircsmag    (nr__2) ! (mag) ?=-99 Rest-frame i_rcs-band magnitude for
*                                   best-fit SED (for Z_BEST) (i_rcs_rest)
      real*8        zrcsmag    (nr__2) ! (mag) ?=-99 Rest-frame z_rcs-band magnitude for
*                                   best-fit SED (for Z_BEST) (z_rcs_rest)
      real*8        Jmag_2     (nr__2) ! (mag) ?=-99 Rest-frame J-band magnitude for
*                                   best-fit SED (for Z_BEST) (J_rest)
      real*8        Kmag_2     (nr__2) ! (mag) ?=-99 Rest-frame K-band magnitude for
*                                   best-fit SED (for Z_BEST) (K_rest)
      real*8        IRAC1sv    (nr__2) ! (mag) ?=-99 Rest-frame IRAC 3.6micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch1_servs_rest)
      real*8        IRAC2sv    (nr__2) ! (mag) ?=-99 Rest-frame IRAC 4.5micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch2_servs_rest)
      real*8        IRAC1sw_1  (nr__2) ! (mag) ?=-99 Rest-frame IRAC 3.6micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch1_swire_rest)
      real*8        IRAC2sw_1  (nr__2) ! (mag) ?=-99 Rest-frame IRAC 4.5micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch2_swire_rest)
      real*8        IRAC3sw_1  (nr__2) ! (mag) ?=-99 Rest-frame IRAC 5.8micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch3_swire_rest)
      real*8        IRAC4sw_1  (nr__2) ! (mag) ?=-99 Rest-frame IRAC 8.0micron magnitude for
*                                   best-fit SED (for Z_BEST) (ch4_swire_rest)

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

C  Loading file 'bootes.dat'	! Bootes Field Photometric redshift catalogue

C  Format for file interpretation

    1 format(
     +  I7,1X,I7,1X,I6,1X,F16.12,1X,F15.12,1X,F6.4,1X,F8.4,1X,I1,1X,
     +  I1,1X,F8.4,1X,I1,1X,F8.4,1X,I3,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,I3,1X,I3,1X,I3,1X,
     +  F8.4,1X,F8.4,1X,A6,1X,I1,1X,I1,1X,I1,1X,I1,1X,E9.2,1X,F8.4,1X,
     +  F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F9.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,F8.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'bootes.dat')
      write(6,*) '....Loading file: bootes.dat'
      do i__=1,2214329
        read(1,'(A460)')ar__
        read(ar__,1)
     +  ID(i__),IDOpt(i__),IDSpitzer(i__),RAdeg(i__),DEdeg(i__),
     +  E_B_V(i__),Class(i__),overlap(i__),clean(i__),zbest(i__),
     +  f_zbest(i__),zspec(i__),r_zspec(i__),q_zspec(i__),z1med(i__),
     +  z1min(i__),z1max(i__),z1area(i__),z2med(i__),z2min(i__),
     +  z2max(i__),z2area(i__),nfiltEazy(i__),nfiltAtl(i__),
     +  nfiltAna(i__),chirBest(i__),chirStelR(i__),StelType(i__),
     +  AGN(i__),optAGN(i__),IRAGN(i__),XrayAGN(i__),XrayFlux(i__),
     +  HRX(i__),aptmz(i__),e_aptmz(i__),aptmzS(i__),e_aptmzS(i__),
     +  zmodel(i__),chibest(i__),Massmed(i__),Massl68(i__),
     +  Massu68(i__),Nfilts(i__),umag(i__),Bwmag(i__),Rmag(i__),
     +  imag(i__),zmag(i__),zSmag(i__),ymag(i__),Jmag(i__),Hmag(i__),
     +  Kmag(i__),Ksmag(i__),IRAC1(i__),IRAC2(i__),IRAC3(i__),
     +  IRAC4(i__)
c    ..............Just test output...........
        write(6,1)
     +  ID(i__),IDOpt(i__),IDSpitzer(i__),RAdeg(i__),DEdeg(i__),
     +  E_B_V(i__),Class(i__),overlap(i__),clean(i__),zbest(i__),
     +  f_zbest(i__),zspec(i__),r_zspec(i__),q_zspec(i__),z1med(i__),
     +  z1min(i__),z1max(i__),z1area(i__),z2med(i__),z2min(i__),
     +  z2max(i__),z2area(i__),nfiltEazy(i__),nfiltAtl(i__),
     +  nfiltAna(i__),chirBest(i__),chirStelR(i__),StelType(i__),
     +  AGN(i__),optAGN(i__),IRAGN(i__),XrayAGN(i__),XrayFlux(i__),
     +  HRX(i__),aptmz(i__),e_aptmz(i__),aptmzS(i__),e_aptmzS(i__),
     +  zmodel(i__),chibest(i__),Massmed(i__),Massl68(i__),
     +  Massu68(i__),Nfilts(i__),umag(i__),Bwmag(i__),Rmag(i__),
     +  imag(i__),zmag(i__),zSmag(i__),ymag(i__),Jmag(i__),Hmag(i__),
     +  Kmag(i__),Ksmag(i__),IRAC1(i__),IRAC2(i__),IRAC3(i__),
     +  IRAC4(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'en1.dat'	! ELAIS-N1 Photometric redshift catalogue

C  Format for file interpretation

    2 format(
     +  I7,1X,I7,1X,I6,1X,F16.12,1X,F15.12,1X,F6.4,1X,F6.4,1X,I1,1X,
     +  I1,1X,F8.4,1X,I1,1X,F8.4,1X,I3,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,I3,1X,I3,1X,I3,1X,
     +  F8.4,1X,F8.4,1X,A6,1X,I1,1X,I1,1X,I1,1X,I1,1X,A21,1X,A23,1X,
     +  F8.4,1X,F8.4,1X,F15.4,1X,F12.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F9.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'en1.dat')
      write(6,*) '....Loading file: en1.dat'
      do i__=1,2105993
        read(1,'(A505)')ar__1
        read(ar__1,2)
     +  ID_1(i__),IDOpt_1(i__),IDSpitzer_1(i__),RAdeg_1(i__),
     +  DEdeg_1(i__),E_B_V_1(i__),Class_1(i__),overlap_1(i__),
     +  clean_1(i__),zbest_1(i__),f_zbest_1(i__),zspec_1(i__),
     +  e_zspec(i__),q_zspec_1(i__),z1med_1(i__),z1min_1(i__),
     +  z1max_1(i__),z1area_1(i__),z2med_1(i__),z2min_1(i__),
     +  z2max_1(i__),z2area_1(i__),nfiltEazy_1(i__),nfiltAtl_1(i__),
     +  nfiltAna_1(i__),chirBest_1(i__),chirStel(i__),StelType_1(i__),
     +  AGN_1(i__),optAGN_1(i__),IRAGN_1(i__),XrayAGN_1(i__),
     +  v2RXSID(i__),XMMSL2ID(i__),aptmg(i__),e_aptmg(i__),aptmr(i__),
     +  e_aptmr(i__),aptmz_1(i__),e_aptmz_1(i__),zmodel_1(i__),
     +  chibest_1(i__),Massmed_1(i__),Massl68_1(i__),Massu68_1(i__),
     +  Nfilts_1(i__),umag_1(i__),gmag(i__),rmag_1(i__),imag_1(i__),
     +  zmag_1(i__),ymag_1(i__),Jmag_1(i__),Kmag_1(i__),IRAC1vs(i__),
     +  IRAC2vs(i__),IRAC1sw(i__),IRAC2sw(i__),IRAC3sw(i__),
     +  IRAC4sw(i__)
c    ..............Just test output...........
        write(6,2)
     +  ID_1(i__),IDOpt_1(i__),IDSpitzer_1(i__),RAdeg_1(i__),
     +  DEdeg_1(i__),E_B_V_1(i__),Class_1(i__),overlap_1(i__),
     +  clean_1(i__),zbest_1(i__),f_zbest_1(i__),zspec_1(i__),
     +  e_zspec(i__),q_zspec_1(i__),z1med_1(i__),z1min_1(i__),
     +  z1max_1(i__),z1area_1(i__),z2med_1(i__),z2min_1(i__),
     +  z2max_1(i__),z2area_1(i__),nfiltEazy_1(i__),nfiltAtl_1(i__),
     +  nfiltAna_1(i__),chirBest_1(i__),chirStel(i__),StelType_1(i__),
     +  AGN_1(i__),optAGN_1(i__),IRAGN_1(i__),XrayAGN_1(i__),
     +  v2RXSID(i__),XMMSL2ID(i__),aptmg(i__),e_aptmg(i__),aptmr(i__),
     +  e_aptmr(i__),aptmz_1(i__),e_aptmz_1(i__),zmodel_1(i__),
     +  chibest_1(i__),Massmed_1(i__),Massl68_1(i__),Massu68_1(i__),
     +  Nfilts_1(i__),umag_1(i__),gmag(i__),rmag_1(i__),imag_1(i__),
     +  zmag_1(i__),ymag_1(i__),Jmag_1(i__),Kmag_1(i__),IRAC1vs(i__),
     +  IRAC2vs(i__),IRAC1sw(i__),IRAC2sw(i__),IRAC3sw(i__),
     +  IRAC4sw(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'lockman.dat'	! Lockman Hole photometric redshift catalogue

C  Format for file interpretation

    3 format(
     +  I7,1X,I7,1X,I6,1X,F16.12,1X,F15.12,1X,F6.4,1X,F6.4,1X,I1,1X,
     +  F8.4,1X,I1,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,F8.4,1X,F8.4,1X,I3,1X,I3,1X,I3,1X,F8.4,1X,F8.4,1X,A6,
     +  1X,I1,1X,I1,1X,I1,1X,I1,1X,A21,1X,A23,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F9.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,I3,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,
     +  F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'lockman.dat')
      write(6,*) '....Loading file: lockman.dat'
      do i__=1,3041794
        read(1,'(A502)')ar__2
        read(ar__2,3)
     +  ID_2(i__),IDOpt_2(i__),IDSpitzer_2(i__),RAdeg_2(i__),
     +  DEdeg_2(i__),E_B_V_1(i__),Class_2(i__),clean_2(i__),
     +  zbest_2(i__),f_zbest_2(i__),zspec_2(i__),z1med_2(i__),
     +  z1min_2(i__),z1max_2(i__),z1area_2(i__),z2med_2(i__),
     +  z2min_2(i__),z2max_2(i__),z2area_2(i__),nfiltEazy_2(i__),
     +  nfiltAtl_2(i__),nfiltAna_2(i__),chirBest_2(i__),
     +  chirStel_1(i__),StelType_2(i__),AGN_2(i__),optAGN_2(i__),
     +  IRAGN_2(i__),XrayAGN_2(i__),v2RXSID_1(i__),XMMSL2ID_1(i__),
     +  aptmg_1(i__),e_aptmg_1(i__),aptmr_1(i__),e_aptmr_1(i__),
     +  aptmz_2(i__),e_aptmz_2(i__),zmodel_2(i__),chibest_2(i__),
     +  Massmed_2(i__),Massl68_2(i__),Massu68_2(i__),Nfilts_2(i__),
     +  umag_2(i__),gmag_1(i__),rmag_2(i__),zmag_2(i__),grcsmag(i__),
     +  rrcsmag(i__),ircsmag(i__),zrcsmag(i__),Jmag_2(i__),
     +  Kmag_2(i__),IRAC1sv(i__),IRAC2sv(i__),IRAC1sw_1(i__),
     +  IRAC2sw_1(i__),IRAC3sw_1(i__),IRAC4sw_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  ID_2(i__),IDOpt_2(i__),IDSpitzer_2(i__),RAdeg_2(i__),
     +  DEdeg_2(i__),E_B_V_1(i__),Class_2(i__),clean_2(i__),
     +  zbest_2(i__),f_zbest_2(i__),zspec_2(i__),z1med_2(i__),
     +  z1min_2(i__),z1max_2(i__),z1area_2(i__),z2med_2(i__),
     +  z2min_2(i__),z2max_2(i__),z2area_2(i__),nfiltEazy_2(i__),
     +  nfiltAtl_2(i__),nfiltAna_2(i__),chirBest_2(i__),
     +  chirStel_1(i__),StelType_2(i__),AGN_2(i__),optAGN_2(i__),
     +  IRAGN_2(i__),XrayAGN_2(i__),v2RXSID_1(i__),XMMSL2ID_1(i__),
     +  aptmg_1(i__),e_aptmg_1(i__),aptmr_1(i__),e_aptmr_1(i__),
     +  aptmz_2(i__),e_aptmz_2(i__),zmodel_2(i__),chibest_2(i__),
     +  Massmed_2(i__),Massl68_2(i__),Massu68_2(i__),Nfilts_2(i__),
     +  umag_2(i__),gmag_1(i__),rmag_2(i__),zmag_2(i__),grcsmag(i__),
     +  rrcsmag(i__),ircsmag(i__),zrcsmag(i__),Jmag_2(i__),
     +  Kmag_2(i__),IRAC1sv(i__),IRAC2sv(i__),IRAC1sw_1(i__),
     +  IRAC2sw_1(i__),IRAC3sw_1(i__),IRAC4sw_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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