Conversion of standardized ReadMe file for
file /./ftp/cats/I/107A 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 2026-Oct-07
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/107A Washington Double Star Catalog (WDS) (Worley+ 1984)
*================================================================================
*The Washington Double Star Catalog
* Worley C.E., Douglass G.G.: 1984
* <US Naval Obs., unpublished (1984)>
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'wds' ! The catalogue
integer*4 nr__
parameter (nr__=73610) ! Number of records
character*86 ar__ ! Full-size record
C 1900.0 position composed of: RAh DE- DEd DEm
real*8 RAdeg ! (deg) Right Ascension 1900.0
real*8 DEdeg ! (deg) Declination 1900.0
C ---------------------------------- ! (position vector(s) in degrees)
integer*4 RAh ! (h) Hours RA, equinox 1900.0
integer*4 RAdm ! (0.1min) Minutes RA, equinox 1900.0
integer*4 RAdm2000 ! (0.1min) ? Minutes RA, equinox 2000.0 (1)
character*1 DE_ ! Sign Dec, equinox 1900.0
integer*4 DEd ! (deg) Degrees Dec, equinox 1900.0
integer*4 DEm ! (arcmin) [0/99] Minutes Dec, equinox 1900.0
integer*4 DEm2000 ! (arcmin) [0/99] Minutes Dec, equinox 2000.0 (1)
character*7 Disc ! Discoverer code and reference number
* (See "doc.ori" for codes)
character*5 Comp ! Component identification, when the object
* has more than two. (2)
integer*4 Date1 ! (a) []? Date of the first satisfactory
* observation
integer*4 Date2 ! (a) []? Date of the last satisfactory
* observation
integer*4 NumObs ! []? Number of measures of the object;
* when there are more than 99 measures,
* the number 99 is used
character*3 PosAng1 ! (deg) Position angle for Date1 (3)
character*3 PosAng2 ! (deg) Position angle for Date2
real*4 Sep1 ! (arcsec) []? Angular separation for Date1 (4)
real*4 Sep2 ! (arcsec) []? Angular separation for Date2
real*4 Mag1 ! (mag) []? Magnitude of component 1
real*4 Mag2 ! (mag) []? Magnitude of component 2
character*2 Sp1 ! Spectral Type of component 1
character*2 Sp2 ! Spectral Type of component 2
character*1 n_pmRA ! [EW] Proper Motion Code 'E' (east, positive)
* or 'W' (west, negative)
integer*4 pmRA ! (mas/a) []? Proper motion in right ascension (5)
character*1 n_pmDE ! Proper Motion Code 'N' (north, positive)
* or 'S' (south, negative)
integer*4 pmDE ! (mas/a) []? Proper motion in declination (5)
character*8 DM ! Durchmusterung catalog number, SZZNNNNN (6)
integer*4 ADS ! [1/17180]? ADS (Aitken's Double Star)
* designation
character*2 Code ! [DNOPQR12346] Code (7)
*Note (1): The 2000-epoch positions have nothing to do with the "J2000" system.
*Note (2): The Lick IDS scheme has been continued, so that components
* referred to in earlier catalogs by small letters, a, b, etc.
* become upper case P, Q, etc. Thus, Aa becomes AP, Bb becomes BQ, etc.
*Note (3): Position angle in degrees for Date1. 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
* (i.e. they are for the mean date of observation.)
*Note (4): Separations greater than 99.9 seconds of arc are treated
* by the codes (bytes 79-80), or in the notes. In cases where no
* appreciable motion was observed over the duration of observation,
* only PosAng1 and Sep1 are given.
*Note (5): Units are seconds of arc per 1000 years unless the Code field
* is 'P' or 'R'. In these cases, the units are seconds of arc per
* 100 years.
*Note (6): The Durchmusterung number is based on the system used by the
* Henry Draper Catalog: +89 >= BD >= -22; -23 >= CD >= -51;
* -52 >= CP >= -89. When a star does not follow these standards,
* it is indicated in the notes.
*Note (7): The notes have the following meaning (see also "doc.ori" file):
* D: Declination sign change. (Across equator).
* 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 fields.
* 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.
* 1: One hundred seconds to be added to the separation.
* 2: Two hundred seconds to be added to the separation.
* 3: Three hundred seconds to be added to the separation.
* 4: Four hundred seconds to be added to the separation.
* 6: Separation given in minutes of arc rather than seconds.
* There are also a few non-explained codes:
* S (record 6838)
* 7 (record 13287)
* M (record 73490)
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'notes' ! Notes to the catalogue
integer*4 nr__1
parameter (nr__1=7766) ! Number of records
character*80 ar__1 ! Full-size record
integer*4 RAh_1 ! (h) []? Hours RA, epoch 1900.0
* (blank for continuation)
real*4 RAm ! (min) []? Minutes RA, epoch 1900.0
character*9 Name ! Name
character*63 Note ! Text of note
C=============================================================================
C Loading file 'wds' ! The catalogue
C Format for file interpretation
1 format(
+ I2,I3,I3,A1,I2,I2,I2,A7,A5,I4,I4,I2,A3,A3,F4.1,F4.1,F4.1,F4.1,
+ A2,A2,A1,I3,A1,I3,A8,I5,A2)
C Effective file loading
open(unit=1,status='old',file=
+'wds')
write(6,*) '....Loading file: wds'
do i__=1,73610
read(1,'(A86)')ar__
read(ar__,1)
+ RAh,RAdm,RAdm2000,DE_,DEd,DEm,DEm2000,Disc,Comp,Date1,Date2,
+ NumObs,PosAng1,PosAng2,Sep1,Sep2,Mag1,Mag2,Sp1,Sp2,n_pmRA,
+ pmRA,n_pmDE,pmDE,DM,ADS,Code
if(ar__(6:8) .EQ. '') RAdm2000 = iNULL__
if(ar__(28:31) .EQ. '') Date1 = iNULL__
if(ar__(32:35) .EQ. '') Date2 = iNULL__
if(ar__(36:37) .EQ. '') NumObs = iNULL__
if(ar__(44:47) .EQ. '') Sep1 = rNULL__
if(ar__(48:51) .EQ. '') Sep2 = rNULL__
if(ar__(52:55) .EQ. '') Mag1 = rNULL__
if(ar__(56:59) .EQ. '') Mag2 = rNULL__
if(ar__(65:67) .EQ. '') pmRA = iNULL__
if(ar__(69:71) .EQ. '') pmDE = iNULL__
if(ar__(80:84) .EQ. '') ADS = 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,RAdm2000,DE_,DEd,DEm,DEm2000,Disc,Comp,Date1,Date2,
+ NumObs,PosAng1,PosAng2,Sep1,Sep2,Mag1,Mag2,Sp1,Sp2,n_pmRA,
+ pmRA,n_pmDE,pmDE,DM,ADS,Code
write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'notes' ! Notes to the catalogue
C Format for file interpretation
2 format(I2,1X,F4.1,1X,A9,A63)
C Effective file loading
open(unit=1,status='old',file=
+'notes')
write(6,*) '....Loading file: notes'
do i__=1,7766
read(1,'(A80)')ar__1
read(ar__1,2)RAh_1,RAm,Name,Note
if(ar__1(1:2) .EQ. '') RAh_1 = iNULL__
if(ar__1(4:7) .EQ. '') RAm = rNULL__
c ..............Just test output...........
write(6,2)RAh_1,RAm,Name,Note
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end