Conversion of standardized ReadMe file for
catalog 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.5, on 2013-May-25
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__
ter (rNULL__=-1.e37) ! NULL real number
parameter (iNULL__=-2147483647) ! NULL int number
C=============================================================================
Cat. III/80 Michigan Catalogue of HD stars, Vol.3 (Houk, 1982)
*================================================================================
*Catalogue of two-dimensional spectral types for the HD stars. Vol.3
* Houk N.
* <Ann Arbor, Dept. of Astronomy, Univ. of Michigan (1982)>
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'vol3.dat' ! The Catalogue (vol.3)
integer*4 nr__
parameter (nr__=30314) ! Number of records
character*127 ar__ ! Full-size record
real*8 RA_ (nr__) ! (deg) Right Ascension 1900.0, Epoch=1900.0
real*8 Dec (nr__) ! (deg) Declination 1900.0, Epoch=1900.0
integer*4 HD (nr__) ! Henry Draper Catalog (HD) number
character*1 Case (nr__) ! [*] if sp. type has lower case in printed ver.
character*1 n_SpType (nr__) ! [+] if spectral type is from HD Catalog
character*18 SpType (nr__) ! MK Spectral type
character*1 Aflag (nr__) ! [A] if classification used is an average.
integer*4 q_SpType (nr__) ! [1/4]? Quality of the classification,
* see doc.txt (1=best)
character*5 Remark (nr__) ! Remark (1)
character*6 Ptg (nr__) ! (mag) Photographic magnitude from HD catalog
character*1 Vflag (nr__) ! [V] if star is known or suspected variable
integer*4 RAh (nr__) ! (h) Hours RA, epoch 1900.0
integer*4 RAm (nr__) ! (min) Minutes RA, epoch 1900.0
real*4 RAs (nr__) ! (s) Seconds RA, epoch 1900.0
character*1 uPos (nr__) ! [*] the '*' indicates a position known
* to an arc-minute
character*1 DE_ (nr__) ! Sign Dec, epoch 1900.0
integer*4 DEd (nr__) ! (deg) Degrees Dec, epoch 1900.0
integer*4 DEm (nr__) ! (arcmin) Minutes Dec, epoch 1900.0
integer*4 DEs (nr__) ! (arcsec) [0/60[? Seconds Dec, epoch 1900.0
* (blank if FlagPos is flagged with '*')
integer*4 precRAm (nr__) ! (0.01min/yr) Centennial precession in RA, minutes
real*4 precRAs (nr__) ! (0.01s/yr) Centennial precession in RA, seconds
character*1 FlagPrec (nr__) ! [*] if the centennial precession
* in right ascension is given to 0.1
* minutes/century in the published catalog.
character*1 precDE_ (nr__) ! (0.01arcmin/yr) Centennial precession in Dec, sign
integer*4 precDEm (nr__) ! (0.01arcmin/yr) ? Centennial precession in Dec, minutes
integer*4 precDEs (nr__) ! (0.01arcsec/yr) ? Centennial precession in Dec, seconds
real*4 GLON (nr__) ! (deg) Galactic longitude
real*4 GLAT (nr__) ! (deg) Galactic latitude
character*10 CD (nr__) ! Cordoba Durchmusterung
* identification (CD-ZZNNNNN)
integer*4 SAO (nr__) ! [1/258997]? SAO Catalog number
character*3 Plate1 (nr__) ! Plate code #1 (see file plates3)
character*3 Plate2 (nr__) ! Plate code #2 (see file plates3)
character*3 Plate3 (nr__) ! Plate code #3 (see file plates3)
character*3 Plate4 (nr__) ! Plate code #4 (see file plates3)
*Note (1): Details in the file "doc.txt". The codes used are:
* B = bright star (remark includes HR, Bayer/Flamsteed names)
* L = information from Literature
* R = Remarks related to the spectrum
* D = duplicity (double or multiple star)
* V = variability
* t = spectral type taken from other source (marked with a dagger)
* O = other remarks
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'rem3.dat' ! Remarks to Vol.3
integer*4 nr__1
parameter (nr__1=4837) ! Number of records
character*255 ar__1 ! Full-size record
integer*4 HD_1 (nr__1) ! Henry Draper Catalog (HD) number
character*248 Remark_1 (nr__1) ! Remarks in free form text
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'plates3.dat' ! List of plates
integer*4 nr__2
parameter (nr__2=418) ! Number of records
character*41 ar__2 ! Full-size record
character*3 Code (nr__2) ! Plate code
integer*4 Number (nr__2) ! Plate Number
character*18 Date (nr__2) ! Exposure date
C=============================================================================
C Loading file 'vol3.dat' ! The Catalogue (vol.3)
C Format for file interpretation
1 format(
+ I6,A1,A1,A18,A1,I1,A5,1X,A6,A1,1X,I2,1X,I2,1X,F4.1,A1,A1,I2,
+ 1X,I2,1X,I2,1X,I4,1X,F4.1,A1,A1,I2,1X,I2,1X,F5.1,1X,F5.1,1X,
+ A10,3X,I6,1X,A3,1X,A3,1X,A3,1X,A3)
C Effective file loading
open(unit=1,file='vol3.dat', status='old')
write(6,*) '....Loading file: vol3.dat'
do i__=1,30314
read(1,'(A127)')ar__
read(ar__,1)
+ HD(i__),Case(i__),n_SpType(i__),SpType(i__),Aflag(i__),
+ q_SpType(i__),Remark(i__),Ptg(i__),Vflag(i__),RAh(i__),
+ RAm(i__),RAs(i__),uPos(i__),DE_(i__),DEd(i__),DEm(i__),
+ DEs(i__),precRAm(i__),precRAs(i__),FlagPrec(i__),precDE_(i__),
+ precDEm(i__),precDEs(i__),GLON(i__),GLAT(i__),CD(i__),
+ SAO(i__),Plate1(i__),Plate2(i__),Plate3(i__),Plate4(i__)
if(ar__(28:28) .EQ. '') q_SpType(i__) = iNULL__
if(ar__(61:62) .EQ. '') DEs(i__) = iNULL__
if(ar__(75:76) .EQ. '') precDEm(i__) = iNULL__
if(ar__(78:79) .EQ. '') precDEs(i__) = iNULL__
if(ar__(106:111) .EQ. '') SAO(i__) = iNULL__
c Derive coordinates RA_ and Dec from input data
c (RA_ and Dec are set to rNULL_ when unknown)
RA_(i__) = RAh(i__)
if(RAh(i__) .GE. 0) RA_(i__)=RAh(i__)*15.
if(RAm(i__) .GE. 0) RA_(i__)=RA_(i__)+RAm(i__)/4.
if(RAs(i__) .GE. 0) RA_(i__)=RA_(i__)+RAs(i__)/240.
Dec(i__) = DEd(i__)
if(DEm(i__) .GE. 0) Dec(i__)=Dec(i__)+DEm(i__)/60.
if(DEs(i__) .GE. 0) Dec(i__)=Dec(i__)+DEs(i__)/3600.
if(DE_(i__).EQ.'-'.AND.Dec(i__).GE.0) Dec(i__)=-Dec(i__)
c ..............Just test output...........
write(6,1)
+ HD(i__),Case(i__),n_SpType(i__),SpType(i__),Aflag(i__),
+ q_SpType(i__),Remark(i__),Ptg(i__),Vflag(i__),RAh(i__),
+ RAm(i__),RAs(i__),uPos(i__),DE_(i__),DEd(i__),DEm(i__),
+ DEs(i__),precRAm(i__),precRAs(i__),FlagPrec(i__),precDE_(i__),
+ precDEm(i__),precDEs(i__),GLON(i__),GLAT(i__),CD(i__),
+ SAO(i__),Plate1(i__),Plate2(i__),Plate3(i__),Plate4(i__)
write(6,'(6H Pos: 2F8.4)') RA_(i__),Dec(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'rem3.dat' ! Remarks to Vol.3
C Format for file interpretation
2 format(I6,1X,A248)
C Effective file loading
open(unit=1,file='rem3.dat', status='old')
write(6,*) '....Loading file: rem3.dat'
do i__=1,4837
read(1,'(A255)')ar__1
read(ar__1,2)HD_1(i__),Remark_1(i__)
c ..............Just test output...........
write(6,2)HD_1(i__),Remark_1(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'plates3.dat' ! List of plates
C Format for file interpretation
3 format(A3,3X,I5,3X,A18)
C Effective file loading
open(unit=1,file='plates3.dat', status='old')
write(6,*) '....Loading file: plates3.dat'
do i__=1,418
read(1,'(A41)')ar__2
read(ar__2,3)Code(i__),Number(i__),Date(i__)
c ..............Just test output...........
write(6,3)Code(i__),Number(i__),Date(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end