CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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-Apr-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__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. III/143     Spectrophotometry of Wolf-Rayet Stars     (Torres-Dodgen+ 1988)
*================================================================================
*Spectrophotometry of Wolf-Rayet Stars
*    Torres-Dodgen A.V., Massey P.
*   <Astron. J., 96, 1076 (1988)>
*   =1988AJ.....96.1076T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Summary of stars, spectra and photometry

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

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

      character*5   Star        ! *Star name
      character*1   Note        ! *[a-f] Note flag
      character*10  OtherName   ! Alternate designation
      integer*4     RAh         ! (h) Right Ascension J2000 (hours)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) Right Ascension J2000 (seconds)
      character*1   DE_         ! Declination J2000 (sign)
      integer*4     DEd         ! (deg) Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs         ! (arcsec) ? Declination J2000 (seconds)
      character*10  SpType      ! Spectral classification
      real*4        vmag        ! (mag) *? v SIT photometry
      character*1   u_vmag      ! [:v] Uncertaintly / variability flag
      character*1   n_vmag      ! [*] The * means that b is given instead of v
      real*4        u_b         ! (mag) *? u-b SIT color
      character*1   u_u_b       ! Uncertainty flag (:) on u-b
      real*4        b_v         ! (mag) *? b-v SIT color
      character*1   u_b_v       ! Uncertainty flag (:) on b-v
      real*4        v_r         ! (mag) *? v-r SIT color
      character*1   u_v_r       ! [:*] Uncertaintly / b-r flag
      integer*4     Qual        ! *[1,4]? Quality index
      real*4        D_v         ! (mag) ? Comparison to published v
      character*1   f_D_v       ! [*] The * means that b is given instead of v
      real*4        D_u_b       ! (mag) ? Comparison to published u-b
      real*4        D_b_v       ! (mag) ? Comparison to published b-v
      integer*4     Ref         ! *[1,6]? Reference of published photometry
      character*11  spFile      ! *Spectrum file (in subdirectory "sp")
      real*8        lam0        ! (0.1nm) *? Lower wavelength in spFile
      real*8        Dlam        ! (0.1nm) *? Wavelength step
      integer*4     Np          ! *? Number of points in spectrum
*Note on Star:
*   - The WR number is from the catalogue by van der Hucht et al.
*     (1981SSRv...28..227V, Cat. <III/85>)
*   - The BR number is from the catalogue by Breysacher (1981A&AS...43..203B)
*   - The AB number is from Azzopardi and Breysacher (1979A&A....75..120A)
*     for stars in the Small Magellanic Cloud.
*Note on Note:
*   a Lundstroem and Stenholm (1979A&AS...35..303L) quote that the b
*     magnitude of WR30 in Smith's paper (1968MNRAS.140..409S) should
*     read 12.00, not 13.00
*   b Includes visual companion, thus we give +ABS
*   c Variable star (Stahl et al. 1984A&A...140..459S)
*   d WR star discovered by Conti and Garmany (1983PASP...95..411C)
*   e Close visual binary
*   f Observations taken at air masses > 1.5
*Note on vmag, u-b, b-v, v-r:
*   The uvbr filters have central wavelengths and FWHM in nm:
*   u: 365 (10)
*   b: 427 ( 7)
*   v: 516 (13)
*   r: 600 (10)
*Note on Qual: this index takes the values:
*   1 = "best" data (absolute errors < 10%)
*   2 = only one photometric observation
*   3 = no photometric observation available, magnitudes can be wrong
*         by up to 2 mag, but colors are still of use.
*   4 = suspected variability
*Note on Ref: the references are:
*   1 = Smith 1968MNRAS.140..409S
*   2 = Lundstroem and Stenholm (1979A&AS...35..303L)
*   3 = IRS data from Massey 1984ApJ...281..789M
*   4 = Lundstroem and Stenholm 1984A&AS...58..163L
*   5 = Massey and Conti 1983ApJ...264..126M
*   6 = Westerlund 1966ApJ...145..724W
*Note on spFile, lam0, Dlam, Np:
*  These values are present with the spectrum is exists (in subdirectory "sp").
*  Each spectrum contains the wavelength and the flux in 2 columns as
*  described below in the "Description of sp/* files" section

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

C  Loading file 'table1.dat'	! Summary of stars, spectra and photometry

C  Format for file interpretation

    1 format(
     +  1X,A5,2X,A1,1X,A10,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,
     +  3X,A10,2X,F5.2,A1,A1,1X,F5.2,A1,1X,F5.2,A1,1X,F5.2,A1,1X,I1,
     +  4X,F5.2,A1,1X,F5.2,2X,F5.2,2X,I1,1X,A11,1X,F9.4,3X,F8.6,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,191
        read(1,'(A150)')ar__
        read(ar__,1)
     +  Star,Note,OtherName,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,vmag,
     +  u_vmag,n_vmag,u_b,u_u_b,b_v,u_b_v,v_r,u_v_r,Qual,D_v,f_D_v,
     +  D_u_b,D_b_v,Ref,spFile,lam0,Dlam,Np
        if(ar__(40:41) .EQ. '') DEs = iNULL__
        if(ar__(57:61) .EQ. '') vmag = rNULL__
        if(ar__(65:69) .EQ. '') u_b = rNULL__
        if(ar__(72:76) .EQ. '') b_v = rNULL__
        if(ar__(79:83) .EQ. '') v_r = rNULL__
        if(ar__(86:86) .EQ. '') Qual = iNULL__
        if(ar__(91:95) .EQ. '') D_v = rNULL__
        if(ar__(98:102) .EQ. '') D_u_b = rNULL__
        if(ar__(105:109) .EQ. '') D_b_v = rNULL__
        if(ar__(112:112) .EQ. '') Ref = iNULL__
        if(ar__(126:134) .EQ. '') lam0 = rNULL__
        if(ar__(138:145) .EQ. '') Dlam = rNULL__
        if(ar__(147:150) .EQ. '') Np = 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(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  Star,Note,OtherName,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,vmag,
     +  u_vmag,n_vmag,u_b,u_u_b,b_v,u_b_v,v_r,u_v_r,Qual,D_v,f_D_v,
     +  D_u_b,D_b_v,Ref,spFile,lam0,Dlam,Np
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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