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

Conversion of standardized ReadMe file for file /./ftp/cats/V/32A 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-18
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/32A       Stars within 25 pc of the Sun    (Woolley+ 1970)
*================================================================================
*Catalogue of Stars within 25 Parsecs of the Sun
*     Woolley R.v.d.R., Epps E.A., Penston M.J., Pocock S.B.
*    <Royal Obs. Ann. 5 (1970)>
*    =1970ROAn....5....1W
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! The catalogue of stars within 25pc

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

C  B1950 position composed of: RAh RAm RAs DE- DEd (Epoch=1950)
      real*8        RAdeg      (nr__) ! (deg) Right Ascension B1950, Epoch=1950
      real*8        DEdeg      (nr__) ! (deg)     Declination B1950, Epoch=1950
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     Woolley    (nr__) ! *Sequence number
      character*1   m_Woolley  (nr__) ! Component identification
      integer*4     plx        (nr__) ! (mas) ?Parallax
      character*2   e_plx      (nr__) ! (mas) *[S0-9 ]Probable error in plx
      integer*4     n_plx      (nr__) ! ?Note:'8' if e_plx < 15%, '9' if e_plx < 10%
      real*4        pmRA       (nr__) ! (s/yr) ?Proper motion in RA
      real*8        pmDE       (nr__) ! (arcsec/yr) ?Proper motion in Dec
      real*4        RVel       (nr__) ! (km/s) ?Radial velocity
      character*1   n_RVel     (nr__) ! *[JV]Note on RV
      integer*4     U          (nr__) ! (km/s) ?U component of space velocity
*                                    (toward galactic centre)
      integer*4     V          (nr__) ! (km/s) ?V component of space velocity
*                                    (toward galactic rotation)
      integer*4     W          (nr__) ! (km/s) ?W component of space velocity
*                                    (toward North galactic pole)
      integer*4     GCdist     (nr__) ! (10-4) *?Galactocentric distance in units of
*                                    Sun's distance from the center
      integer*4     e          (nr__) ! ?Box orbit eccentricity (1)
      integer*4     i          (nr__) ! (10-4rad) ?Box orbit angle (highest inclination
*                                     of the orbit) (1)
      integer*4     LC_Code    (nr__) ! *?Luminosity class code
      character*3   SpType     (nr__) ! Spectral type
      character*1   r_SpType   (nr__) ! *[124] Coded source of spectral type
      real*4        Mag        (nr__) ! (mag) [-2/19]? Magnitude m(v) or m(pg) (see n_Mag)
      character*1   n_Mag      (nr__) ! *[JPV]Magnitude code
      real*4        B_V        (nr__) ! (mag) ?B-V color
      real*4        U_B        (nr__) ! (mag) ?U-B color
      real*4        Mv         (nr__) ! (mag) *?Absolute visual magnitude
      integer*4     RA1900h    (nr__) ! (h) ?Hours RA, equinox B1900, epoch 1900.0
      integer*4     RA1900dm   (nr__) ! (0.1min) ?Minutes RA, equinox B1900, epoch 1900.0
      character*1   DE1900_    (nr__) ! ?Sign Dec, equinox B1900, epoch 1900.0
      integer*4     DE1900d    (nr__) ! (deg) ?Degrees Dec, equinox B1900, epoch 1900.0
      integer*4     DE1900m    (nr__) ! (arcmin) ?Minutes Dec, equinox B1900, epoch 1900.0
      integer*4     RAh        (nr__) ! (h) ?Right Ascension B1950, epoch 1950 (hours)
      integer*4     RAm        (nr__) ! (min) ?Right Ascension B1950, epoch 1950 (minutes)
      integer*4     RAs        (nr__) ! (s) ?Right Ascension B1950, epoch 1950 (seconds)
      character*1   DE_        (nr__) ! ?Declination B1950, epoch 1950 (sign)
      integer*4     DEd        (nr__) ! (deg) ?Declination B1950, epoch 1950 (degrees)
      integer*4     DEdm       (nr__) ! (0.1arcmin) ?Declination B1950, epoch 1950 (deci-minutes)
      character*5   GCTP       (nr__) ! Gen. Cat. of Trigonometric Parallaxes <I/60>
      integer*4     HD         (nr__) ! [1/290000]? Henry Draper Catalog (HD) number
      character*10  DM         (nr__) ! Durchmusterung (BD, CD, or CP)
      character*5   GCRV       (nr__) ! Gen. Cat. of Radial Velocities (GCRV) number
      character*6   PM_Name    (nr__) ! Name from other proper-motion catalog
      integer*4     HR         (nr__) ! ?Bright Star = Harvard Revised catalog <V.50>
      character*3   Vys        (nr__) ! Number in red dwarf lists of Vyssotsky
      character*1   Remark1    (nr__) ! [23456789] First remark code (2)
      character*1   Remark2    (nr__) ! [23456789] Second remark code (2)
