FORTRAN Generation
(/./ftp/cats/I/237)

Conversion of standardized ReadMe file for file /./ftp/cats/I/237 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-29
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. I/237   The Washington Visual Double Star Catalog, 1996.0    (Worley+, 1996)
*================================================================================
*The Washington Visual Double Star Catalog, 1996.0
*    Worley C.E., Douglass G.G.
*   <US Naval Observatory (1996); Astron. Astrophys. Suppl. Ser. 125, 523 (1997)>
*   =1997A&AS..125..523W
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! WDS Catalog

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

C  J2000 position composed of: RAh DE- DEd DEm
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     RAh         ! (h) *Right Ascension J2000 (hours)
      integer*4     RAdm        ! (0.1min) *Right Ascension J2000 (minutes)
      character*1   DE_         ! *Declination J2000 (sign)
      integer*4     DEd         ! (deg) *Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) *Declination J2000 (minutes)
      character*7   DiscName    ! *Discoverer Code & Number
      character*5   Comp        ! *Component Identification
      integer*4     Date1       ! (a) ?Date of first satisfactory
*                                     observation (+1000)
      integer*4     Date2       ! (a) ?Date of last satisfactory
*                                     observation (+1000)
      integer*4     NumObs      ! *?Number of measures of the object
      character*3   pa1         ! (deg) *Position Angle for Date1
      character*3   pa2         ! (deg) *Position Angle for Date2
      real*4        Sep1        ! (arcsec) *?Angular Separation for Date1
      real*4        Sep2        ! (arcsec) *?Angular Separation for Date2
      real*4        MagA        ! (mag) ?Magnitude of component 1
      real*4        MagB        ! (mag) ?Magnitude of component 2
      character*9   Sp          ! *Spectral Types of Primary/Secondary
      integer*4     pmRA        ! (mas/a) *?Proper Motion in Right Ascension
      integer*4     pmDE        ! (mas/a) *?Proper Motion in Declination
      character*8   DM          ! *Durchmusterung Zone & Number
      character*2   note        ! *Notes
