Conversion of standardized ReadMe file for
file /./ftp/cats/J/ApJS/273/19 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-Aug-12
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/ApJS/273/19 Elemental abundances from DESI EDR spectra (Zhang+, 2024)
*================================================================================
*Determining stellar elemental abundances from DESI spectra with the data-driven
*Payne.
* Zhang M., Xiang M., Ting Y.-S., Wang J., Li H., Zou Hu, Nie J., Mou L.,
* Wu T., Wu Y., Liu J.
* <Astrophys. J. Suppl. Ser., 273, 19 (2024)>
* =2024ApJS..273...19Z
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'catalog.dat' ! Catalog of atmospheric parameters and elemental
abundances for stars in the early data release
of the DESI spectroscopic survey
(from erratum published in 2024, ApJS, 274, 21)
integer*4 nr__
parameter (nr__=520228) ! Number of records
character*783 ar__ ! Full-size record
C J2000 position composed of: RAdeg DEdeg
real*8 RAdeg (nr__) ! (deg) Target right ascension (J2000)
* (TARGET_RA)
real*8 DEdeg (nr__) ! (deg) [-31.6/85] Target declination (J2000)
* (TARGET_DEC)
integer*8 ID (nr__) ! DESI target identifier (TARGET_ID)
character*7 Survey (nr__) ! Name of the DESI survey (SURVEY)
character*6 Prog (nr__) ! Name of the program (PROGRAM)
character*1 Prim (nr__) ! [FT] Primary, false or true (PRIMARY)
integer*4 Hpix (nr__) ! [683/45007] Healpix ID (HEALPIX)
real*8 snrB (nr__) ! [-6.3/473.2] Median spectral
* signal-to-noise ratio in B-band (SNRB)
real*8 snrG (nr__) ! [-0.3/608] Median spectral
* signal-to-noise ratio in G-band (SNRG)
real*8 snrR (nr__) ! [0.2/771] Median spectral
* signal-to-noise ratio in R-band (SNRR)
real*8 RV (nr__) ! (km/s) [-1500/1500] Radial velocity from DESI
* EDR catalog (RV)
real*8 e_RV (nr__) ! (km/s) [0.0001/2341] RV uncertainty (RV_ERR)
real*8 Teff (nr__) ! (K) [2642/8863]? Effective temperature
* (TEFF)
real*8 e_Teff (nr__) ! (K) [2.7/1220]? Teff uncertainty (TEFF_ERR)
real*8 logg (nr__) ! ([cm/s2]) [-1.5/7.2]? Log of surface gravity
* (LOGG)
real*4 e_logg (nr__) ! ([cm/s2]) [0.01/3.1]? logg uncertainty (LOGG_ERR)
real*8 v_Fe_H_ (nr__) ! ([-]) [-5.2/1.7]? Iron abundance (FEH)
real*4 e__Fe_H_ (nr__) ! ([-]) [0.007/1.4]? [Fe/H] Uncertainty
* (FEH_ERR)
real*8 v_C_Fe_ (nr__) ! ([-]) [-1.4/2.1]? Log of C/Fe abundance
* (C_FE)
real*4 e__C_Fe_ (nr__) ! ([-]) [0.004/1.8]? [C/Fe] Uncertainty
* (C_FE_ERR)
real*8 v_N_Fe_ (nr__) ! ([-]) [-1.9/2.2]? Log of N/Fe abundance
* (N_FE)
real*4 e__N_Fe_ (nr__) ! ([-]) [0.009/3]? [N/Fe] Uncertainty
* (N_FE_ERR)
real*8 v_Mg_Fe_ (nr__) ! ([-]) [-0.8/1.4]? Log of Mg/Fe abundance
* (MG_FE)
real*4 e__Mg_Fe_ (nr__) ! ([-]) [0.005/3]? [Mg/Fe] Uncertainty
* (MG_FE_ERR)
real*8 v_O_Fe_ (nr__) ! ([-]) [-0.8/1.6]? Log of O/Fe abundance
* (O_FE)
real*4 e__O_Fe_ (nr__) ! ([-]) [0.006/2]? [O/Fe] Uncertainty
* (O_FE_ERR)
real*8 v_Al_Fe_ (nr__) ! ([-]) [-1.3/1.5]? Log of Al/Fe abundance
* (AL_FE)
real*4 e__Al_Fe_ (nr__) ! ([-]) [0.01/2.5]? [Al/Fe] Uncertainty
* (AL_FE_ERR)
real*8 v_Si_Fe_ (nr__) ! ([-]) [-0.9/1.4]? Log of Si/Fe abundance
* (SI_FE)
real*4 e__Si_Fe_ (nr__) ! ([-]) [0.007/2.1]? [Si/Fe] Uncertainty
* (SI_FE_ERR)
real*8 v_Ca_Fe_ (nr__) ! ([-]) [-0.9/1.4]? Log of Ca/Fe abundance
* (CA_FE)
real*4 e__Ca_Fe_ (nr__) ! ([-]) [0.006/2]? [Ca/Fe] Uncertainty
* (CA_FE_ERR)
real*8 v_Ti_Fe_ (nr__) ! ([-]) [-1.2/1.5]? Log of Ti/Fe abundance
* (TI_FE)
real*4 e__Ti_Fe_ (nr__) ! ([-]) [0.006/1.5]? [Ti/Fe] Uncertainty
* (TI_FE_ERR)
real*8 v_Cr_Fe_ (nr__) ! ([-]) [-1.9/1]? Log of Cr/Fe abundance
* (CR_FE)
real*4 e__Cr_Fe_ (nr__) ! ([-]) [0.009/3.6]? [Cr/Fe] Uncertainty
* (CR_FE_ERR)
real*8 v_Mn_Fe_ (nr__) ! ([-]) [-1.4/0.9]? Log of Mn/Fe abundance
* (MN_FE)
real*4 e__Mn_Fe_ (nr__) ! ([-]) [0.008/3.2]? [Mn/Fe] Uncertainty
* (MN_FE_ERR)
real*8 v_Ni_Fe_ (nr__) ! ([-]) [-0.9/1.1]? Log of Ni/Fe abundance
* (NI_FE)
real*4 e__Ni_Fe_ (nr__) ! ([-]) [0.008/3.1]? [Ni/Fe] Uncertainty
* (NI_FE_ERR)
real*8 Vmic (nr__) ! (km/s) [-0.63/3.13]? Microturbulent velocity
* (VMIC)
real*4 e_Vmic (nr__) ! (km/s) [0.009/3.4]? Vmic uncertainty
* (VMIC_ERR)
real*8 CorTeff_logg(nr__) ! [-1/0.87] The correlation coefficients
* between Teff and logg (COR_TEFF_LOGG)
real*8 CorTeff_feh(nr__) ! [-1/0.81] The correlation coefficients
* between Teff and [Fe/H] (COR_TEFF_FEH)
real*8 Corlogg_feh(nr__) ! [-1/0.72] The correlation coefficients
* between logg and [Fe/H] (COR_LOGG_FEH)
real*4 q_Chi2 (nr__) ! [-3.2/3.9e+6]? A quality flag
* describing the {chi}^2^ of the
* spectral fit (CHISQ_FLAG)
real*4 Chi2 (nr__) ! [0.009/773000]? The {chi}^2^ of the
* spectral fit (CHISQ)
real*4 logDist (nr__) ! ([pc]) [-8.1/12.7]? Log of distance (LOGDIS)
real*4 e_logDist (nr__) ! ([pc]) [0.0002/15]? logDist uncertainty
* (LOGDIS_ERR)
real*4 EBV (nr__) ! (mag) [-0.3/0.83]? Interstellar reddening
* (EBV)
real*4 e_EBV (nr__) ! (mag) [0/3]? EBV uncertainty (EBV_ERR)
real*4 X (nr__) ! (kpc) 3D X position in the Galactic
* Cartesian coordinates (X)
real*4 Y (nr__) ! (kpc) 3D Y position in the Galactic
* Cartesian coordinates (Y)
real*4 Z (nr__) ! (kpc) 3D Z position in the Galactic
* Cartesian coordinates (Z)
real*4 R (nr__) ! (kpc) ?=-9999 Radial position in the Galactic
* cylindrical coordinates (R)
real*4 PHI (nr__) ! (kpc) [-3.04/3.1]? Azimuthal position in the
* Galactic cylindrical coordinates (PHI)
real*4 VX (nr__) ! (km/s) [-2.2e+6/1.5e+6]?=-9999 3D velocity, X
* component, in the Galactic Cartesian
* coordinates (VX)
real*4 VY (nr__) ! (km/s) [-2.2e+6/1.3e+6]?=-9999 3D velocity, Y
* component, in the Galactic Cartesian
* coordinates (VY)
real*4 VZ (nr__) ! (km/s) [-2.2e+06/2e+06]?=-9999 3D velocity, Z
* component, in the Galactic Cartesian
* coordinates (VZ)
real*4 VR (nr__) ! (km/s) [-2.2e+06/2.1e+06]?=-9999 Radial
* velocity in the Galactic cylindrical
* coordinates (VR)
real*4 VT (nr__) ! (km/s) [-2.2e+06/2.1e+06]?=-9999 Azimuthal
* velocity in the Galactic cylindrical
* coordinates (VT)
real*4 JR (nr__) ! (kpc.km/s) [-2.2e+06/26489]?=-9999 Actions in R
* direction (JR)
real*4 JPHI (nr__) ! (kpc.km/s) ?=-9999 Actions in PHI direction (JPHI)
real*4 JZ (nr__) ! (kpc.km/s) ?=-9999 Actions in Z direction (JZ)
real*4 LX (nr__) ! (kpc.km/s) ?=-9999 Angular momentum in the X
* direction (LX)
real*4 LY (nr__) ! (kpc.km/s) ?=-9999 Angular momentum in the Y
* direction (LY)
real*4 LZ (nr__) ! (kpc.km/s) [-2.2e+06/2.2e+06]?=-9999 Angular
* momentum in the Z direction (LZ)
real*4 RadGuid (nr__) ! (kpc) [-2.2e+06/2.2e+06]?=-9999 Guiding
* center radius (R_GUIDING)
real*4 Rapo (nr__) ! (kpc) [-2.2e+06/2.2e+06]?=-9999 Apocenter
* radius (R_APO)
real*4 Rperi (nr__) ! (kpc) [-2.2e+06/2e+06]?=-9999 Pericenter
* radius (R_PERI)
real*4 Ecc (nr__) ! [0.001/1]? Eccentricity (ECC)
real*4 Zmax (nr__) ! (kpc) [-2.2e+06/2.2e+06]?=-9999 Maximum height
* of orbits (ZMAX)
real*4 Energy (nr__) ! [-2.2e+07/2.1e+07]?=-9999 Total energy
* (ENERGY)
real*4 omegaPHI (nr__) ! [-2.1/9999.99]? Frequency in the PHI
* direction (OMEGA_PHI)
real*4 omegaR (nr__) ! [0.017/9999.99]? Frequency in the R
* direction (OMEGA_R)
real*4 omegaZ (nr__) ! [0.01/9999.99]? Frequency in the Z
* direction (OMEGA_Z)
real*4 ER (nr__) ! [-2.2e+6/2.2e+6]?=-9999 Radial energy
real*4 EZ (nr__) ! [-2.2e+6/2.2e+6]?=-9999 Vertical energy
C=============================================================================
C Loading file 'catalog.dat' ! Catalog of atmospheric parameters and elemental
* abundances for stars in the early data release
* of the DESI spectroscopic survey
* (from erratum published in 2024, ApJS, 274, 21)
C Format for file interpretation
1 format(
+ F11.7,1X,F11.7,1X,I19,1X,A7,1X,A6,1X,A1,1X,I5,1X,F7.3,1X,F7.3,
+ 1X,F7.3,1X,F10.4,1X,F9.4,1X,F7.2,1X,F7.2,1X,F8.3,1X,F5.3,1X,
+ F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,
+ 1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,
+ F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,1X,F5.3,1X,F8.3,
+ 1X,F5.3,1X,F8.3,1X,F5.3,1X,F9.6,1X,F9.6,1X,F9.6,1X,E11.4,1X,
+ E10.4,1X,E11.4,1X,E11.4,1X,E10.3,1X,E10.3,1X,E11.4,1X,E11.4,
+ 1X,E11.4,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,
+ E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,
+ 1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E11.4,1X,E12.6,1X,
+ E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6)
C Effective file loading
open(unit=1,status='old',file=
+'catalog.dat')
write(6,*) '....Loading file: catalog.dat'
do i__=1,520228
read(1,'(A783)')ar__
read(ar__,1)
+ RAdeg(i__),DEdeg(i__),ID(i__),Survey(i__),Prog(i__),Prim(i__),
+ Hpix(i__),snrB(i__),snrG(i__),snrR(i__),RV(i__),e_RV(i__),
+ Teff(i__),e_Teff(i__),logg(i__),e_logg(i__),v_Fe_H_(i__),
+ e__Fe_H_(i__),v_C_Fe_(i__),e__C_Fe_(i__),v_N_Fe_(i__),
+ e__N_Fe_(i__),v_Mg_Fe_(i__),e__Mg_Fe_(i__),v_O_Fe_(i__),
+ e__O_Fe_(i__),v_Al_Fe_(i__),e__Al_Fe_(i__),v_Si_Fe_(i__),
+ e__Si_Fe_(i__),v_Ca_Fe_(i__),e__Ca_Fe_(i__),v_Ti_Fe_(i__),
+ e__Ti_Fe_(i__),v_Cr_Fe_(i__),e__Cr_Fe_(i__),v_Mn_Fe_(i__),
+ e__Mn_Fe_(i__),v_Ni_Fe_(i__),e__Ni_Fe_(i__),Vmic(i__),
+ e_Vmic(i__),CorTeff_logg(i__),CorTeff_feh(i__),
+ Corlogg_feh(i__),q_Chi2(i__),Chi2(i__),logDist(i__),
+ e_logDist(i__),EBV(i__),e_EBV(i__),X(i__),Y(i__),Z(i__),
+ R(i__),PHI(i__),VX(i__),VY(i__),VZ(i__),VR(i__),VT(i__),
+ JR(i__),JPHI(i__),JZ(i__),LX(i__),LY(i__),LZ(i__),
+ RadGuid(i__),Rapo(i__),Rperi(i__),Ecc(i__),Zmax(i__),
+ Energy(i__),omegaPHI(i__),omegaR(i__),omegaZ(i__),ER(i__),
+ EZ(i__)
if(ar__(113:119) .EQ. '') Teff(i__) = rNULL__
if(ar__(121:127) .EQ. '') e_Teff(i__) = rNULL__
if(ar__(129:136) .EQ. '') logg(i__) = rNULL__
if(ar__(138:142) .EQ. '') e_logg(i__) = rNULL__
if(ar__(144:151) .EQ. '') v_Fe_H_(i__) = rNULL__
if(ar__(153:157) .EQ. '') e__Fe_H_(i__) = rNULL__
if(ar__(159:166) .EQ. '') v_C_Fe_(i__) = rNULL__
if(ar__(168:172) .EQ. '') e__C_Fe_(i__) = rNULL__
if(ar__(174:181) .EQ. '') v_N_Fe_(i__) = rNULL__
if(ar__(183:187) .EQ. '') e__N_Fe_(i__) = rNULL__
if(ar__(189:196) .EQ. '') v_Mg_Fe_(i__) = rNULL__
if(ar__(198:202) .EQ. '') e__Mg_Fe_(i__) = rNULL__
if(ar__(204:211) .EQ. '') v_O_Fe_(i__) = rNULL__
if(ar__(213:217) .EQ. '') e__O_Fe_(i__) = rNULL__
if(ar__(219:226) .EQ. '') v_Al_Fe_(i__) = rNULL__
if(ar__(228:232) .EQ. '') e__Al_Fe_(i__) = rNULL__
if(ar__(234:241) .EQ. '') v_Si_Fe_(i__) = rNULL__
if(ar__(243:247) .EQ. '') e__Si_Fe_(i__) = rNULL__
if(ar__(249:256) .EQ. '') v_Ca_Fe_(i__) = rNULL__
if(ar__(258:262) .EQ. '') e__Ca_Fe_(i__) = rNULL__
if(ar__(264:271) .EQ. '') v_Ti_Fe_(i__) = rNULL__
if(ar__(273:277) .EQ. '') e__Ti_Fe_(i__) = rNULL__
if(ar__(279:286) .EQ. '') v_Cr_Fe_(i__) = rNULL__
if(ar__(288:292) .EQ. '') e__Cr_Fe_(i__) = rNULL__
if(ar__(294:301) .EQ. '') v_Mn_Fe_(i__) = rNULL__
if(ar__(303:307) .EQ. '') e__Mn_Fe_(i__) = rNULL__
if(ar__(309:316) .EQ. '') v_Ni_Fe_(i__) = rNULL__
if(ar__(318:322) .EQ. '') e__Ni_Fe_(i__) = rNULL__
if(ar__(324:331) .EQ. '') Vmic(i__) = rNULL__
if(ar__(333:337) .EQ. '') e_Vmic(i__) = rNULL__
if(ar__(369:379) .EQ. '') q_Chi2(i__) = rNULL__
if(ar__(381:390) .EQ. '') Chi2(i__) = rNULL__
if(ar__(392:402) .EQ. '') logDist(i__) = rNULL__
if(ar__(404:414) .EQ. '') e_logDist(i__) = rNULL__
if(ar__(416:425) .EQ. '') EBV(i__) = rNULL__
if(ar__(427:436) .EQ. '') e_EBV(i__) = rNULL__
if(ar__(487:498) .EQ. '') PHI(i__) = rNULL__
if(ar__(682:692) .EQ. '') Ecc(i__) = rNULL__
if(ar__(720:731) .EQ. '') omegaPHI(i__) = rNULL__
if(ar__(733:744) .EQ. '') omegaR(i__) = rNULL__
if(ar__(746:757) .EQ. '') omegaZ(i__) = rNULL__
c ..............Just test output...........
write(6,1)
+ RAdeg(i__),DEdeg(i__),ID(i__),Survey(i__),Prog(i__),Prim(i__),
+ Hpix(i__),snrB(i__),snrG(i__),snrR(i__),RV(i__),e_RV(i__),
+ Teff(i__),e_Teff(i__),logg(i__),e_logg(i__),v_Fe_H_(i__),
+ e__Fe_H_(i__),v_C_Fe_(i__),e__C_Fe_(i__),v_N_Fe_(i__),
+ e__N_Fe_(i__),v_Mg_Fe_(i__),e__Mg_Fe_(i__),v_O_Fe_(i__),
+ e__O_Fe_(i__),v_Al_Fe_(i__),e__Al_Fe_(i__),v_Si_Fe_(i__),
+ e__Si_Fe_(i__),v_Ca_Fe_(i__),e__Ca_Fe_(i__),v_Ti_Fe_(i__),
+ e__Ti_Fe_(i__),v_Cr_Fe_(i__),e__Cr_Fe_(i__),v_Mn_Fe_(i__),
+ e__Mn_Fe_(i__),v_Ni_Fe_(i__),e__Ni_Fe_(i__),Vmic(i__),
+ e_Vmic(i__),CorTeff_logg(i__),CorTeff_feh(i__),
+ Corlogg_feh(i__),q_Chi2(i__),Chi2(i__),logDist(i__),
+ e_logDist(i__),EBV(i__),e_EBV(i__),X(i__),Y(i__),Z(i__),
+ R(i__),PHI(i__),VX(i__),VY(i__),VZ(i__),VR(i__),VT(i__),
+ JR(i__),JPHI(i__),JZ(i__),LX(i__),LY(i__),LZ(i__),
+ RadGuid(i__),Rapo(i__),Rperi(i__),Ecc(i__),Zmax(i__),
+ Energy(i__),omegaPHI(i__),omegaR(i__),omegaZ(i__),ER(i__),
+ EZ(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end