CDS.headStuff2
FORTRAN Generation
Conversion of standardized ReadMe file for
catalog 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 2024-Apr-24 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/117A Geneva-Copenhagen Survey of Solar neighbourhood (Holmberg+, 2007) *================================================================================ *The Geneva-Copenhagen survey of the Solar neighbourhood. *I. Ages, metallicities, and kinematic properties of ~14000 F and G dwarfs. * Nordstrom B., Mayor M., Andersen J., Holmberg J., Pont F., Jorgensen B.R., * Olsen E.H., Udry S., Mowlavi N. * <Astron. Astrophys. 419, 989 (2004)> * =2004A&A...418..989N *II. New uvby calibrations and rediscussion of stellar ages, the G dwarf problem, *age-metallicity diagram, and heating mechanisms of the disk. * Holmberg J., Nordstroem B., Andersen J. * <Astron. Astrophys. 475, 519 (2007)> * =2007A&A...475..519H C============================================================================= C Internal variables integer*4 i__ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'newcat.dat' ! Main catalogue recalibrated data (2007) integer*4 nr__ parameter (nr__=16682) ! Number of records character*96 ar__ ! Full-size record C Position composed of: RAh RAm RAs DE- DEd DEm DEs integer*4 HIP (nr__) ! ? Hipparcos number if available character*11 Name (nr__) ! Object name (HD,BD,CD or CP) (1) character*4 Comp (nr__) ! Components included in photometry (2) integer*4 RAh (nr__) ! (h) Right ascension (ICRF) integer*4 RAm (nr__) ! (min) Right ascension (ICRF) real*4 RAs (nr__) ! (s) Right ascension (ICRF) character*1 DE_ (nr__) ! Declination sign (ICRF) integer*4 DEd (nr__) ! (deg) Declination (ICRF) integer*4 DEm (nr__) ! (arcmin) Declination (ICRF) integer*4 DEs (nr__) ! (arcsec) Declination (ICRF) real*4 logTe (nr__) ! ([K]) ? Effective temperature real*4 v_Fe_H_ (nr__) ! ([Sun]) ? Metallicity integer*4 Dist (nr__) ! (pc) ? Distance real*4 VMAG (nr__) ! (mag) ? Absolute magnitude real*4 Age (nr__) ! (Gyr) ? Age, in Gigayears real*4 clAge (nr__) ! (Gyr) ? Lower confidence limit on Age real*4 chAge (nr__) ! (Gyr) ? Upper confidence limit on Age integer*4 UVel (nr__) ! (km/s) ? Heliocentric space velocity component U (3) integer*4 VVel (nr__) ! (km/s) ? Heliocentric space velocity component V (3) integer*4 WVel (nr__) ! (km/s) ? Heliocentric space velocity component W (3) *Note (1): Object name given in order of preference. A second number * following a slash indicates that a double star with separate HD * numbers has been observed together. *Note (2): If the star is a member of a multiple system the component(s) * included in the photometry are identified here. *Note (3): Heliocentric space velocity components given in a right handed * coordinate system with U towards the galactic centre. c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table1.dat' ! First version of the catalog (2004) integer*4 nr__1 parameter (nr__1=16682) ! Number of records character*287 ar__1 ! Full-size record C J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs real*8 RAdeg (nr__1) ! (deg) Right Ascension J2000.0 real*8 DEdeg (nr__1) ! (deg) Declination J2000.0 C ---------------------------------- ! (position vector(s) in degrees) integer*4 HIP_1 (nr__1) ! ? Hipparcos number if available character*11 Name_1 (nr__1) ! Object name (HD,BD,CD or CP) (1) character*4 Comp_1 (nr__1) ! Components included in photometry (2) character*1 fb (nr__1) ! Flag for binaries of all types (3) character*1 fs (nr__1) ! Flag for cool dwarfs south of -26deg integer*4 RAh_1 (nr__1) ! (h) Right ascension (J2000.0) (4) integer*4 RAm_1 (nr__1) ! (min) Right ascension (J2000.0) (4) real*4 RAs_1 (nr__1) ! (s) Right ascension (J2000.0) (4) character*1 DE__1 (nr__1) ! Declination sign (J2000.0) (4) integer*4 DEd_1 (nr__1) ! (deg) Declination (J2000.0) (4) integer*4 DEm_1 (nr__1) ! (arcmin) Declination (J2000.0) (4) integer*4 DEs_1 (nr__1) ! (arcsec) Declination (J2000.0) (4) integer*4 GLON (nr__1) ! (deg) Galactic longitude integer*4 GLAT (nr__1) ! (deg) Galactic latitude real*4 Vmag_1 (nr__1) ! (mag) Johnson V magnitude real*4 b_y (nr__1) ! (mag) Stromgren b-y colour real*4 Hbeta (nr__1) ! (mag) ? Stromgren Hbeta index real*4 E_b_y (nr__1) ! (mag) ? Colour excess (5) real*4 logTe_1 (nr__1) ! ([K]) ? Effective temperature (6) real*4 v_Fe_H__1 (nr__1) ! ([Sun]) ? Metallicity (7) integer*4 Dist_1 (nr__1) ! (pc) ? Distance (8) real*4 VMAG_2 (nr__1) ! (mag) ? Absolute magnitude real*4 dVMag (nr__1) ! (mag) ? Magnitude difference to ZAMS character*1 fr (nr__1) ! Source for the distance (8) character*1 fg (nr__1) ! Flag for suspected giants (9) real*4 Age_1 (nr__1) ! (Gyr) ? Age, in Gigayears real*4 clAge_1 (nr__1) ! (Gyr) ? Lower confidence limit on Age real*4 chAge_1 (nr__1) ! (Gyr) ? Upper confidence limit on Age real*4 mass (nr__1) ! (solMass) ? Mass, in solar masses real*4 clmass (nr__1) ! (solMass) ? Lower confidence limit on mass real*4 chmass (nr__1) ! (solMass) ? Upper confidence limit on mass real*4 RVel (nr__1) ! (km/s) ? Mean radial velocity (10) real*4 meRVel (nr__1) ! (km/s) ? Mean error of radial velocity real*4 e_RVel (nr__1) ! (km/s) ? Standard deviation of RVel measurements integer*4 o_RVel (nr__1) ! ? Number of RVel measurements integer*4 dT (nr__1) ! (d) ? Time-span of RVel measurements real*4 P_chi2 (nr__1) ! ? Probability of constant RVel character*1 fd (nr__1) ! Flag for spectroscopic binaries (10) character*1 fv (nr__1) ! Source of RVel (11) integer*4 vsini (nr__1) ! (km/s) ? Rotational velocity integer*4 pmRA (nr__1) ! (mas/a) ? Proper motion in right ascension (4) integer*4 pmDE (nr__1) ! (mas/a) ? Proper motion in declination (4) integer*4 e_pm (nr__1) ! (mas/a) ? Standard error of total proper motion (4) real*4 plx (nr__1) ! (mas) ? Hipparcos parallax real*4 e_plx (nr__1) ! (mas) ? Standard error of parallax integer*4 UVel_1 (nr__1) ! (km/s) ? Heliocentric space velocity component U (12) integer*4 VVel_1 (nr__1) ! (km/s) ? Heliocentric space velocity component V (12) integer*4 WVel_1 (nr__1) ! (km/s) ? Heliocentric space velocity component W (12) real*4 Rgal (nr__1) ! (kpc) ? Galactic radial position (13) real*4 zgal (nr__1) ! (kpc) ? Galactic vertical position (13) real*8 Rmin (nr__1) ! (kpc) ? Perigalactic distance real*8 Rmax (nr__1) ! (kpc) ? Apogalactic distance real*4 ecc (nr__1) ! ? Eccentricity of galactic orbit real*8 zmax (nr__1) ! (kpc) ? Maximum distance from galactic plane character*4 Notes (nr__1) ! General note (14) *Note (1): Object name given in order of preference. * A second number following a slash indicates that a double star with * separate HD numbers has been observed together. *Note (2): If the star is a member of a multiple system the component(s) * included in the photometry are identified here. *Note (3): This flag identifies confirmed and suspected binaries. * The information can come from one or several sources such as * photometry, radial velocity or astrometry. *Note (4): From the Tycho-2 catalogue. *Note (5): From the calibration of Olsen (1988A&A...189..173O) * if E(b-y)>=0.02 and Dist>40pc; otherwise the star is assumed * to be unreddened. *Note (6): From the calibration of Alonso et al. (1996A&A...313..873A) *Note (7): From the calibrations by Schuster & Nissen (1989A&A...221...65S), * Edvardsson et al. (1993A&A...275..101E), or the one defined in Sect * 4.3 of the present paper. *Note (8): Source for the distance: * H = Hipparcos parallax, * F,G = F or G-star photometric distance. * If a Hipparcos distance with relative error below 13% is available, * this is used, otherwise a photometric distance is used. *Note (9): Flag for suspected giants. * Indicates a disagreement between the photometric distance * determination and the Hipparcos parallax at the 3 sigma level, * suggesting that the star is a giant not detected from the photometry. *Note (10): Mean radial velocity. For double lined binaries, the * computed systemic velocity is given if so indicated by the fd flag. *Note (11): Source of the radial velocity: * C: Coravel, presented in the present paper * A: CfA from Nordstrom et al. (1997, Cat. <J/A+AS/126/21>) * L: literature from Barbier-Brossat & Figon (2000A&AS..142..217B, * Cat. <III/213>) *Note (12): Heliocentric space velocity components given in a right handed * coordinate system with U towards the galactic centre. *Note (13): With the solar position 8.000kpc from the galactic centre, * and 7pc above the plane. *Note (14): Global notes: * a = Double star with Delta_mag_<5mag * b = Double star with Hipparcos measurement of Delta_mag_<5mag * c = Variable star * d = Simbad note * e = Olsen (1983A&AS...54...55O) * f = Olsen (1979A&AS...37..367O) * g = Olsen (1980A&AS...39..205O) * h = Olsen (1993A&AS..102...89O) * i = Olsen (1994A&AS..104..429O) * j = Olsen (1994A&AS..106..257O) * k = Abt et al. (1979PASP...91..176A) * l = Abt (1984ApJ...285..247A) * m = Abt (1986ApJ...309..260A) * n = Gray & Garrison (1989ApJS...69..301G) * o = Gray (1989AJ.....89.1049G) * p = Henry et al. (1996AJ....111..439H) c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table2.dat' ! Mass ratios for doubled-lined binaries (2004) integer*4 nr__2 parameter (nr__2=510) ! Number of records character*23 ar__2 ! Full-size record character*11 Name_2 (nr__2) ! HD number real*4 mratio (nr__2) ! Mass ratio (1) real*4 e_mratio (nr__2) ! ? Estimated uncertainty of the mass ratio (1) *Note (1): For spectroscopic binaries with multiple observations containing * double correlation peaks, the centre-of-mass velocity and the mass * ratio of the binary may be computed by the method of Wilson * (1941ApJ....93...29W). If only two observations are available, * no uncertainty can be estimated. C============================================================================= C Loading file 'newcat.dat' ! Main catalogue recalibrated data (2007) C Format for file interpretation 1 format( + I6,1X,A11,1X,A4,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X, + F5.3,1X,F5.2,1X,I3,1X,F5.2,1X,F4.1,1X,F4.1,1X,F4.1,1X,I4,1X, + I4,1X,I4) C Effective file loading open(unit=1,status='old',file= +'newcat.dat') write(6,*) '....Loading file: newcat.dat' do i__=1,16682 read(1,'(A96)')ar__ read(ar__,1) + HIP(i__),Name(i__),Comp(i__),RAh(i__),RAm(i__),RAs(i__), + DE_(i__),DEd(i__),DEm(i__),DEs(i__),logTe(i__),v_Fe_H_(i__), + Dist(i__),VMAG(i__),Age(i__),clAge(i__),chAge(i__),UVel(i__), + VVel(i__),WVel(i__) if(ar__(1:6) .EQ. '') HIP(i__) = iNULL__ if(ar__(46:50) .EQ. '') logTe(i__) = rNULL__ if(ar__(52:56) .EQ. '') v_Fe_H_(i__) = rNULL__ if(ar__(58:60) .EQ. '') Dist(i__) = iNULL__ if(ar__(62:66) .EQ. '') VMAG(i__) = rNULL__ if(ar__(68:71) .EQ. '') Age(i__) = rNULL__ if(ar__(73:76) .EQ. '') clAge(i__) = rNULL__ if(ar__(78:81) .EQ. '') chAge(i__) = rNULL__ if(ar__(83:86) .EQ. '') UVel(i__) = iNULL__ if(ar__(88:91) .EQ. '') VVel(i__) = iNULL__ if(ar__(93:96) .EQ. '') WVel(i__) = iNULL__ c ..............Just test output........... write(6,1) + HIP(i__),Name(i__),Comp(i__),RAh(i__),RAm(i__),RAs(i__), + DE_(i__),DEd(i__),DEm(i__),DEs(i__),logTe(i__),v_Fe_H_(i__), + Dist(i__),VMAG(i__),Age(i__),clAge(i__),chAge(i__),UVel(i__), + VVel(i__),WVel(i__) c .......End.of.Just test output........... end do close(1) C============================================================================= C Loading file 'table1.dat' ! First version of the catalog (2004) C Format for file interpretation 2 format( + I6,1X,A11,1X,A4,1X,A1,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X, + I2,1X,I2,1X,I3,1X,I3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.3, + 1X,F5.2,1X,I3,1X,F5.2,1X,F5.2,1X,A1,1X,A1,1X,F4.1,1X,F4.1,1X, + F4.1,1X,F4.2,1X,F4.2,1X,F4.2,13X,F6.1,1X,F4.1,1X,F5.1,1X,I3, + 1X,I4,1X,F5.3,1X,A1,1X,A1,1X,I3,1X,I5,1X,I5,1X,I2,1X,F5.1,1X, + F4.1,1X,I4,1X,I4,1X,I4,1X,F6.3,1X,F6.3,1X,F7.2,1X,F7.2,1X, + F5.2,1X,F7.2,1X,A4) C Effective file loading open(unit=1,status='old',file= +'table1.dat') write(6,*) '....Loading file: table1.dat' do i__=1,16682 read(1,'(A287)')ar__1 read(ar__1,2) + HIP_1(i__),Name_1(i__),Comp_1(i__),fb(i__),fs(i__),RAh_1(i__), + RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__), + DEs_1(i__),GLON(i__),GLAT(i__),Vmag_1(i__),b_y(i__), + Hbeta(i__),E_b_y(i__),logTe_1(i__),v_Fe_H__1(i__),Dist_1(i__), + VMAG_2(i__),dVMag(i__),fr(i__),fg(i__),Age_1(i__), + clAge_1(i__),chAge_1(i__),mass(i__),clmass(i__),chmass(i__), + RVel(i__),meRVel(i__),e_RVel(i__),o_RVel(i__),dT(i__), + P_chi2(i__),fd(i__),fv(i__),vsini(i__),pmRA(i__),pmDE(i__), + e_pm(i__),plx(i__),e_plx(i__),UVel_1(i__),VVel_1(i__), + WVel_1(i__),Rgal(i__),zgal(i__),Rmin(i__),Rmax(i__),ecc(i__), + zmax(i__),Notes(i__) if(ar__1(1:6) .EQ. '') HIP_1(i__) = iNULL__ if(ar__1(71:75) .EQ. '') Hbeta(i__) = rNULL__ if(ar__1(77:82) .EQ. '') E_b_y(i__) = rNULL__ if(ar__1(84:88) .EQ. '') logTe_1(i__) = rNULL__ if(ar__1(90:94) .EQ. '') v_Fe_H__1(i__) = rNULL__ if(ar__1(96:98) .EQ. '') Dist_1(i__) = iNULL__ if(ar__1(100:104) .EQ. '') VMAG_2(i__) = rNULL__ if(ar__1(106:110) .EQ. '') dVMag(i__) = rNULL__ if(ar__1(116:119) .EQ. '') Age_1(i__) = rNULL__ if(ar__1(121:124) .EQ. '') clAge_1(i__) = rNULL__ if(ar__1(126:129) .EQ. '') chAge_1(i__) = rNULL__ if(ar__1(131:134) .EQ. '') mass(i__) = rNULL__ if(ar__1(136:139) .EQ. '') clmass(i__) = rNULL__ if(ar__1(141:144) .EQ. '') chmass(i__) = rNULL__ if(ar__1(158:163) .EQ. '') RVel(i__) = rNULL__ if(ar__1(165:168) .EQ. '') meRVel(i__) = rNULL__ if(ar__1(170:174) .EQ. '') e_RVel(i__) = rNULL__ if(ar__1(176:178) .EQ. '') o_RVel(i__) = iNULL__ if(ar__1(180:183) .EQ. '') dT(i__) = iNULL__ if(ar__1(185:189) .EQ. '') P_chi2(i__) = rNULL__ if(ar__1(195:197) .EQ. '') vsini(i__) = iNULL__ if(ar__1(199:203) .EQ. '') pmRA(i__) = iNULL__ if(ar__1(205:209) .EQ. '') pmDE(i__) = iNULL__ if(ar__1(211:212) .EQ. '') e_pm(i__) = iNULL__ if(ar__1(214:218) .EQ. '') plx(i__) = rNULL__ if(ar__1(220:223) .EQ. '') e_plx(i__) = rNULL__ if(ar__1(225:228) .EQ. '') UVel_1(i__) = iNULL__ if(ar__1(230:233) .EQ. '') VVel_1(i__) = iNULL__ if(ar__1(235:238) .EQ. '') WVel_1(i__) = iNULL__ if(ar__1(240:245) .EQ. '') Rgal(i__) = rNULL__ if(ar__1(247:252) .EQ. '') zgal(i__) = rNULL__ if(ar__1(254:260) .EQ. '') Rmin(i__) = rNULL__ if(ar__1(262:268) .EQ. '') Rmax(i__) = rNULL__ if(ar__1(270:274) .EQ. '') ecc(i__) = rNULL__ if(ar__1(276:282) .EQ. '') zmax(i__) = rNULL__ 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_1(i__) .GT. -180) RAdeg(i__)=RAh_1(i__)*15. if(RAm_1(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm_1(i__)/4. if(RAs_1(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs_1(i__)/240. if(DEd_1(i__) .GE. 0) DEdeg(i__)=DEd_1(i__) if(DEm_1(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm_1(i__)/60. if(DEs_1(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs_1(i__)/3600. if(DE__1(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__) c ..............Just test output........... write(6,2) + HIP_1(i__),Name_1(i__),Comp_1(i__),fb(i__),fs(i__),RAh_1(i__), + RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),DEm_1(i__), + DEs_1(i__),GLON(i__),GLAT(i__),Vmag_1(i__),b_y(i__), + Hbeta(i__),E_b_y(i__),logTe_1(i__),v_Fe_H__1(i__),Dist_1(i__), + VMAG_2(i__),dVMag(i__),fr(i__),fg(i__),Age_1(i__), + clAge_1(i__),chAge_1(i__),mass(i__),clmass(i__),chmass(i__), + RVel(i__),meRVel(i__),e_RVel(i__),o_RVel(i__),dT(i__), + P_chi2(i__),fd(i__),fv(i__),vsini(i__),pmRA(i__),pmDE(i__), + e_pm(i__),plx(i__),e_plx(i__),UVel_1(i__),VVel_1(i__), + WVel_1(i__),Rgal(i__),zgal(i__),Rmin(i__),Rmax(i__),ecc(i__), + zmax(i__),Notes(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 'table2.dat' ! Mass ratios for doubled-lined binaries (2004) C Format for file interpretation 3 format(A11,1X,F5.3,1X,F5.3) C Effective file loading open(unit=1,status='old',file= +'table2.dat') write(6,*) '....Loading file: table2.dat' do i__=1,510 read(1,'(A23)')ar__2 read(ar__2,3)Name_2(i__),mratio(i__),e_mratio(i__) if(ar__2(19:23) .EQ. '') e_mratio(i__) = rNULL__ c ..............Just test output........... write(6,3)Name_2(i__),mratio(i__),e_mratio(i__) c .......End.of.Just test output........... end do close(1) C============================================================================= stop end