*Note on RAh, RAdm, DE-, DEd, DEm:
*   The positions given represent our best estimates of these values. Where
*   possible, these are based on the ACRS and PPM data, with proper motion
*   incorporated. (Code "p" in cols. 79-80).
*Note on DiscName:
*   The discoverer, identified by a one-to-three letter code, and the
*   discoverer's number, if assigned. The reference list ("wdsref.dat")
*   should be consulted first to identify individuals. However, some
*   discoverer designations do not appear in this list, for various reasons,
*   and a supplementary list is provided (wdsrefa.dat").
*Note on Comp:
*   Components, when the object has more than two. The Lick IDS scheme has
*   been discontinued, and components are now referred to by the
*   traditionally employed lower-case letters. The rather awkward upper-case
*   designations, e.g. ABXC, have been changed to the form AB-C, etc. We
*   have noted some confusion on the part of observers and students alike,
*   as to how to designate components in multiple systems. Traditionally,
*   these have been designated in order of separation, thus AB, AC,...., or
*   in the cases where close pairs are observed blended, AB-C, AB-D,.... In
*   some instances, differing resolution limits produce situations where
*   observations are intermixed, thus AC, AB-C, and so forth. (In all too
*   many cases, carelessness on the part of the observer does not permit us
*   to determine with certainty how the observation is to be interpreted).
*   There are also many instances where later observations have revealed a
*   closer companion; these are designated Aa, Bb, etc. In a few cases
*   wider, later discoveries have also been so denoted.
*Note on NumObs:
*   The number of measures of the object. When there are more than 99, the
*   number 99 is used. For smaller numbers of observations, the value in
*   these columns is intended to accurately reflect the actual number.
*Note on pa1 and pa2:
*   Position angles in degrees for the dates listed in columns 24-29. For
*   some pairs, the discoverers have given only crude estimates, such as NF
*   or SP; in such cases these are listed. Position angles are unprecessed
*   in this catalog (i.e. they are for the mean date of observation).
*Note on Sep1 and Sep2:
*   The distances in seconds of arc, and tenths, for the dates listed in
*   columns 24-29. Some separations are treated by the codes found in
*   columns 79-80, or in the Notes. In cases where there has been no
*   appreciable motion observed over the duration of observation, only one
*   position angle and separation is listed.
*Note on Sp:
*   Spectral type of A, or of two components, if space permits. (See
*   "wdscat.doc" for discussion).
*Note on pmRA and pmDE:
*   The components of the proper motion in seconds of arc per 1000 years, in
*   right ascension reduced to great circle, and in declination.
*   Specifically, this catalog lists 15mu(alpha)*cos(delta), where mu(alpha)
*   is in seconds of time, and mu(delta) is in seconds of arc. Both
*   quantities are reduced to a time unit of 1000 years. The exceptions are
*   those objects coded P, Q, and R, for which an explanation is given under
*   the description for Columns 79 and 80. + and - indicate eastward and
*   westward motions in Right Ascension, and + and - those north and south
*   in Declination.
*Note on DM:
*   Durchmusterung number of the object in the system used by the Henry
*   Draper Catalogue: Bonn from +89 degrees to -22 degrees inclusive,
*   Cordoba from -23 degrees to -51 degrees inclusive, Cape Photographic
*   from -52 degrees to -89 degrees inclusive. When a star is not contained
*   in the Durchmusterung proper to its declination zone, but is contained
*   in another Durchmusterung, this is so indicated in the Notes. Other
*   components having different Durchmusterung numbers are also indicated in
*   the Notes ("notesmn.dat").
*Note on note:
*   The following codes are contained in these columns:
*       N: Notes found in the Notes table.
*       O: Orbit. Where motion has exceeded 360 degrees, no
*          values are listed in the position angle and separation
*          columns. Orbits may be found in the "Fourth
*          Catalog of Orbits of Visual Binary Stars" (Worley
*          and Heintz, 1983), and in the Information Circulars
*          published by Commission 26 of the IAU, as well as
*          in the literature.
*       P: 100 year proper motion in right ascension.
*       Q: 100 year proper motion in declination.
*       R: 100 year proper motion in right ascension and
*          declination.
*       a: Pair appears in an appendix list, not part of the
*          discoverer's regular numbering system.
*       r: Pair was listed, but in a "rejected" list, not part
*          of the discoverer's regular numbering sequence.
*       s: Pair has other discoverer's designations and numbers
*          in the literature due to duplicate discovery.
*          We have given credit to the earliest discovery
*          observation (and correct identification) reported
*          in the literature. The List of Synonyms follows the
*          List of Additional Discoverers.
*       p: Coordinates and proper motions from the ACRS, PPM,
*          IRS, and FK5 catalogs.
*       6: Separation given in minutes of arc rather than se-
*          conds.

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

C  Declarations for 'notes.dat'	! Notes to the WDS

      integer*4 nr__1
      parameter (nr__1=8396)	! Number of records
      character*80 ar__1  	! Full-size record

C  J2000 position composed of: RAh RAm DE- DEd DEm
      real*8        RAdeg_1     ! (deg) Right Ascension J2000
      real*8        DEdeg_1     ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     RAh_1       ! (h) *Right Ascension J2000 (hours)
      real*4        RAm         ! (min) *Right Ascension J2000 (minutes)
      character*1   DE__1       ! *Declination J2000 (sign)
      integer*4     DEd_1       ! (deg) *Declination J2000 (degrees)
      integer*4     DEm_1       ! (arcmin) *Declination J2000 (minutes)
      character*8   DiscName_1  ! *Discoverer Code & Number
      character*1   Cont        ! *[+] Continuation flag
      character*56  Text        ! *Text of Note
