FORTRAN Generation
(/./ftp/cats/III/254)

Conversion of standardized ReadMe file for file /./ftp/cats/III/254 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.8, on 2014-Oct-22
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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. III/254  2nd Cat. of Radial Velocities with Astrometric Data (Kharchenko+, 2007)
*================================================================================
*The catalogue of radial velocities of galactic stars with high precision
*astrometric data, the 2nd version (CRVAD-2).
*    Kharchenko N.V., Scholz R.-D., Piskunov A.E., Roeser S., Schilbach E.
*   <Astron. Nachr., 328, 889 (2007)>
*   =2007AN....328..889K
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'crvad2.dat'	! The catalogue of radial velocities of galactic
                             stars with high precision astrometric data,
                             the 2nd version (CRVAD-2)

      integer*4 nr__
      parameter (nr__=54907)	! Number of records
      character*213 ar__   	! Full-size record

      real*8        RAhour     (nr__) ! (h) Right Ascension J2000.0, epoch 1991.25
      real*8        DEdeg      (nr__) ! (deg) Declination J2000.0, epoch 1991.25
      real*4        e_RAhour   (nr__) ! (mas) Standard error in RA*cos(DEdeg)
      real*4        e_DEdeg    (nr__) ! (mas) Standard error in DEdeg
      real*8        Plx        (nr__) ! (mas) ?=9999.99 Trigonometric parallax
      real*8        e_Plx      (nr__) ! (mas) ?=999.99 Standard error in Plx
      real*8        pmRA       (nr__) ! (mas/yr) Proper Motion in RA*cos(DEdeg)
      real*8        pmDE       (nr__) ! (mas/yr) Proper Motion in DE
      real*8        e_pmRA     (nr__) ! (mas/yr) Standard error in pmRA
      real*8        e_pmDE     (nr__) ! (mas/yr) Standard error in pmDE
      real*8        Bmag       (nr__) ! (mag) ?=99.999 B magnitude in Johnson system
      real*8        Vmag       (nr__) ! (mag) ?=99.999 V magnitude in Johnson system
      real*4        e_Bmag     (nr__) ! (mag) ?=9.999 Standard error on B magnitude
      real*4        e_Vmag     (nr__) ! (mag) ?=9.999 Standard error on V magnitude
      real*4        Scat       (nr__) ! (mag) ?=9.999 Scatter on magnitude
      character*1   v1         (nr__) ! *[GN] Known variability from GCVS/NSV
      character*1   v2         (nr__) ! *[UVW] Variability from Tycho-1
      character*1   v3         (nr__) ! *[CDMPRU] Variability type
      character*1   v4         (nr__) ! *[VYIXR] Variability from CMC11
      character*2   d12        (nr__) ! *[A-S ] CCDM component identifier
*                                         (from Cat. I/274)
      character*1   d3         (nr__) ! *[A-S] Component identifier
      character*1   d4         (nr__) ! *[DRSYZ] Duplicity from Tycho-1
      character*1   d5         (nr__) ! *[CGOVX] Double/Multiple Systems flag
      character*1   d6         (nr__) ! [D] Duplicity flag from PPM
      character*12  SpType     (nr__) ! *MK Spectral type compiled from ASCC-2.5
*                                     and GCRV
      character*20  SpType2    (nr__) ! MK Spectral type from Tycho-2
*                                     Spectral Type Catalog (Cat. III/231)
      integer*4     HIP        (nr__) ! ?=0 Hipparcos number (Cat. I/239)
      integer*4     HD         (nr__) ! ?=0 HD number (Cat. III/135)
      integer*4     ASCC       (nr__) ! ASCC-2.5 (Cat. I/280) number
      integer*4     IRVC       (nr__) ! *[1/5] Index of Radial Velocity Catalogues
      character*4   Comp       (nr__) ! *Components of multiple stars
      real*8        RV         (nr__) ! (km/s) Radial Velocity
      real*8        e_RV       (nr__) ! (km/s) ?=-9.99 Mean standard error in RV
      character*1   q_RV       (nr__) ! *[A-E I] Quality index of the RV from CGRV 
*                                          (Cat. III/213)
      integer*4     o_RV       (nr__) ! ?=0 Number of observations
      integer*4     nRV        (nr__) ! [1/3] Number of matches for given IRVC entry
