CDS.headStuff2
FORTRAN Generation
Conversion of standardized ReadMe file for
catalog 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 2024-Apr-19 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/159/141 Spectroscopic properties of cool stars. I. (Valenti+, 2005) *================================================================================ *Spectroscopic properties of cool stars (SPOCS). *I. 1040 F, G, and K dwarfs from Keck, Lick, and AAT planet search programs. * Valenti J.A., Fischer D.A. * <Astrophys. J. Suppl. Ser., 159, 141-166 (2005)> * =2005ApJS..159..141V C============================================================================= C Internal variables integer*4 i__ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table8.dat' ! Spectroscopically determined stellar properties integer*4 nr__ parameter (nr__=1040) ! Number of records character*92 ar__ ! Full-size record integer*4 SPOCS ! Catalog identification number (G1) character*11 Name ! Object name integer*4 Teff ! (K) Synthetic spectrum fit effective temperature real*4 log_g ! ([cm/s]) Log of the synthetic spectrum fit surface gravity real*4 v_M_H_ ! ([Sun]) Log of the metallicity number abundance (1) real*4 v_Na_H_ ! ([Sun]) ? Log of the sodium number abundance (1) real*4 v_Si_H_ ! ([Sun]) Log of the silicon number abundance (1) real*4 v_Ti_H_ ! ([Sun]) Log of the titanium number abundance (1) real*4 v_Fe_H_ ! ([Sun]) Log of the iron number abundance (1) real*4 v_Ni_H_ ! ([Sun]) Log of the nickel number abundance (1) real*4 vsini ! (km/s) Projected rotational velocity real*4 RV ! (km/s) Mean radial velocity real*4 RMSC ! Continuum RMS residual of the synthetic fit real*4 RMSL ! Line RMS residual of the synthetic fit integer*4 N1 ! Number of Keck spectra analyzed integer*4 N2 ! Number of AAT spectra analyzed integer*4 N3 ! Number of Lick spectra analyzed *Note (1): Relative to hydrogen. c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table9.dat' ! Derived stellar parameters integer*4 nr__1 parameter (nr__1=1040) ! Number of records character*134 ar__1 ! Full-size record C J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs real*8 RAdeg ! (deg) Right Ascension J2000 real*8 DEdeg ! (deg) Declination J2000 C ---------------------------------- ! (position vector(s) in degrees) integer*4 SPOCS_1 ! Catalog identification number (G1) character*11 Name_1 ! Object name integer*4 RAh ! (h) ? Hour of Right Ascension (J2000) integer*4 RAm ! (min) ? Minute of Right Ascension (J2000) real*4 RAs ! (s) ? Second of Right Ascension (J2000) character*1 DE_ ! Sign of the Declination (J2000) integer*4 DEd ! (deg) ? Degree of Declination (J2000) integer*4 DEm ! (arcmin) ? Arcminute of Declination (J2000) integer*4 DEs ! (arcsec) ? Arcsecond of Declination (J2000) real*4 Vmag ! (mag) ? The visual magnitude real*8 Dist ! (pc) ? Distance real*8 e_Dist ! (pc) ? Uncertainty in Dist real*4 log_L ! ([solLum]) ? Log of the luminosity in solar units real*4 e_log_L ! ([solLum]) ? Uncertainty in log(L) real*4 Rad ! (solRad) ? Stellar radius in solar units real*4 e_Rad ! (solRad) ? Uncertainty in Rad real*4 Mass ! (solMass) ? Stellar mass in solar units real*4 e_Mass ! (solMass) ? Uncertainty in Mass real*4 Miso ! (solMass) ? Isochrone stellar mass in solar units real*4 e_Miso ! (solMass) ? Lower range limit to M-iso real*4 E_Miso_1 ! (solMass) ? Upper range limit to M-iso real*4 log_giso ! ([cm/s2]) ? Log of the isochrone surface gravity real*4 Age ! (Gyr) ? Isochrone age real*4 e_Age ! (Gyr) ? Lower range limit to Age real*4 E_Age_1 ! (Gyr) ? Upper range limit to Age C============================================================================= C Loading file 'table8.dat' ! Spectroscopically determined stellar properties C Format for file interpretation 1 format( + I4,1X,A11,1X,I4,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X, + F5.2,1X,F5.2,1X,F4.1,1X,F6.1,1X,F4.2,1X,F4.2,1X,I1,1X,I2,1X,I2) C Effective file loading open(unit=1,status='old',file= +'table8.dat') write(6,*) '....Loading file: table8.dat' do i__=1,1040 read(1,'(A92)')ar__ read(ar__,1) + SPOCS,Name,Teff,log_g,v_M_H_,v_Na_H_,v_Si_H_,v_Ti_H_,v_Fe_H_, + v_Ni_H_,vsini,RV,RMSC,RMSL,N1,N2,N3 if(ar__(34:38) .EQ. '') v_Na_H_ = rNULL__ c ..............Just test output........... write(6,1) + SPOCS,Name,Teff,log_g,v_M_H_,v_Na_H_,v_Si_H_,v_Ti_H_,v_Fe_H_, + v_Ni_H_,vsini,RV,RMSC,RMSL,N1,N2,N3 c .......End.of.Just test output........... end do close(1) C============================================================================= C Loading file 'table9.dat' ! Derived stellar parameters C Format for file interpretation 2 format( + I4,1X,A11,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,F5.2,1X, + F8.4,1X,F7.4,1X,F6.3,1X,F5.3,1X,F6.4,1X,F6.4,1X,F5.3,1X,F5.3, + 1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.1,1X,F4.1,1X,F4.1) C Effective file loading open(unit=1,status='old',file= +'table9.dat') write(6,*) '....Loading file: table9.dat' do i__=1,1040 read(1,'(A134)')ar__1 read(ar__1,2) + SPOCS_1,Name_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,Dist,e_Dist, + log_L,e_log_L,Rad,e_Rad,Mass,e_Mass,Miso,e_Miso,E_Miso_1, + log_giso,Age,e_Age,E_Age_1 if(ar__1(18:19) .EQ. '') RAh = iNULL__ if(ar__1(21:22) .EQ. '') RAm = iNULL__ if(ar__1(24:27) .EQ. '') RAs = rNULL__ if(ar__1(30:31) .EQ. '') DEd = iNULL__ if(ar__1(33:34) .EQ. '') DEm = iNULL__ if(ar__1(36:37) .EQ. '') DEs = iNULL__ if(ar__1(39:43) .EQ. '') Vmag = rNULL__ if(ar__1(45:52) .EQ. '') Dist = rNULL__ if(ar__1(54:60) .EQ. '') e_Dist = rNULL__ if(ar__1(62:67) .EQ. '') log_L = rNULL__ if(ar__1(69:73) .EQ. '') e_log_L = rNULL__ if(ar__1(75:80) .EQ. '') Rad = rNULL__ if(ar__1(82:87) .EQ. '') e_Rad = rNULL__ if(ar__1(89:93) .EQ. '') Mass = rNULL__ if(ar__1(95:99) .EQ. '') e_Mass = rNULL__ if(ar__1(101:104) .EQ. '') Miso = rNULL__ if(ar__1(106:109) .EQ. '') e_Miso = rNULL__ if(ar__1(111:114) .EQ. '') E_Miso_1 = rNULL__ if(ar__1(116:119) .EQ. '') log_giso = rNULL__ if(ar__1(121:124) .EQ. '') Age = rNULL__ if(ar__1(126:129) .EQ. '') e_Age = rNULL__ if(ar__1(131:134) .EQ. '') E_Age_1 = rNULL__ RAdeg = rNULL__ DEdeg = rNULL__ c Derive coordinates RAdeg and DEdeg from input data c (RAdeg and DEdeg are set to rNULL__ when unknown) if(RAh .GT. -180) RAdeg=RAh*15. if(RAm .GT. -180) RAdeg=RAdeg+RAm/4. if(RAs .GT. -180) RAdeg=RAdeg+RAs/240. if(DEd .GE. 0) DEdeg=DEd if(DEm .GE. 0) DEdeg=DEdeg+DEm/60. if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600. if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg c ..............Just test output........... write(6,2) + SPOCS_1,Name_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,Dist,e_Dist, + log_L,e_log_L,Rad,e_Rad,Mass,e_Mass,Miso,e_Miso,E_Miso_1, + log_giso,Age,e_Age,E_Age_1 write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg c .......End.of.Just test output........... end do close(1) C============================================================================= stop end