FORTRAN Generation
(/./ftp/cats/V/160)

Conversion of standardized ReadMe file for file /./ftp/cats/V/160 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-14
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. V/160                  SHBoost 2024                           (Khalatyan+, 2024)
*================================================================================
*Transferring spectroscopic stellar labels to 217 million Gaia DR3 XP stars
*with SHBoost.
*    Khalatyan A., Anders F., Chiappini C., Queiroz A.B.A., Nepal S.,
*    dal Ponte M., Jordi C., Guiglion G., Valentini M., Torralba Elipe G.,
*    Steinmetz M., Pantaleoni-Gonzalez M., Malhotra S., Jimenez-Arranz O.,
*    Enke H., Casamiquela L., Ardevol J.
*    <Astron. Astrophys. 691, A98 (2024)>
*    =2024A&A...691A..98K        (SIMBAD/NED BibCode)
*    =2024yCat.5160....0K
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'shboost.sam'	! Data model of the Gaia DR3 SHBoost catalogue

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

C  Position composed of: RAdeg DEdeg (Epoch=2016.0)
      integer*8     GaiaDR3    (nr__) ! Gaia DR3 source_id (source_id)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (ICRS) at Ep=2016.0 (ra)
      real*8        DEdeg      (nr__) ! (deg) Declination (ICRS) at Ep=2016 (dec)
      real*8        AV         (nr__) ! (mag) Line-of-sight extinction at
*                                       {lambda}=5420{AA}, AV, xgboost point
*                                       estimate (xgb_av)
      real*8        AVmean     (nr__) ! (mag) Line-of-sight extinction at
*                                       {lambda}=5420{AA}, AV,
*                                       xgboost-distribution mean value
*                                       (xgbdist_av_mean)
      real*8        s_AVmean   (nr__) ! (mag) Line-of-sight extinction at
*                                       {lambda}=5420{AA}, AV,
*                                       xgboost-distribution standard deviation
*                                       (xgbdist_av_std)
      real*8        logTeff    (nr__) ! ([K]) Effective temperature, xgboost point
*                                       estimate (xgb_logteff)
      real*8        logTeffmean(nr__) ! ([K]) Effective temperature,
*                                       xgboost-distribution mean value
*                                       (xgbdist_logteff_mean)
      real*8        s_logTeffmean(nr__) ! ([K]) Effective temperature,
*                                       xgboost-distribution standard deviation
*                                       (xgbdist_logteff_std)
      real*8        logg       (nr__) ! ([cm/s2]) Surface gravity, xgboost point estimate
*                                       (xgb_logg)
      real*8        loggmean   (nr__) ! ([cm/s2]) Surface gravity, xgboost-distribution
*                                       mean value (xgbdist_logg_mean)
      real*8        s_loggmean (nr__) ! ([cm/s2]) Surface gravity, xgboost-distribution
*                                       standard deviation (xgbdist_logg_std)
      real*8        Met        (nr__) ! ([-]) Metallicity, xgboost point estimate
*                                       (xgb_met)
      real*8        Metmean    (nr__) ! ([-]) Metallicity, xgboost-distribution
*                                       mean value (xgbdist_met_mean)
      real*8        s_Metmean  (nr__) ! ([-]) Metallicity, xgboost-distribution
*                                       standard deviation (xgbdist_met_std)
      real*8        Mass       (nr__) ! (Msun) Stellar mass, xgboost point estimate
*                                       (xgb_mass)
      real*8        Massmean   (nr__) ! (Msun) Stellar mass, xgboost-distribution
*                                       mean value (xgbdist_mass_mean)
      real*4        s_Massmean (nr__) ! (Msun) Stellar mass, xgboost-distribution
*                                       standard deviation (xgbdist_mass_std)
      real*8        Dist       (nr__) ! (pc) Distance estimate from the literature
*                                       (dist)
      real*8        b_Dist     (nr__) ! (pc) ? 16th distance percentile from the
*                                       literature (dist_lower)
      real*8        B_Dist_1   (nr__) ! (pc) ? 84th distance percentile from the
*                                       literature (dist_upper)
      integer*4     f_Dist     (nr__) ! [0/2] Distance flag (dist_flag) (1)
      real*8        v_BP_RP_0  (nr__) ! (mag) ? Dereddened colour, derived with
*                                       gaia_edr3_photutils (bprp0)
      real*8        GMAG0      (nr__) ! (mag) Absolute magnitude, derived with
*                                       gaia_edr3_photutils (mg0)
      real*8        Xgal       (nr__) ! (kpc) Galactocentric Cartesian X coordinate,
*                                       derived from dist and assuming
*                                       X0 = -8.2 kpc (xg)
      real*8        Ygal       (nr__) ! (kpc) Galactocentric Cartesian Y coordinate,
*                                       derived from dist and assuming
*                                       X0 = 0 kpc (yg)
      real*8        Zgal       (nr__) ! (kpc) Cartesian Z coordinate, derived from dist
*                                       and assuming Z0 = 0 (zg)
      real*8        Rgal       (nr__) ! (kpc) Galactocentric planar distance,
*                                       derived from XGal and YGal (rg)
      real*8        VX         (nr__) ! (km/s) ? Galactic Cartesian velocity in