*Note on v1: Byte 292 (T47=Var) from Tycho-1 file tyc_main.dat
*        (I/239/tyc_main), as follows:
*     G = variable known in the General Catalog of Variable Stars (Cat. II/250)
*     N = variable known in the New Suspected Variables catalog (Cat. II/250)
*Note on v2: Byte 294 (T48=VarFlag) from Tycho-1 file tyc_main.dat
*        (I/239/tyc_main), as follows:
*     U = apparent variability in the Tycho data; may be due to duplicity
*     V = strong evidence of intrinsic variability
*     W = suspected intrinsic variability
*Note on v3: Byte 322 (H52=HvarType) from Hipparcos file hip_main.dat
*        (I/239/hip_main). Hipparcos-defined type of variability (a blank 
*        entry signifies that the entry could not be classified as variable
*        or constant):
*     C = no variability detected ("constant")
*     D = duplicity-induced variability
*     M = possibly micro-variable (amplitude < 0.03mag)
*     P = periodic variable
*     R = V-I colour index was revised due to variability analysis
*     U = unsolved variable which does not fall in the other categories
*Note on v4: Flag from CMC11 catalogue (I/256) as follows:
*   V      = variable star
*   Y or I = if the CAMC did not measure the magnitude, an approximate
*            value from other sources is given to a precision of 0.1mag
*   X or R = star fainter than 12 with unknown mag is given as 12.
*Note on d12: Bytes 149-150 from Tycho-2 file catalog.dat (I/259/catalog).
*     CCDM component identifiers for double or multiple Hipparcos stars
*     contributing to this Tycho-2 entry.
*Note on d3: Byte 41 (DC7=comp_id) from Hipparcos file hip_dm_com.dat
*     (I/239/h_dm_com).
*Note on d4: Byte 296 (T49=MultFlag) from Tycho-1 file (I/239/tyc_main).
*            Unresolved duplicity status from Tycho data analysis:
*        D = duplicity clearly indicated (B_Tmag and V_Tmag refer to
*            combined light)
*        R = duplicity weakly indicated, combined with indication of variability
*        S = duplicity suspected
*        Y = investigation for duplicity carried out on Tycho data,
*            no indication of duplicity was found
*        Z = investigation for duplicity not carried out
*    blank = Hipparcos star not observed by Tycho
*Note on d5: Byte 347 (H59=MultFlag) from Hipparcos file (I/239/hip_main).
*        Indicates that further details are given in the Hipparcos Double
*        and Multiple Systems Annex:
*     C = solutions for the components
*     G = acceleration or higher order terms
*     O = orbital solutions
*     V = variability-induced movers (apparent motion arises from variability)
*     X = stochastic solution (probably astrometric binaries with short period)
*Note on SpType: was compiled from Spectral type given in the
*     ASCC-2.5 (I/280) and GCRV (III/213)
*Note on IRVC: Index of Radial Velocity Catalogues from the following references:
*     1 = Famaey et al., 2005, Cat. <J/A+A/430/165>
*     2 = Gontcharov, 2006, Cat. <III/252>
*     3 = Nordstrom et al., 2004, Cat. <V/117>
*     4 = Barbier-Brossat & Figon, 2000, Cat. <III/213>
*     5 = averaged of Cat. <III/213> and Cat. <J/A+A/430/165>
*Note on Comp: Components from CCDM (I/274) copied from the GCRV (III/213)
*     or letter "d" as an index of multiplicity from <V/117>.
*Note on q_RV: Quality flag as follows:
*     A = standard error of 0.74km/s
*     B = standard error of 1.78km/s
*     C = standard error of 3.70km/s
*     D = standard error of 7.40km/s
*     E = standard error of 10.0km/s
*     I = insufficient data

C=============================================================================

C  Loading file 'crvad2.dat'	! The catalogue of radial velocities of galactic
*                             stars with high precision astrometric data,
*                             the 2nd version (CRVAD-2)

C  Format for file interpretation

    1 format(
     +  F12.9,1X,F12.8,F6.1,F6.1,F8.2,F7.2,F9.2,F9.2,F7.2,F7.2,F7.3,
     +  F7.3,F6.3,F6.3,F6.3,1X,A1,A1,A1,A1,A2,A1,A1,A1,A1,1X,A12,1X,
     +  A20,I7,I7,I8,1X,I1,1X,A4,F8.2,F7.2,1X,A1,I4,1X,I1)

C  Effective file loading

      open(unit=1,file='crvad2.dat', status='old')
      write(6,*) '....Loading file: crvad2.dat'
      do i__=1,54907
        read(1,'(A213)')ar__
        read(ar__,1)
     +  RAhour(i__),DEdeg(i__),e_RAhour(i__),e_DEdeg(i__),Plx(i__),
     +  e_Plx(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Bmag(i__),Vmag(i__),e_Bmag(i__),e_Vmag(i__),Scat(i__),v1(i__),
     +  v2(i__),v3(i__),v4(i__),d12(i__),d3(i__),d4(i__),d5(i__),
     +  d6(i__),SpType(i__),SpType2(i__),HIP(i__),HD(i__),ASCC(i__),
     +  IRVC(i__),Comp(i__),RV(i__),e_RV(i__),q_RV(i__),o_RV(i__),
     +  nRV(i__)
c    ..............Just test output...........
        write(6,1)
     +  RAhour(i__),DEdeg(i__),e_RAhour(i__),e_DEdeg(i__),Plx(i__),
     +  e_Plx(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Bmag(i__),Vmag(i__),e_Bmag(i__),e_Vmag(i__),Scat(i__),v1(i__),
     +  v2(i__),v3(i__),v4(i__),d12(i__),d3(i__),d4(i__),d5(i__),
     +  d6(i__),SpType(i__),SpType2(i__),HIP(i__),HD(i__),ASCC(i__),
     +  IRVC(i__),Comp(i__),RV(i__),e_RV(i__),q_RV(i__),o_RV(i__),
     +  nRV(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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