FORTRAN Generation
(/./ftp/cats/VIII/5)

Conversion of standardized ReadMe file for file /./ftp/cats/VIII/5 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 2026-Sep-12
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. VIII/5        Bright Extragalactic Radio Sources  (1Jy)          (Kuehr+, 1981)
*================================================================================
*Catalog of Extragalactic Radio Sources Having Flux Densities greater
*than 1 Jy at 5 GHz
*    Kuehr H., Witzel A., Pauliny-Toth I.I.K., Nauber U.
*   <Astron. Astrophys. Suppl. 45, 367 (1981)>
*   =1981A&AS...45..367K
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'sources.dat'	! List of the 518 sources of the sample

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

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

      character*8   v1Jy       (nr__) ! *Source name
      character*7   v3C        (nr__) ! *3C name
      integer*4     RAh        (nr__) ! (h) Right Ascension (RA) (1950.0) hours
      integer*4     RAm        (nr__) ! (min) RA (1950.0) minutes
      real*4        RAs        (nr__) ! (s) RA (1950.0) seconds
      real*4        e_RAs      (nr__) ! (s) Error in RA
      character*1   DE_        (nr__) ! Declination sign
      integer*4     DEd        (nr__) ! (deg) Declination (DE) sign
      integer*4     DEm        (nr__) ! (arcmin) DE minutes
      real*4        DEs        (nr__) ! (arcsec) DE seconds
      real*4        e_DEs      (nr__) ! (arcsec) Error in DE
      character*2   PosRef     (nr__) ! *Position reference
      real*4        GLAT       (nr__) ! (deg) Galactic latitude
      character*3   Class      (nr__) ! *Object class
      real*4        Vmag       (nr__) ! (mag) *?Visual magnitude
      real*4        z          (nr__) ! *?Redshift
      real*4        alpha      (nr__) ! *?Spectral index
      real*4        e_alpha    (nr__) ! ?Mean error on alpha
      character*3   Fct        (nr__) ! *Function type
      real*8        A          (nr__) ! *?Coefficient A
      real*4        e_A        (nr__) ! ?A error
      real*4        B          (nr__) ! *?Coefficient B
      real*4        e_B        (nr__) ! ?B error
      real*8        C          (nr__) ! *?Coefficient C
      real*4        e_C        (nr__) ! ?C error
      integer*4     D          (nr__) ! *?Coefficient D
*Note on 1Jy:
*    The 1Jy contains sources from the combined NRAO-MPI 5 GHz Strong
*    Source Survey and Parkes 2.7 GHz Surveys. This is a coordinate-based
*    naming system.
*Note on 3C:
*    If the object was listed in the 3rd Cambridge Radio Catalog (Bennett
*    1961; 3C), then the full 3C designation is here. If not, then this
*    field is blank. (see e.g. 3CR Catalog <VIII/1>)
*Note on PosRef:
*    The positions listed for the object come either from
*    radio-interferometry measurements (usually) or from the original
*    surveys (occasionally). This two-letter code indicates the source of
*    the coordinates and corresponds to those listed in the Appendix.
*Note on Class:
*    If the object has been optically identified, this gives the class of
*    the object as a three character code as described in the following.
*    If it has not, this field is blank.
*       QSO = Quasar
*       GAL = Radio galaxy
*       BL  = BL Lacertae object
*       EF  = Empty field
*       CF  = Confused field (i.e., more than one object in the field)
*Note on Vmag and z:
*    From Veron and Veron (1979) and Kuehr (1980).
*Note on alpha:
*    The two point spectral index . . . as determined between 2700 MHz and
*    5000 MHz. The spectral index is defined as alpha in
*    S(v) {prop.to} v^alpha^.
*Note on Fct, A, B, C, D:
*    For sources with flux density measurements at more than three
*    frequencies, an attempt was made to fit a simple analytic function to
*    the spectrum. This field contains one of four values depending on the
*    result of this fit:
*   LIN = The spectrum was successfully fitted by a straight line of
*      the form     log(S) = A + B.log(v)
*      In this case, coefficients C and D are blank.
*   EXP = The spectrum was fitted by a function of the type
*      log(S) = A + B.log(v) + C.exp(D.log(v)).
*      All four coefficient fields contain data.
*   CPX = Although there were sufficient data points for the source (i.e.,
*     more than three) the spectrum could not be satisfactorily fitted with
*     either of the above functional forms. Such a spectrum was designated
*     complex because it would not be physically meaningful to devise some
*     general analytic form to fit any spectral measurements (i.e. of
*     variable sources whose spectra are generally complex). All four
*     coefficient fields are blank.
*   N<4 = There were data for no more than three frequencies and
*      consequently no fit was attempted. All coefficient fields
*      are blank.

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

