FORTRAN Generation
(/./ftp/cats/J/MNRAS/296/839)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/296/839 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-Oct-08
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. J/MNRAS/296/839    Phoenix Deep Survey: 1.4-GHz source counts  (Hopkins+, 1998)
*================================================================================
*The Phoenix Deep Survey: 1.4-GHz source counts
*    Hopkins A.M., Mobasher, B. Cram, L., Rowan-Robinson, M.
*   <Mon. Not. R. Astron. Soc. 296, 839 (1998)>
*   =1998MNRAS.296..839H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'pdf.dat'	! Phoenix Deep Field Data

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

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

      integer*4     Num        (nr__) ! *Catalogue number
      integer*4     RAh        (nr__) ! (h) 1.4 GHz right ascension J2000.0
      integer*4     RAm        (nr__) ! (min) 1.4 GHz right ascension J2000.0
      real*4        RAs        (nr__) ! (s) 1.4 GHz right ascension J2000.0
      character*1   DE_        (nr__) ! 1.4 GHz declination sign J2000.0
      integer*4     DEd        (nr__) ! (deg) 1.4 GHz declination (degrees) J2000.0
      integer*4     DEm        (nr__) ! (arcmin) 1.4 GHz declination (minutes) J2000.0
      real*4        DEs        (nr__) ! (arcsec) 1.4 GHz declination (seconds) J2000.0
      real*4        Bmaj       (nr__) ! (arcsec) *Major axes of the radio source
      real*4        Bmin       (nr__) ! (arcsec) *Minor axes of the radio source
      real*4        Pa         (nr__) ! (arcsec) *Position angle of the radio source
      real*8        Rflux      (nr__) ! (mJy) 1.4GHz Radio source flux density
      integer*4     RArh       (nr__) ! (h) *? R-band Right ascension J2000.0
      integer*4     RArm       (nr__) ! (min) *? R-band Right ascension J2000.0
      real*4        RArs       (nr__) ! (s) *? R-band Right ascension J2000.0
      character*1   DEr_       (nr__) ! *? R-band Declination sign J2000.0
      integer*4     DErd       (nr__) ! (deg) *? R-band Declination (degrees) J2000.0
      integer*4     DErm       (nr__) ! (arcmin) *? R-band Declination (minutes) J2000.0
      real*4        DErs       (nr__) ! (arcsec) *? R-band Declination (seconds) J2000.0
      real*4        Rmag       (nr__) ! (mag) *? R magnitude
      real*4        Vmag       (nr__) ! (mag) *? V magnitude
      real*4        Bmag       (nr__) ! (mag) *? B magnitude
      real*4        Hmag       (nr__) ! (mag) *? H magnitude
      real*4        Kmag       (nr__) ! (mag) *? K magnitude
      character*1   F2C        (nr__) ! * [sgf] Focas2 Class
      real*4        Frac       (nr__) ! ? Fractional chance that the optical
*                                    counterpart has been mis-identified
      real*4        Dist       (nr__) ! (arcsec) ? Distance between the radio and optical
*                                    source positions
      real*4        z          (nr__) ! *? Redshift
      integer*4     q_z        (nr__) ! *? [123] Reliability of the redshift
      character*2   SpClass    (nr__) ! *Spectral class
      integer*4     Field      (nr__) ! * [123] where the source was identified
