FORTRAN Generation
(/./ftp/cats/J/MNRAS/402/2403)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/402/2403 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-Apr-23
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/402/2403 Australia Telescope 20GHz Survey Catalog, AT20G (Murphy+, 2010)
*================================================================================
*The Australia Telescope 20GHz Survey (AT20G), Version XX October 2009.
*    Murphy T., Sadler E.M., Ekers R.D., Massardi M., Hancock P.J., Mahony E.,
*    Ricci R., Burke-Spolaor S., Calabretta M., Chhetri R., De Zotti G.,
*    Edwards P.G., Ekers J.A., Jackson C.A., Kesteven M.J., Lindley E.,
*    Newton-McGee K., Phillips C., Roberts P., Sault R.J., Staveley-Smith L.,
*    Subrahmanyan R., Walker M.A., Wilson W.E.
*   <Mon. Not. R. Astron. Soc. 402, 2403 (2010)>
*   =2010MNRAS.402.2403M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'at20gcat.dat'	! The AT20G catalogue, version 1.0 (2009-10-15)

      integer*4 nr__
      parameter (nr__=5890)	! Number of records
      character*142 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*14  AT20G       ! IAU designation (JHHMMSS+DDMMSS)
      integer*4     RAh         ! (h) Right Ascension J2000 (hours) (1)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes) (1)
      real*4        RAs         ! (s) Right Ascension J2000 (seconds) (1)
      character*1   DE_         ! Declination J2000 (sign) (2)
      integer*4     DEd         ! (deg) Declination J2000 (degrees) (2)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes) (2)
      real*4        DEs         ! (arcsec) Declination J2000 (seconds) (2)
      integer*4     S20         ! (mJy) ?=- Peak brightness at 20GHz (in mJy/beam) (3)
      integer*4     e_S20       ! (mJy) ?=- Uncertainty on S20
      integer*4     S8          ! (mJy) ?=- Peak brightness at 8GHz (in mJy/beam) (3)
      integer*4     e_S8        ! (mJy) ?=- Uncertainty on S8
      integer*4     S5          ! (mJy) ?=- Peak brightness at 5GHz (in mJy/beam) (3)
      integer*4     e_S5        ! (mJy) ?=- Uncertainty on S5
      character*3   Ep          ! [1-8.] Epochs of observation at 20, 8, 5GHz (4)
      character*1   Q           ! [gp] Quality flag (g=good or p=poor)
      character*3   Flags       ! Other flags (5)
      character*1   l_P20       ! Limit flag on P20
      integer*4     P20         ! (mJy) ?=- Polarized flux density (or limit) at 20GHz
      integer*4     e_P20       ! (mJy) ?=- Uncertainty on P20
      character*1   l_m20       ! Limit flag on m20
      real*4        m20         ! (%) ?=- Fractional polarisation at 20GHz
      integer*4     PA20        ! (deg) [-90/90]?=- Position angle at 20GHz
      character*1   l_P8        ! Limit flag on P8
      integer*4     P8          ! (mJy) ?=- Polarized flux density (or limit) at 8GHz
      integer*4     e_P8        ! (mJy) ?=- Uncertainty on P8
      character*1   l_m8        ! Limit flag on m8
      real*4        m8          ! (%) ?=- Fractional polarisation at 8GHz
      integer*4     PA8         ! (deg) [-90/90]?=- Position angle at 8GHz
      character*1   l_P5        ! Limit flag on P5
      integer*4     P5          ! (mJy) ?=- Polarized flux density (or limit) at 5GHz
      integer*4     e_P5        ! (mJy) ?=- Uncertainty on P5
      character*1   l_m5        ! Limit flag on m5
      real*4        m5          ! (%) ?=- Fractional polarisation at 5GHz
      integer*4     PA5         ! (deg) [-90/90]?=- Position angle at 5GHz
