Conversion of standardized ReadMe file for
file /./ftp/cats/III/166 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-Sep-10
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. III/166 A New Library of Optical Spectra (Silva + 1992)
*================================================================================
*A New Library of Stellar Optical Spectra
* Silva D.R., Cornell M.E.
* <Astrophys. J. Suppl. 81, 865 (1992)>
* =1992ApJS...81..865S
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'stars.dat' ! *List of stars observed (Table 2)
integer*4 nr__
parameter (nr__=151) ! Number of records
character*91 ar__ ! Full-size record
C J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
real*8 RAdeg (nr__) ! (deg) Right Ascension J2000
real*8 DEdeg (nr__) ! (deg) Declination J2000
C ---------------------------------- ! (position vector(s) in degrees)
integer*4 SpNo (nr__) ! [1,72]? Spectrum number
integer*4 RAh (nr__) ! (h) *Right Ascension J2000 (hours)
integer*4 RAm (nr__) ! (min) *Right Ascension J2000 (minutes)
real*4 RAs (nr__) ! (s) *Right Ascension J2000 (seconds)
character*1 DE_ (nr__) ! *Declination J2000 (sign)
integer*4 DEd (nr__) ! (deg) *Declination J2000 (degrees)
integer*4 DEm (nr__) ! (arcmin) *Declination J2000 (minutes)
integer*4 DEs (nr__) ! (arcsec) *Declination J2000 (seconds)
integer*4 HD (nr__) ! ? HD designation of the star
character*7 Other (nr__) ! *Other designation
character*9 Sp (nr__) ! *MK Spectral class
character*10 Obs (nr__) ! *[AC-K.] Observations flags
integer*4 Teff (nr__) ! (K) Effective temperature
integer*4 L (nr__) ! Assigned luminosity class
integer*4 M (nr__) ! *[-1,1] Assigned metallicity class
real*4 v_Fe_H_ (nr__) ! ([Sun]) Metallicity index
real*4 E_B_V (nr__) ! (mag) Colour excess
character*4 Ref (nr__) ! *Reference
*Note on RAh, RAm, RAs, DE-, DEd, DEm, DEs:
* position from SIMBAD data-base
*Note on Other: the designation starts by "s" for SAO (Cat. <I/131>)
* designations, or by "g" for Giclas et al. Lowell Proper Motion stars.
*Note on Sp: Spectral class from original reference. Stars from reference
* L (1988AJ.....95.1843L) and marked V* are most likely dwarfs, but could
* be some other luminosity class.
*Note on Obs: Observation codes are:
* A = MDM 2.4m 1988Jan, MkIII spectrograph, G4 grism
* C = MDM 2.4m 1988Feb, MkIII spectrograph, G4 grism
* D = SOKP 2.3m 1988Mar, B&C spectrograph
* E = SOKP 2.3m 1988May, B&C spectrograph
* F = MDM 2.4m 1988Nov, MkIII spectrograph, G2 grism
* G = MDM 2.4m 1988Nov, MkIII spectrograph, G4 grism
* H = MDM 2.4m 1989Feb, MkIII spectrograph, G4 grism
* I = MDM 2.4m 1989Feb, MkIII spectrograph, G2 grism
* J = MDM 2.4m 1989May, MkIII spectrograph, G4 grism
* K = MDM 2.4m 1989May, MkIII spectrograph, G2 grism
* where MDM designates Michigan-Dartmouth-MIT, spectral regime:
* G2 = 675-925nm, G4 = 436-710nm
* and SOKP designates Stewart Obs. Kitt Peak, spectral regime 337-470nm
*Note on M: classes are:
* 1 = metal-rich, 0.15 < [Fe/H]
* 0 = metal normal, -0.20 <= [Fe/H] <= 0.15
* -1 = metal poor, [Fe/H] < -0.20
*Note on Ref: codes are:
* FEH = Cayrel de Strobel, 1985A&AS...59..145C
* FFBG = Faber et al., 1985ApJS...57..711F
* JHC = Jacoby et al., 1984ApJS...56..257J
* L = Laird et al., 1988AJ.....95.1843L
* LB = Luck & Bond, 1985ApJ...292..559L
* M83 = Keenan, 1983BICDS..24...19K
* TTCB = Turnshek et al., 1985,
* "An atlas of Digital Spectra of Cool stars",
* Tucson: Western Research Company
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'spectra.dat' ! *Composite library spectra: Synthesized versus
Catalog UBV colours (Tables 3 and 4)
integer*4 nr__1
parameter (nr__1=72) ! Number of records
character*54 ar__1 ! Full-size record
integer*4 SpNo_1 (nr__1) ! [1,72] Spectrum number
character*9 Sp_1 (nr__1) ! *Spectral class designation
real*4 v_U_V_s (nr__1) ! (mag) ? Synthesized U-V colour
real*4 v_B_V_s (nr__1) ! (mag) ? Synthesized B-V colour
real*4 v_U_V_c (nr__1) ! (mag) ? Catalog U-V colour
real*4 v_B_V_c (nr__1) ! (mag) ? Catalog B-V colour
real*4 v_U_V_r (nr__1) ! (mag) ? Residuals U-V colour
real*4 v_B_V_r (nr__1) ! (mag) ? Residuals B-V colour
character*5 Ref_1 (nr__1) ! Reference
*Note on Sp:
* this composite spectral class is used to designate the file
* with spectrophotometric data (in "sp" subdirectory)
C=============================================================================
C Loading file 'stars.dat' ! *List of stars observed (Table 2)
C Format for file interpretation
1 format(
+ I2,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,I6,2X,A7,2X,A9,
+ 1X,A10,2X,I5,2X,I1,1X,I2,1X,F5.2,2X,F4.2,1X,A4)
C Effective file loading
open(unit=1,status='old',file=
+'stars.dat')
write(6,*) '....Loading file: stars.dat'
do i__=1,151
read(1,'(A91)')ar__
read(ar__,1)
+ SpNo(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
+ DEm(i__),DEs(i__),HD(i__),Other(i__),Sp(i__),Obs(i__),
+ Teff(i__),L(i__),M(i__),v_Fe_H_(i__),E_B_V(i__),Ref(i__)
if(ar__(1:2) .EQ. '') SpNo(i__) = iNULL__
if(ar__(25:30) .EQ. '') HD(i__) = iNULL__
RAdeg(i__) = rNULL__
DEdeg(i__) = rNULL__
c Derive coordinates RAdeg and DEdeg from input data
c (RAdeg and DEdeg are set to rNULL__ when unknown)
if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c ..............Just test output...........
write(6,1)
+ SpNo(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
+ DEm(i__),DEs(i__),HD(i__),Other(i__),Sp(i__),Obs(i__),
+ Teff(i__),L(i__),M(i__),v_Fe_H_(i__),E_B_V(i__),Ref(i__)
write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'spectra.dat' ! *Composite library spectra: Synthesized versus
* Catalog UBV colours (Tables 3 and 4)
C Format for file interpretation
2 format(
+ I2,2X,A9,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,A5)
C Effective file loading
open(unit=1,status='old',file=
+'spectra.dat')
write(6,*) '....Loading file: spectra.dat'
do i__=1,72
read(1,'(A54)')ar__1
read(ar__1,2)
+ SpNo_1(i__),Sp_1(i__),v_U_V_s(i__),v_B_V_s(i__),v_U_V_c(i__),
+ v_B_V_c(i__),v_U_V_r(i__),v_B_V_r(i__),Ref_1(i__)
if(ar__1(14:18) .EQ. '') v_U_V_s(i__) = rNULL__
if(ar__1(20:24) .EQ. '') v_B_V_s(i__) = rNULL__
if(ar__1(26:30) .EQ. '') v_U_V_c(i__) = rNULL__
if(ar__1(32:36) .EQ. '') v_B_V_c(i__) = rNULL__
if(ar__1(38:42) .EQ. '') v_U_V_r(i__) = rNULL__
if(ar__1(44:48) .EQ. '') v_B_V_r(i__) = rNULL__
c ..............Just test output...........
write(6,2)
+ SpNo_1(i__),Sp_1(i__),v_U_V_s(i__),v_B_V_s(i__),v_U_V_c(i__),
+ v_B_V_c(i__),v_U_V_r(i__),v_B_V_r(i__),Ref_1(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end