C  Declarations for 'fluxes.dat'	! The flux data for the sources

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

      character*8   v1Jy_1     (nr__1) ! Source name
      integer*4     Freq       (nr__1) ! (MHz) Frequency
      real*8        S          (nr__1) ! (Jy) *Flux density
      real*8        e_S        (nr__1) ! (Jy) *Flux density error
      integer*4     r_S        (nr__1) ! *[1/909]? Reference number
      character*1   RefSuf     (nr__1) ! [AB] Reference suffix
*Note on S:
*    All flux densities given are on the scale of Baars et al. based on the
*    absolute radio spectrum of Cassiopeia A (1977A&A....61...99B): between
*    0.3 and 30 GHz it is given by a flux density
*    S(1GHz) = 2723Jy and a spectral index
*      alpha = -0.770 (epoch 1980.0).
*    See Kuehr et al. (1981A&AS...45..367K) for a discussion of the details
*    of the selection and compilation of flux densities. See also refs.dat
*Note on e_S:
*    Flux density errors were either taken directly from the catalogue or
*    were calculated according to the formulae given there.
*Note on r_S, RefSuf:
*    This is the code number for the radio source catalog from which the
*    particular flux density measurement came. refs.dat contains the radio
*    source catalogs used and their attributes, sorted by code number. In
*    one case the original catalog listed no source catalog and this field
*    is blank. One source catalog code number (number 94) has three
*    distinct catalogs associated with it, which are differentiated by
*    , A, or B in the RefSuf field. In all other cases this field is blank.
*    Note that RefNum values between 212 and 258 are unexplained.

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     RefNum     (nr__2) ! *[1/910]+=? Reference Number
      character*1   RefSuf_1   (nr__2) ! *[AB*] Reference Suffix
      real*8        Freq_1     (nr__2) ! (MHz) ? Frequency
      real*4        Factor     (nr__2) ! *? Conversion factor
      real*4        FluxLim    (nr__2) ! (Jy) *? Flux density limit
      character*4   Name1      (nr__2) ! *Name 1
      character*4   Name2      (nr__2) ! *Name 2
      character*93  Text       (nr__2) ! *Text of the reference
*Note on RefNum, RefSuf:
*    The code numbers appearing in the flux density data records. The file
*    is sorted on this datum. In four cases this field is blank, but the
*    suffix RefSuf contains an asterisk. This indicates a source catalog
*    not directly referenced in any flux density measurement, but which the
*    authors included in the Radio Source Catalogues list of the original
*    paper. They are included here for completeness and are the first four
*    source catalogs listed in this file. Code numbers 901-910 correspond
*    to unpublished flux densities. One code number (RefNum=94) has three
*    distinct source catalogs associated with it, which are differentiated
*    by , A, or B in this field.
*    An asterisk in the RefNum field indicates that the source catalog
*    cited was not directly referenced in any flux density measurement,
*    but was listed in the original paper as a source catalog.
*    Note that RefNum values between 212 and 258 are unexplained.
*Note on Factor:
*    This field gives the factor used to convert the flux densities in the
*    catalog to the scale used (Baars et al., 1977A&A....61...99B). It is a
*    ratio of the Baars et al. flux density scale to that of the source
*    catalog at the frequency specified.
*Note on FluxLim:
*    Before the data from a given source catalog were included in this
*    compilation the values were checked against data on individual sources
*    from all other catalogs to determine reliability. If there was a
*    cut-off for inclusion from a specific catalog, that value is listed
*    here.
*Note on Name1, Name2:
*    If the catalog has a common designation (3C, PKS, etc.), it is listed
*    here.
*Note on Text:
*   The original paper or papers in which the catalog appeared. There are a
*   maximum of three references for a single catalog.

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