*Note on RAh, RAm, DE-, DEd, DEm:
*   The positions given represent our best estimates of these values. Where
*   possible, these are based on the ACRS and PPM data, with proper motion
*   incorporated. There may be several lines per system, see Cont
*Note on DiscName:
*   The discoverer, identified by a one-to-three letter code (see wdsref.dat
*   and wdsrefa.dat for the meaning), and the discoverer's number, if
*   assigned. The reference list ("wdsref.dat") should be consulted first to
*   identify individuals. However, some discoverer designations do not
*   appear in this list, for various reasons, and a supplementary list is
*   provided ("wdsrefa.dat").
*Note on Cont:
*   The + indicates that a continuation exists on the next line:
*   only the last line of the comment has this flag set to blank.
*Note on Text:
*   We have extensively revised the Notes to include much more information
*   on orbital motion and multiplicity (including astrometric, photometric,
*   and spectroscopic), variability, composite spectra, etc. In the case
*   where an orbit exists for a pair, we give the period (P) and the
*   semi-major axis (a) in seconds of arc, plus an indication of the
*   direction of motion.

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

C  Declarations for 'notesyns.dat'	! Notes (synonyms) to the WDS

      integer*4 nr__2
      parameter (nr__2=721)	! Number of records
      character*80 ar__2  	! Full-size record

C  J2000 position composed of: RAh RAm DE- DEd DEm
      real*8        RAdeg_2     ! (deg) Right Ascension J2000
      real*8        DEdeg_2     ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     RAh_2       ! (h) *Right Ascension J2000 (hours)
      real*4        RAm_1       ! (min) *Right Ascension J2000 (minutes)
      character*1   DE__2       ! *Declination J2000 (sign)
      integer*4     DEd_2       ! (deg) *Declination J2000 (degrees)
      integer*4     DEm_2       ! (arcmin) *Declination J2000 (minutes)
      character*8   DiscName_2  ! *Discoverer Code & Number
      character*1   Cont_1      ! *[+] Continuation flag
      character*56  Text_1      ! *Text of Note
*Note on RAh, RAm, DE-, DEd, DEm:
*   The positions given represent our best estimates of these values. Where
*   possible, these are based on the ACRS and PPM data, with proper motion
*   incorporated. There may be several lines per system, see Cont
*Note on DiscName:
*   The discoverer, identified by a one-to-three letter code (see wdsref.dat
*   and wdsrefa.dat for the meaning), and the discoverer's number, if
*   assigned. The reference list ("wdsref.dat") should be consulted first to
*   identify individuals. However, some discoverer designations do not
*   appear in this list, for various reasons, and a supplementary list is
*   provided ("wdsrefa.dat").
*Note on Cont:
*   The + indicates that a continuation exists on the next line:
*   only the last line of the comment has this flag set to blank.
*Note on Text:
*   We have extensively revised the Notes to include much more information
*   on orbital motion and multiplicity (including astrometric, photometric,
*   and spectroscopic), variability, composite spectra, etc. In the case
*   where an orbit exists for a pair, we give the period (P) and the
*   semi-major axis (a) in seconds of arc, plus an indication of the
*   direction of motion.

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

C  Declarations for 'refs.dat'	! Discoverer References

      integer*4 nr__3
      parameter (nr__3=2181)	! Number of records
      character*80 ar__3  	! Full-size record

      character*3   Disc        ! Discoverer Code
      integer*4     RefNo       ! Reference number of publication
      character*18  Obs         ! Observer(s)
      character*56  Publ        ! Publication reference for measures

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

C  Declarations for 'disc.dat'	! Discoverer Codes (Additional)

      integer*4 nr__4
      parameter (nr__4=65)	! Number of records
      character*80 ar__4  	! Full-size record

      character*3   Disc_1      ! Discoverer Code
      character*77  Obs_1       ! Observer

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

C  Loading file 'catalog.dat'	! WDS Catalog

