Conversion of standardized ReadMe file for
file /./ftp/cats/J/A_A/694/A152 into FORTRAN code for reading data files line by line.
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-Jun-08
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/694/A152 Late-type RSG candidates from Gaia RVS spectra (Zhang+, 2025)
*================================================================================
*Searching for Galactic red supergiants with Gaia RVS spectra.
* Zhang Z., Jiang B., Ren Y., Zhao H., Yang M.
* <Astron. Astrophys. 694, A152 (2025)>
* =2025A&A...694A.152Z (SIMBAD/NED BibCode)
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'tablea2.dat' ! The 6196 late-type RSG candidates from
Gaia RVS spectra
integer*4 nr__
parameter (nr__=6196) ! Number of records
character*186 ar__ ! Full-size record
C Position composed of: RAdeg DEdeg (Epoch=2016.0)
integer*8 GaiaDR3 ! Destination in Gaia DR3 main catalog
real*8 RAdeg ! (deg) Right ascension (ICRS) at Ep=2016.0
real*8 DEdeg ! (deg) Declination (ICRS) at Ep=2016.0
real*8 Gmag ! (mag) G-band magnitude in Gaia
real*8 BPmag ! (mag) BP-band magnitude in Gaia
real*8 RPmag ! (mag) RP-band magnitude in Gaia
real*4 RVSS_N ! Signal to noise ratio in RVS spectrum
real*8 Ca8498 ! (nm) Equivalent width of CaII at 849.8nm
real*8 Ca8542 ! (nm) Equivalent width of CaII at 854.2nm
real*8 Ca8662 ! (nm) Equivalent width of CaII at 866.2nm
real*4 Kmag ! (mag) K-band magnitude in 2MASS
real*4 W3mag ! (mag) ?=- W3-band magnitude in ALLWISE
real*8 TiO ! (nm) Equivalent width of TiO in XP spectra
real*8 e_Ca8498 ! (nm) Error in CaII at 849.8nm measurement
real*8 e_Ca8542 ! (nm) Error in CaII at 854.2nm measurement
real*8 e_Ca8662 ! (nm) Error in CaII at 866.2nm measurement
C=============================================================================
C Loading file 'tablea2.dat' ! The 6196 late-type RSG candidates from
* Gaia RVS spectra
C Format for file interpretation
1 format(
+ 9X,I19,1X,F15.11,1X,F15.11,1X,F9.6,1X,F9.6,1X,F9.6,1X,E12.6,
+ 1X,F9.6,1X,F9.6,1X,F9.6,1X,F5.3,1X,F6.3,1X,F9.6,1X,F9.7,1X,
+ F9.7,1X,F9.7)
C Effective file loading
open(unit=1,status='old',file=
+'tablea2.dat')
write(6,*) '....Loading file: tablea2.dat'
do i__=1,6196
read(1,'(A186)')ar__
read(ar__,1)
+ GaiaDR3,RAdeg,DEdeg,Gmag,BPmag,RPmag,RVSS_N,Ca8498,Ca8542,
+ Ca8662,Kmag,W3mag,TiO,e_Ca8498,e_Ca8542,e_Ca8662
if (idig(ar__(141:146)).EQ.0) W3mag = rNULL__
c ..............Just test output...........
write(6,1)
+ GaiaDR3,RAdeg,DEdeg,Gmag,BPmag,RPmag,RVSS_N,Ca8498,Ca8542,
+ Ca8662,Kmag,W3mag,TiO,e_Ca8498,e_Ca8542,e_Ca8662
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end
C Locate position of first digit in string; or return 0
integer function idig(c)
character*(*) c
character*1 c1
integer lc,i
lc=len(c)
idig=0
do i=1,lc
if(c(i:i).ne.' ') go to 1
end do
1 if(i.gt.lc) return
c1=c(i:i)
if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
if(i.gt.lc) return
c1=c(i:i)
if(c1.ge.'0'.and.c1.le.'9') idig=i
return
end