*Note on Num: Objects are numbered in order of increasing 1.4 GHz right
*   ascension.
*Note on Bmaj, Bmin, Pa: (convolved with the beam size - which is about 8x10
*   arcsec (in the RAxDec sense) for objects from field 1 (see "field" below)
*   and about 5.5x6.5 arcsec for others).
*Note on RArh, RArm, RArs, DEr-, DErd, DErm, DErs: Position of the optical
*   counterpart to the radio source, again in J2000.
*Note on Rmag, Vmag, Bmag, Hmag, Kmag: The apparent brightness in the
*   respective optical or near-infrared wavelength band. The B-band magnitudes
*   come from the COSMOS database, the rest from observations made specifically
*   for this survey.
*Note on F2C:
*   s= object has been identified as a star
*   g= galaxy
*   f= too faint to be distinguished by the classifier
*Note on z: The spectrally identified (geocentric) redshift of the optical
*   galaxy. accuracy +-0.001
*Note on q_z: Based on the quality of detected lines in the spectrum.
*   1: indicates very reliable (redshift based on two or more well-identified
*      lines)
*   2: indicates less reliable (redshift based on one line only, or on two less
*       certain lines)
*   3: indicates unreliable (redshift based on lines or features which are
*      uncertain)
*Note on SpClass: This is simply to distinguish between starburst and
*   AGN type galaxies.
*    Class A: Blue continuum with strong emission lines
*   Class AB: H-alpha present but H-beta only in noise, weaker emission line
*             objects
*   Class B: Red continuum, moderate to strong H-alpha
*   Class C: Red continuum, absorption lines only
*   Class D: QSO (Broad emission line object at high redshift)
*Note on Field:
*   1: the 2 degree diameter mosaic (PDF)
*   2: the smaller, deeper observations (PDFS) only
*   3: in both

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

C  Loading file 'pdf.dat'	! Phoenix Deep Field Data

C  Format for file interpretation

    1 format(
     +  I4,1X,I2,I2,F6.3,1X,A1,I2,I2,F5.2,1X,F4.1,1X,F4.1,1X,F5.1,1X,
     +  F7.3,1X,I2,I2,F5.2,1X,A1,I2,I2,F4.1,1X,F6.3,1X,F6.3,1X,F5.2,
     +  1X,F4.1,1X,F6.3,1X,A1,1X,F5.3,1X,F5.3,1X,F5.3,1X,I1,1X,A2,1X,
     +  I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'pdf.dat')
      write(6,*) '....Loading file: pdf.dat'
      do i__=1,1079
        read(1,'(A129)')ar__
        read(ar__,1)
     +  Num(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bmaj(i__),Bmin(i__),Pa(i__),Rflux(i__),
     +  RArh(i__),RArm(i__),RArs(i__),DEr_(i__),DErd(i__),DErm(i__),
     +  DErs(i__),Rmag(i__),Vmag(i__),Bmag(i__),Hmag(i__),Kmag(i__),
     +  F2C(i__),Frac(i__),Dist(i__),z(i__),q_z(i__),SpClass(i__),
     +  Field(i__)
        if(ar__(52:53) .EQ. '') RArh(i__) = iNULL__
        if(ar__(54:55) .EQ. '') RArm(i__) = iNULL__
        if(ar__(56:60) .EQ. '') RArs(i__) = rNULL__
        if(ar__(63:64) .EQ. '') DErd(i__) = iNULL__
        if(ar__(65:66) .EQ. '') DErm(i__) = iNULL__
        if(ar__(67:70) .EQ. '') DErs(i__) = rNULL__
        if(ar__(72:77) .EQ. '') Rmag(i__) = rNULL__
        if(ar__(79:84) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(86:90) .EQ. '') Bmag(i__) = rNULL__
        if(ar__(92:95) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(97:102) .EQ. '') Kmag(i__) = rNULL__
        if(ar__(106:110) .EQ. '') Frac(i__) = rNULL__
        if(ar__(112:116) .EQ. '') Dist(i__) = rNULL__
        if(ar__(118:122) .EQ. '') z(i__) = rNULL__
        if(ar__(124:124) .EQ. '') q_z(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)
     +  Num(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bmaj(i__),Bmin(i__),Pa(i__),Rflux(i__),
     +  RArh(i__),RArm(i__),RArs(i__),DEr_(i__),DErd(i__),DErm(i__),
     +  DErs(i__),Rmag(i__),Vmag(i__),Bmag(i__),Hmag(i__),Kmag(i__),
     +  F2C(i__),Frac(i__),Dist(i__),z(i__),q_z(i__),SpClass(i__),
     +  Field(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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