C  Format for file interpretation

    1 format(
     +  I2,I3,A1,I2,I2,A7,A5,1X,I3,I3,I2,A3,A3,F5.1,F5.1,F5.2,F5.2,A9,
     +  I4,I4,A8,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,78100
        read(1,'(A84)')ar__
        read(ar__,1)
     +  RAh,RAdm,DE_,DEd,DEm,DiscName,Comp,Date1,Date2,NumObs,pa1,pa2,
     +  Sep1,Sep2,MagA,MagB,Sp,pmRA,pmDE,DM,note
        if(ar__(24:26) .EQ. '') Date1 = iNULL__
        if(ar__(27:29) .EQ. '') Date2 = iNULL__
        if(ar__(30:31) .EQ. '') NumObs = iNULL__
        if(ar__(38:42) .EQ. '') Sep1 = rNULL__
        if(ar__(43:47) .EQ. '') Sep2 = rNULL__
        if(ar__(48:52) .EQ. '') MagA = rNULL__
        if(ar__(53:57) .EQ. '') MagB = rNULL__
        if(ar__(67:70) .EQ. '') pmRA = iNULL__
        if(ar__(71:74) .EQ. '') pmDE = iNULL__
        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(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  RAh,RAdm,DE_,DEd,DEm,DiscName,Comp,Date1,Date2,NumObs,pa1,pa2,
     +  Sep1,Sep2,MagA,MagB,Sp,pmRA,pmDE,DM,note
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Notes to the WDS

C  Format for file interpretation

    2 format(I2,1X,F4.1,1X,A1,I2,1X,I2,1X,A8,A1,A56)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,8396
        read(1,'(A80)')ar__1
        read(ar__1,2)RAh_1,RAm,DE__1,DEd_1,DEm_1,DiscName_1,Cont,Text
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm .GT. -180) RAdeg_1=RAdeg_1+RAm/4.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)RAh_1,RAm,DE__1,DEd_1,DEm_1,DiscName_1,Cont,Text
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notesyns.dat'	! Notes (synonyms) to the WDS

C  Format for file interpretation

    3 format(I2,1X,F4.1,1X,A1,I2,1X,I2,1X,A8,A1,A56)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notesyns.dat')
      write(6,*) '....Loading file: notesyns.dat'
      do i__=1,721
        read(1,'(A80)')ar__2
        read(ar__2,3)
     +  RAh_2,RAm_1,DE__2,DEd_2,DEm_2,DiscName_2,Cont_1,Text_1
        RAdeg_2 = rNULL__
        DEdeg_2 = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2 .GT. -180) RAdeg_2=RAh_2*15.
        if(RAm_1 .GT. -180) RAdeg_2=RAdeg_2+RAm_1/4.
        if(DEd_2 .GE. 0) DEdeg_2=DEd_2
        if(DEm_2 .GE. 0) DEdeg_2=DEdeg_2+DEm_2/60.
        if(DE__2.EQ.'-'.AND.DEdeg_2.GE.0) DEdeg_2=-DEdeg_2
c    ..............Just test output...........
        write(6,3)
     +  RAh_2,RAm_1,DE__2,DEd_2,DEm_2,DiscName_2,Cont_1,Text_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! Discoverer References

C  Format for file interpretation

    4 format(A3,I2,1X,A18,A56)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,2181
        read(1,'(A80)')ar__3
        read(ar__3,4)Disc,RefNo,Obs,Publ
c    ..............Just test output...........
        write(6,4)Disc,RefNo,Obs,Publ
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'disc.dat'	! Discoverer Codes (Additional)

C  Format for file interpretation

    5 format(A3,A77)

C  Effective file loading

      open(unit=1,status='old',file=
     +'disc.dat')
      write(6,*) '....Loading file: disc.dat'
      do i__=1,65
        read(1,'(A80)')ar__4
        read(ar__4,5)Disc_1,Obs_1
c    ..............Just test output...........
        write(6,5)Disc_1,Obs_1
c    .......End.of.Just test output...........
      end do
      close(1)

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