*Note (1): The mean uncertainty in RA is 0.9 arcsec. See Sec 4.1 of the paper.
*Note (2): The mean uncertainty in Dec is 1.0 arcsec. See Sec 4.1 of the paper.
*Note (3): See Sec 3.3.2 for calculation of fluxes for extended sources.
*Note (4): The 3 digits give the epoch code for the 3 frequencies (more
*     details in Table 3 of the paper):
*  ---------------------------------------------------------------------------
*  #  Dec.     Freq1 Freq2  Array  Beam1     Beam2       Dates            Rem.
*     (deg)       (MHz)     Conf.     (arcsec)
*  ---------------------------------------------------------------------------
*  1 -50/-30   18752  21056  H214 10.8x10.8            2004 Oct 21-27     C
*  1 -50/-30    4800   8640  1.5C  8.3x12.8  4.6x7.13  2004 Nov 04-08     O
*  2 -90/-50   18752  21056  H168 13.9x13.9            2005 Oct 27-31     C  
*  2 -90/-50    4800   8640  1.5C  8.3x 8.8  4.6x4.9   2005 Nov 12-15     O
*  3 -90/-30   18752  21056  H214 10.8x10.8            2006 Apr 29-03May  R
*  3 -90/-30    4800   8640  1.5D  8.3x 9.5  4.6x5.3   2006 Jun 19-23     R,O
*  4 -30/-15   18752  21056  H214  2.0x 5.1            2006 Oct 14-17     C  
*  4 -30/-15    4800   8640  1.5B  8.3x21.1  4.6x11.7  2006 Nov 9-12      O  
*  5 -90/-15   18752  21056  H214 10.8x10.8            2007 May 11-16     R  
*  5 -90/-15    4800   8640  1.5C  8.3x21.1  4.6x11.7  2007 May 4-10      R,O
*  6 -90/  0   18752  21056  H214 10.8x10.8            2007 Oct 26-30     C,R
*  7 -15/  0   18752  21056  H75  33.9x33.9            2008 Aug 22-26     R  
*  ---------------------------------------------------------------------------
*  C = follow-up observations at 20GHz,
*  O = observations at 5 and 8GHz
*  R = Repeat previous bad quality observations
*  ---------------------------------------------------------------------------
*Note (5): Possible values for flags as follows:
*      e = extended source
*      h = Galactic HII region,
*      p = Galactic planetary nebula
*      m = Magellanic clouds source,
*      l = no match in low frequency surveys
*      b = large and extended
*      See the paper for more details of these classifications.

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

C  Loading file 'at20gcat.dat'	! The AT20G catalogue, version 1.0 (2009-10-15)

C  Format for file interpretation

    1 format(
     +  5X,A14,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I5,1X,I3,
     +  2X,I4,1X,I3,1X,I5,1X,I3,1X,A3,1X,A1,1X,A3,1X,A1,I4,1X,I2,1X,
     +  A1,F4.1,1X,I3,2X,A1,I3,1X,I2,1X,A1,F5.1,1X,I3,1X,A1,I4,2X,I1,
     +  1X,A1,F5.1,1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'at20gcat.dat')
      write(6,*) '....Loading file: at20gcat.dat'
      do i__=1,5890
        read(1,'(A142)')ar__
        read(ar__,1)
     +  AT20G,RAh,RAm,RAs,DE_,DEd,DEm,DEs,S20,e_S20,S8,e_S8,S5,e_S5,
     +  Ep,Q,Flags,l_P20,P20,e_P20,l_m20,m20,PA20,l_P8,P8,e_P8,l_m8,
     +  m8,PA8,l_P5,P5,e_P5,l_m5,m5,PA5
        if (S20 .EQ. 45) S20 =  iNULL__
        if (e_S20 .EQ. 45) e_S20 =  iNULL__
        if (S8 .EQ. 45) S8 =  iNULL__
        if (e_S8 .EQ. 45) e_S8 =  iNULL__
        if (S5 .EQ. 45) S5 =  iNULL__
        if (e_S5 .EQ. 45) e_S5 =  iNULL__
        if (P20 .EQ. 45) P20 =  iNULL__
        if (e_P20 .EQ. 45) e_P20 =  iNULL__
        if (idig(ar__(95:98)).EQ.0) m20 =  rNULL__
        if (PA20 .EQ. 45) PA20 =  iNULL__
        if (P8 .EQ. 45) P8 =  iNULL__
        if (e_P8 .EQ. 45) e_P8 =  iNULL__
        if (idig(ar__(114:118)).EQ.0) m8 =  rNULL__
        if (PA8 .EQ. 45) PA8 =  iNULL__
        if (P5 .EQ. 45) P5 =  iNULL__
        if (e_P5 .EQ. 45) e_P5 =  iNULL__
        if (idig(ar__(134:138)).EQ.0) m5 =  rNULL__
        if (PA5 .EQ. 45) PA5 =  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)
     +  AT20G,RAh,RAm,RAs,DE_,DEd,DEm,DEs,S20,e_S20,S8,e_S8,S5,e_S5,
     +  Ep,Q,Flags,l_P20,P20,e_P20,l_m20,m20,PA20,l_P8,P8,e_P8,l_m8,
     +  m8,PA8,l_P5,P5,e_P5,l_m5,m5,PA5
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end