*                                       X direction (vxg)
      real*8        VY         (nr__) ! (km/s) ? Galactic Cartesian velocity in
*                                       Y direction (vyg)
      real*8        VZ         (nr__) ! (km/s) ? Galactic Cartesian velocity in
*                                       Z direction (vzg)
      real*8        VR         (nr__) ! (km/s) ? Galactic radial velocity (vrg)
      real*8        Vphi       (nr__) ! (km/s) ? Galactic angular velocity (vphig)
      character*21  InputFlag  (nr__) ! SHBoost input flag (xgb_inputflag)
      integer*4     q_AV       (nr__) ! [0/1] AV output quality flag
*                                       (=0 if xgbdist_av_std<0.3)
*                                       (xgb_av_outputflag)
      integer*4     q_logTeff  (nr__) ! [0/1] logTeff output quality flag
*                                       (=0 if xgbdist_logteff_std<0.1)
*                                       (xgb_logteff_outputflag)
      integer*4     q_logg     (nr__) ! [0/1] logg output quality flag
*                                       (=0 if xgbdist_logg_std<0.3)
*                                       (xgb_logg_outputflag)
      integer*4     q_Met      (nr__) ! [0/1] [M/H] output quality flag
*                                       (=0 if xgbdist_met_std<0.3)
*                                       (xgb_met_outputflag)
      integer*4     q_Mass     (nr__) ! [0/1]  Mass output quality flag (=0 if
*                                       xgbdist_mass_std/xgbdist_mass_mean<0.3)
*                                       (xgb_mass_outputflag)
*Note (1): Distance flag as follows:
*           0 = StarHorse EDR3, Anders et al., 2022A&A...658A..91A, Cat. I/354
*           1 = Bailer-Jones et al. 2021AJ....161..147B, Cat. I/352, photogeo
*           2 - Bailer-Jones et al. 2021AJ....161..147B, Cat. I/352, geo

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

C  Loading file 'shboost.sam'	! Data model of the Gaia DR3 SHBoost catalogue

C  Format for file interpretation

    1 format(
     +  I19,1X,F15.11,1X,F15.11,1X,F9.6,1X,F9.6,1X,F11.6,1X,F8.6,1X,
     +  F8.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F10.6,1X,F9.6,1X,F9.6,1X,F9.6,
     +  1X,F9.6,1X,F9.6,1X,E12.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,I1,1X,
     +  F8.5,1X,F9.5,1X,F10.5,1X,F10.5,1X,F10.5,1X,F9.5,1X,F10.4,1X,
     +  F10.4,1X,F11.4,1X,F10.4,1X,F10.4,1X,A21,1X,I1,1X,I1,1X,I1,1X,
     +  I1,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'shboost.sam')
      write(6,*) '....Loading file: shboost.sam'
      do i__=1,1000
        read(1,'(A390)')ar__
        read(ar__,1)
     +  GaiaDR3(i__),RAdeg(i__),DEdeg(i__),AV(i__),AVmean(i__),
     +  s_AVmean(i__),logTeff(i__),logTeffmean(i__),
     +  s_logTeffmean(i__),logg(i__),loggmean(i__),s_loggmean(i__),
     +  Met(i__),Metmean(i__),s_Metmean(i__),Mass(i__),Massmean(i__),
     +  s_Massmean(i__),Dist(i__),b_Dist(i__),B_Dist_1(i__),
     +  f_Dist(i__),v_BP_RP_0(i__),GMAG0(i__),Xgal(i__),Ygal(i__),
     +  Zgal(i__),Rgal(i__),VX(i__),VY(i__),VZ(i__),VR(i__),Vphi(i__),
     +  InputFlag(i__),q_AV(i__),q_logTeff(i__),q_logg(i__),
     +  q_Met(i__),q_Mass(i__)
        if(ar__(218:227) .EQ. '') b_Dist(i__) = rNULL__
        if(ar__(229:238) .EQ. '') B_Dist_1(i__) = rNULL__
        if(ar__(242:249) .EQ. '') v_BP_RP_0(i__) = rNULL__
        if(ar__(304:313) .EQ. '') VX(i__) = rNULL__
        if(ar__(315:324) .EQ. '') VY(i__) = rNULL__
        if(ar__(326:336) .EQ. '') VZ(i__) = rNULL__
        if(ar__(338:347) .EQ. '') VR(i__) = rNULL__
        if(ar__(349:358) .EQ. '') Vphi(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  GaiaDR3(i__),RAdeg(i__),DEdeg(i__),AV(i__),AVmean(i__),
     +  s_AVmean(i__),logTeff(i__),logTeffmean(i__),
     +  s_logTeffmean(i__),logg(i__),loggmean(i__),s_loggmean(i__),
     +  Met(i__),Metmean(i__),s_Metmean(i__),Mass(i__),Massmean(i__),
     +  s_Massmean(i__),Dist(i__),b_Dist(i__),B_Dist_1(i__),
     +  f_Dist(i__),v_BP_RP_0(i__),GMAG0(i__),Xgal(i__),Ygal(i__),
     +  Zgal(i__),Rgal(i__),VX(i__),VY(i__),VZ(i__),VR(i__),Vphi(i__),
     +  InputFlag(i__),q_AV(i__),q_logTeff(i__),q_logg(i__),
     +  q_Met(i__),q_Mass(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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