C  Loading file 'sources.dat'	! List of the 518 sources of the sample

C  Format for file interpretation

    1 format(
     +  A8,1X,A7,1X,I2,I2,F5.2,F5.2,1X,A1,I2,I2,F4.1,F5.1,1X,A2,F6.1,
     +  1X,A3,F5.1,F6.3,F6.2,F4.2,1X,A3,F7.2,F6.2,F6.2,F4.2,F8.2,F6.2,
     +  I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'sources.dat')
      write(6,*) '....Loading file: sources.dat'
      do i__=1,518
        read(1,'(A124)')ar__
        read(ar__,1)
     +  v1Jy(i__),v3C(i__),RAh(i__),RAm(i__),RAs(i__),e_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),PosRef(i__),
     +  GLAT(i__),Class(i__),Vmag(i__),z(i__),alpha(i__),e_alpha(i__),
     +  Fct(i__),A(i__),e_A(i__),B(i__),e_B(i__),C(i__),e_C(i__),
     +  D(i__)
        if(ar__(60:64) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(65:70) .EQ. '') z(i__) = rNULL__
        if(ar__(71:76) .EQ. '') alpha(i__) = rNULL__
        if(ar__(77:80) .EQ. '') e_alpha(i__) = rNULL__
        if(ar__(85:91) .EQ. '') A(i__) = rNULL__
        if(ar__(92:97) .EQ. '') e_A(i__) = rNULL__
        if(ar__(98:103) .EQ. '') B(i__) = rNULL__
        if(ar__(104:107) .EQ. '') e_B(i__) = rNULL__
        if(ar__(108:115) .EQ. '') C(i__) = rNULL__
        if(ar__(116:121) .EQ. '') e_C(i__) = rNULL__
        if(ar__(122:124) .EQ. '') D(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(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  v1Jy(i__),v3C(i__),RAh(i__),RAm(i__),RAs(i__),e_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),PosRef(i__),
     +  GLAT(i__),Class(i__),Vmag(i__),z(i__),alpha(i__),e_alpha(i__),
     +  Fct(i__),A(i__),e_A(i__),B(i__),e_B(i__),C(i__),e_C(i__),
     +  D(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'fluxes.dat'	! The flux data for the sources

C  Format for file interpretation

    2 format(A8,1X,I5,1X,F8.2,F8.2,1X,I3,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'fluxes.dat')
      write(6,*) '....Loading file: fluxes.dat'
      do i__=1,8566
        read(1,'(A36)')ar__1
        read(ar__1,2)
     +  v1Jy_1(i__),Freq(i__),S(i__),e_S(i__),r_S(i__),RefSuf(i__)
        if(ar__1(33:35) .EQ. '') r_S(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  v1Jy_1(i__),Freq(i__),S(i__),e_S(i__),r_S(i__),RefSuf(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    3 format(I3,A1,F7.1,F6.3,F5.1,1X,A4,1X,A4,1X,A93)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,187
        read(1,'(A126)')ar__2
        read(ar__2,3)
     +  RefNum(i__),RefSuf_1(i__),Freq_1(i__),Factor(i__),
     +  FluxLim(i__),Name1(i__),Name2(i__),Text(i__)
        if(ar__2(1:3) .EQ. '') RefNum(i__) = iNULL__
        if(ar__2(5:11) .EQ. '') Freq_1(i__) = rNULL__
        if(ar__2(12:17) .EQ. '') Factor(i__) = rNULL__
        if(ar__2(18:22) .EQ. '') FluxLim(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  RefNum(i__),RefSuf_1(i__),Freq_1(i__),Factor(i__),
     +  FluxLim(i__),Name1(i__),Name2(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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