*Note on Woolley:
*    Star sequence numbers less than 1000 are from Gliese (1957);
*    new stars have a number > 9000; The Sun is #0 (and therefore lacks entries
*    in fields such as the RA and Dec.
*Note on e_plx:
*   "S" indicates spectroscopic parallax
*Note on n_RVel:
*    J = combined components of binary
*    V = variable velocity
*Note on GCdist:
*    i.e GCdist represents parsecs if the Sun distance is 10kpc. See
*    also in file "adc.doc"
*Note on LC_Code:
*    1 = I or c;   2 = II or c;
*    3 = III or g; 4 = IV or sg;
*    5 = V or d;   6 = VI or sd;
*    7 = D or wd.
*    Intermediate classes have no codes, e.g. 4 is given for IV-V.
*Note on r_SpType:
*    1 if MK;
*    2 if combined MK type for multiple system;
*    4 if combined non-MK;
*    blank  if non-MK.
*Note on n_Mag:
*    J = combined light for multiple system
*    P = Mag indicates a photographic magnitude
*    V = variable magnitude
*Note on Mv:
*    Visual magnitude is reported to 0.01 mag if both probable error of
*    parallax < 10% and V is given to 0.01 mag.
*Note (1): see details in file "adc.doc" or in the original publication.
*Note (2): the codes are
*   2 = spectroscopic binary
*   3 = spectroscopic triple
*   4 = unresolved double, unknown nature
*   5 = UV Ceti flare star
*   6 = eclipsing binary
*   7 = semi-regular variable
*   8 = astrometric binary
*   9 = planetary nebula

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

C  Loading file 'catalog.dat'	! The catalogue of stars within 25pc

C  Format for file interpretation

    1 format(
     +  I4,A1,I3,A2,I1,F6.4,F7.3,F6.1,A1,I4,I4,I4,I5,I4,I4,I1,A3,A1,
     +  F5.2,A1,F5.2,F5.2,F5.2,I2,I3,A1,I2,I2,I2,I2,I2,A1,I2,I3,A5,I6,
     +  A10,A5,A6,I4,A3,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,2150
        read(1,'(A145)')ar__
        read(ar__,1)
     +  Woolley(i__),m_Woolley(i__),plx(i__),e_plx(i__),n_plx(i__),
     +  pmRA(i__),pmDE(i__),RVel(i__),n_RVel(i__),U(i__),V(i__),
     +  W(i__),GCdist(i__),e(i__),i(i__),LC_Code(i__),SpType(i__),
     +  r_SpType(i__),Mag(i__),n_Mag(i__),B_V(i__),U_B(i__),Mv(i__),
     +  RA1900h(i__),RA1900dm(i__),DE1900_(i__),DE1900d(i__),
     +  DE1900m(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEdm(i__),GCTP(i__),HD(i__),DM(i__),GCRV(i__),PM_Name(i__),
     +  HR(i__),Vys(i__),Remark1(i__),Remark2(i__)
        if(ar__(6:8) .EQ. '') plx(i__) = iNULL__
        if(ar__(11:11) .EQ. '') n_plx(i__) = iNULL__
        if(ar__(12:17) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(18:24) .EQ. '') pmDE(i__) = rNULL__
        if(ar__(25:30) .EQ. '') RVel(i__) = rNULL__
        if(ar__(32:35) .EQ. '') U(i__) = iNULL__
        if(ar__(36:39) .EQ. '') V(i__) = iNULL__
        if(ar__(40:43) .EQ. '') W(i__) = iNULL__
        if(ar__(44:48) .EQ. '') GCdist(i__) = iNULL__
        if(ar__(49:52) .EQ. '') e(i__) = iNULL__
        if(ar__(53:56) .EQ. '') i(i__) = iNULL__
        if(ar__(57:57) .EQ. '') LC_Code(i__) = iNULL__
        if(ar__(62:66) .EQ. '') Mag(i__) = rNULL__
        if(ar__(68:72) .EQ. '') B_V(i__) = rNULL__
        if(ar__(73:77) .EQ. '') U_B(i__) = rNULL__
        if(ar__(78:82) .EQ. '') Mv(i__) = rNULL__
        if(ar__(83:84) .EQ. '') RA1900h(i__) = iNULL__
        if(ar__(85:87) .EQ. '') RA1900dm(i__) = iNULL__
        if(ar__(89:90) .EQ. '') DE1900d(i__) = iNULL__
        if(ar__(91:92) .EQ. '') DE1900m(i__) = iNULL__
        if(ar__(93:94) .EQ. '') RAh(i__) = iNULL__
        if(ar__(95:96) .EQ. '') RAm(i__) = iNULL__
        if(ar__(97:98) .EQ. '') RAs(i__) = iNULL__
        if(ar__(100:101) .EQ. '') DEd(i__) = iNULL__
        if(ar__(102:104) .EQ. '') DEdm(i__) = iNULL__
        if(ar__(110:115) .EQ. '') HD(i__) = iNULL__
        if(ar__(137:140) .EQ. '') HR(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(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  Woolley(i__),m_Woolley(i__),plx(i__),e_plx(i__),n_plx(i__),
     +  pmRA(i__),pmDE(i__),RVel(i__),n_RVel(i__),U(i__),V(i__),
     +  W(i__),GCdist(i__),e(i__),i(i__),LC_Code(i__),SpType(i__),
     +  r_SpType(i__),Mag(i__),n_Mag(i__),B_V(i__),U_B(i__),Mv(i__),
     +  RA1900h(i__),RA1900dm(i__),DE1900_(i__),DE1900d(i__),
     +  DE1900m(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEdm(i__),GCTP(i__),HD(i__),DM(i__),GCRV(i__),PM_Name(i__),
     +  HR(i__),Vys(i__),Remark1(i__),Remark2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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