FORTRAN Generation
(/./ftp/cats/V/117A/)

Conversion of standardized ReadMe file for file /./ftp/cats/V/117A/ 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-Mar-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. 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         ! ? Hipparcos number if available
      character*11  Name        ! Object name (HD,BD,CD or CP) (1)
      character*4   Comp        ! Components included in photometry (2)
      integer*4     RAh         ! (h) Right ascension (ICRF)
      integer*4     RAm         ! (min) Right ascension (ICRF)
      real*4        RAs         ! (s) Right ascension (ICRF)
      character*1   DE_         ! Declination sign (ICRF)
      integer*4     DEd         ! (deg) Declination (ICRF)
      integer*4     DEm         ! (arcmin) Declination (ICRF)
      integer*4     DEs         ! (arcsec) Declination (ICRF)
      real*4        logTe       ! ([K]) ? Effective temperature
      real*4        v_Fe_H_     ! ([Sun]) ? Metallicity
      integer*4     Dist        ! (pc) ? Distance
      real*4        VMAG        ! (mag) ? Absolute magnitude
      real*4        Age         ! (Gyr) ? Age, in Gigayears
      real*4        clAge       ! (Gyr) ? Lower confidence limit on Age
      real*4        chAge       ! (Gyr) ? Upper confidence limit on Age
      integer*4     UVel        ! (km/s) ? Heliocentric space velocity component U (3)
      integer*4     VVel        ! (km/s) ? Heliocentric space velocity component V (3)
      integer*4     WVel        ! (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       ! (deg) Right Ascension J2000.0
      real*8        DEdeg       ! (deg)     Declination J2000.0
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     HIP_1       ! ? Hipparcos number if available
      character*11  Name_1      ! Object name (HD,BD,CD or CP) (1)
      character*4   Comp_1      ! Components included in photometry (2)
      character*1   fb          ! Flag for binaries of all types (3)
      character*1   fs          ! Flag for cool dwarfs south of -26deg
      integer*4     RAh_1       ! (h) Right ascension (J2000.0) (4)
      integer*4     RAm_1       ! (min) Right ascension (J2000.0) (4)
      real*4        RAs_1       ! (s) Right ascension (J2000.0) (4)
      character*1   DE__1       ! Declination sign (J2000.0) (4)
      integer*4     DEd_1       ! (deg) Declination (J2000.0) (4)
      integer*4     DEm_1       ! (arcmin) Declination (J2000.0) (4)
      integer*4     DEs_1       ! (arcsec) Declination (J2000.0) (4)
      integer*4     GLON        ! (deg) Galactic longitude
      integer*4     GLAT        ! (deg) Galactic latitude
      real*4        Vmag_1      ! (mag) Johnson V magnitude
      real*4        b_y         ! (mag) Stromgren b-y colour
      real*4        Hbeta       ! (mag) ? Stromgren Hbeta index
      real*4        E_b_y       ! (mag) ? Colour excess (5)
      real*4        logTe_1     ! ([K]) ? Effective temperature (6)
      real*4        v_Fe_H__1   ! ([Sun]) ? Metallicity (7)
      integer*4     Dist_1      ! (pc) ? Distance (8)
      real*4        VMAG_2      ! (mag) ? Absolute magnitude
      real*4        dVMag       ! (mag) ? Magnitude difference to ZAMS
      character*1   fr          ! Source for the distance (8)
      character*1   fg          ! Flag for suspected giants (9)
      real*4        Age_1       ! (Gyr) ? Age, in Gigayears
      real*4        clAge_1     ! (Gyr) ? Lower confidence limit on Age
      real*4        chAge_1     ! (Gyr) ? Upper confidence limit on Age
      real*4        mass        ! (solMass) ? Mass, in solar masses
      real*4        clmass      ! (solMass) ? Lower confidence limit on mass
      real*4        chmass      ! (solMass) ? Upper confidence limit on mass
      real*4        RVel        ! (km/s) ? Mean radial velocity (10)
      real*4        meRVel      ! (km/s) ? Mean error of radial velocity
      real*4        e_RVel      ! (km/s) ? Standard deviation of RVel measurements
      integer*4     o_RVel      ! ? Number of RVel measurements
      integer*4     dT          ! (d) ? Time-span of RVel measurements
      real*4        P_chi2      ! ? Probability of constant RVel
      character*1   fd          ! Flag for spectroscopic binaries (10)
      character*1   fv          ! Source of RVel (11)
      integer*4     vsini       ! (km/s) ? Rotational velocity
      integer*4     pmRA        ! (mas/a) ? Proper motion in right ascension (4)
      integer*4     pmDE        ! (mas/a) ? Proper motion in declination (4)
      integer*4     e_pm        ! (mas/a) ? Standard error of total proper motion (4)
      real*4        plx         ! (mas) ? Hipparcos parallax
      real*4        e_plx       ! (mas) ? Standard error of parallax
      integer*4     UVel_1      ! (km/s) ? Heliocentric space velocity component U (12)
      integer*4     VVel_1      ! (km/s) ? Heliocentric space velocity component V (12)
      integer*4     WVel_1      ! (km/s) ? Heliocentric space velocity component W (12)
      real*4        Rgal        ! (kpc) ? Galactic radial position (13)
      real*4        zgal        ! (kpc) ? Galactic vertical position (13)
      real*8        Rmin        ! (kpc) ? Perigalactic distance
      real*8        Rmax        ! (kpc) ? Apogalactic distance
      real*4        ecc         ! ? Eccentricity of galactic orbit
      real*8        zmax        ! (kpc) ? Maximum distance from galactic plane
      character*4   Notes       ! 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      ! HD number
      real*4        mratio      ! Mass ratio (1)
      real*4        e_mratio    ! ? 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,Name,Comp,RAh,RAm,RAs,DE_,DEd,DEm,DEs,logTe,v_Fe_H_,Dist,
     +  VMAG,Age,clAge,chAge,UVel,VVel,WVel
        if(ar__(1:6) .EQ. '') HIP = iNULL__
        if(ar__(46:50) .EQ. '') logTe = rNULL__
        if(ar__(52:56) .EQ. '') v_Fe_H_ = rNULL__
        if(ar__(58:60) .EQ. '') Dist = iNULL__
        if(ar__(62:66) .EQ. '') VMAG = rNULL__
        if(ar__(68:71) .EQ. '') Age = rNULL__
        if(ar__(73:76) .EQ. '') clAge = rNULL__
        if(ar__(78:81) .EQ. '') chAge = rNULL__
        if(ar__(83:86) .EQ. '') UVel = iNULL__
        if(ar__(88:91) .EQ. '') VVel = iNULL__
        if(ar__(93:96) .EQ. '') WVel = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  HIP,Name,Comp,RAh,RAm,RAs,DE_,DEd,DEm,DEs,logTe,v_Fe_H_,Dist,
     +  VMAG,Age,clAge,chAge,UVel,VVel,WVel
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,Name_1,Comp_1,fb,fs,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,
     +  DEs_1,GLON,GLAT,Vmag_1,b_y,Hbeta,E_b_y,logTe_1,v_Fe_H__1,
     +  Dist_1,VMAG_2,dVMag,fr,fg,Age_1,clAge_1,chAge_1,mass,clmass,
     +  chmass,RVel,meRVel,e_RVel,o_RVel,dT,P_chi2,fd,fv,vsini,pmRA,
     +  pmDE,e_pm,plx,e_plx,UVel_1,VVel_1,WVel_1,Rgal,zgal,Rmin,Rmax,
     +  ecc,zmax,Notes
        if(ar__1(1:6) .EQ. '') HIP_1 = iNULL__
        if(ar__1(71:75) .EQ. '') Hbeta = rNULL__
        if(ar__1(77:82) .EQ. '') E_b_y = rNULL__
        if(ar__1(84:88) .EQ. '') logTe_1 = rNULL__
        if(ar__1(90:94) .EQ. '') v_Fe_H__1 = rNULL__
        if(ar__1(96:98) .EQ. '') Dist_1 = iNULL__
        if(ar__1(100:104) .EQ. '') VMAG_2 = rNULL__
        if(ar__1(106:110) .EQ. '') dVMag = rNULL__
        if(ar__1(116:119) .EQ. '') Age_1 = rNULL__
        if(ar__1(121:124) .EQ. '') clAge_1 = rNULL__
        if(ar__1(126:129) .EQ. '') chAge_1 = rNULL__
        if(ar__1(131:134) .EQ. '') mass = rNULL__
        if(ar__1(136:139) .EQ. '') clmass = rNULL__
        if(ar__1(141:144) .EQ. '') chmass = rNULL__
        if(ar__1(158:163) .EQ. '') RVel = rNULL__
        if(ar__1(165:168) .EQ. '') meRVel = rNULL__
        if(ar__1(170:174) .EQ. '') e_RVel = rNULL__
        if(ar__1(176:178) .EQ. '') o_RVel = iNULL__
        if(ar__1(180:183) .EQ. '') dT = iNULL__
        if(ar__1(185:189) .EQ. '') P_chi2 = rNULL__
        if(ar__1(195:197) .EQ. '') vsini = iNULL__
        if(ar__1(199:203) .EQ. '') pmRA = iNULL__
        if(ar__1(205:209) .EQ. '') pmDE = iNULL__
        if(ar__1(211:212) .EQ. '') e_pm = iNULL__
        if(ar__1(214:218) .EQ. '') plx = rNULL__
        if(ar__1(220:223) .EQ. '') e_plx = rNULL__
        if(ar__1(225:228) .EQ. '') UVel_1 = iNULL__
        if(ar__1(230:233) .EQ. '') VVel_1 = iNULL__
        if(ar__1(235:238) .EQ. '') WVel_1 = iNULL__
        if(ar__1(240:245) .EQ. '') Rgal = rNULL__
        if(ar__1(247:252) .EQ. '') zgal = rNULL__
        if(ar__1(254:260) .EQ. '') Rmin = rNULL__
        if(ar__1(262:268) .EQ. '') Rmax = rNULL__
        if(ar__1(270:274) .EQ. '') ecc = rNULL__
        if(ar__1(276:282) .EQ. '') zmax = 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_1 .GT. -180) RAdeg=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg=RAdeg+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg=RAdeg+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg=DEd_1
        if(DEm_1 .GE. 0) DEdeg=DEdeg+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg=DEdeg+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,2)
     +  HIP_1,Name_1,Comp_1,fb,fs,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,
     +  DEs_1,GLON,GLAT,Vmag_1,b_y,Hbeta,E_b_y,logTe_1,v_Fe_H__1,
     +  Dist_1,VMAG_2,dVMag,fr,fg,Age_1,clAge_1,chAge_1,mass,clmass,
     +  chmass,RVel,meRVel,e_RVel,o_RVel,dT,P_chi2,fd,fv,vsini,pmRA,
     +  pmDE,e_pm,plx,e_plx,UVel_1,VVel_1,WVel_1,Rgal,zgal,Rmin,Rmax,
     +  ecc,zmax,Notes
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
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,mratio,e_mratio
        if(ar__2(19:23) .EQ. '') e_mratio = rNULL__
c    ..............Just test output...........
        write(6,3)Name_2,mratio,e_mratio
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end