FORTRAN Generation
(/./ftp/cats/J/A_A/453/1003)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/453/1003 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-Oct-11
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/A+A/453/1003      SCUBA ultracompact HII regions           (Thompson+, 2006)
*================================================================================
*A SCUBA imaging survey of ultracompact HII regions.
*The environments of massive star formation.
*    Thompson M.A., Hatchell J., Walsh A.J., Macdonald G.H., Millar T.J.
*   <Astron. Astrophys., 453, 1003-1026 (2006)>
*   =2006A&A...453.1003T
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! UC HII fields observed during the survey, their central
                         coordinates and estimated distance to the UC HIIs in
                         each field

      integer*4 nr__
      parameter (nr__=105)	! Number of records
      character*54 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*13  Field       ! UC HII field designation
      character*1   n_Field     ! [+] Note on Field (1)
      character*1   f_Field     ! [*] Note on Field (2)
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*4        Dist        ! (kpc) ?=- Distance or near distance (3)
      real*4        Dist2       ! (kpc) ? Far distance (3)
      character*5   r_Dist      ! Distance reference
*Note (1): Fields indicated with a dagger (+) show no evidence for UC HII
*          regions in the Wood & Churchwell (1989ApJS...69..831W) and
*          Hofner et al. (1994ApJ...429L..85H) surveys,
*          or in the literature search described in Sect. 2.1
*Note (2): Fields indicated by an asterisk (*) were subject to the 450{mu}m
*          calibration problems described in Sect. 2.3.
*Note (3): In cases where there is an ambiguity between the near and far
*          kinematic distance both values are listed.

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref         ! Reference number
      character*19  BibCode     ! BibCode
      character*20  Aut         ! Author's name
      character*98  Com         ! Comments

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

C  Declarations for 'table2.dat'	! Identifications, coordinates, peak and integrated fluxes
                         of each submillimetre source detected in the survey

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

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

      character*13  Field_1     ! UCH II field designation
      character*1   m_Field     ! [a-d] Multiplicity index on Field
      character*18  Source      ! Source designation (1)
      character*1   n_Source    ! [a-e] Note on Source (2)
      integer*4     RAh_1       ! (h) Right ascension (J2000)
      integer*4     RAm_1       ! (min) Right ascension (J2000)
      real*4        RAs_1       ! (s) Right ascension (J2000)
      character*1   DE__1       ! Declination sign (J2000)
      integer*4     DEd_1       ! (deg) Declination (J2000)
      integer*4     DEm_1       ! (arcmin) Declination (J2000)
      integer*4     DEs_1       ! (arcsec) Declination (J2000)
      character*1   l_Fp450um   ! Limit flag on Fp450um (3)
      real*4        Fp450um     ! (Jy) ?=- Peak flux density at 450um (in Jy/beam) (6)
      real*4        e_Fp450um   ! (Jy) ? rms uncertainty in Fp450um (in Jy/beam) (4)
      character*1   n_Fp450um   ! [+] Note on Fp450um (5)
      real*4        Fp850um     ! (Jy) ?=- Peak flux density at 850um (in Jy/beam) (6)
      real*4        e_Fp850um   ! (Jy) ? rms uncertainty in Fp850um (in Jy/beam) (4)
      character*1   l_Fi450um   ! Limit flag on F450umI (3)
      real*4        Fi450um     ! (Jy) ?=- Integrated flux density at 450um
*                                     (in Jy/beam) (6)
      real*4        e_Fi450um   ! (Jy) ? rms uncertainty in F450umI (in Jy/beam) (4)
      character*1   n_Fi450um   ! [+] Note on Fi450um (5)
      real*4        Fi850um     ! (Jy) ?=- Integrated flux density at 850um
*                                     (in Jy/beam) (6)
      real*4        e_Fi850um   ! (Jy) ? rms uncertainty in F850umI (in Jy/beam) (4)
*Note (1): All source positions were measured from the 850{mu}m images unless
*          otherwise stated.
*Note (2): Notes as follows:
*      a = A noisy bolometer clipped from the final rebinned image is
*          located close to this source and thus the measured flux is a
*          lower limit to the true flux.
*      b = These sources are separable in the unsmoothed 450{mu}m image but
*          blended in the 850{mu}m image. The quoted 850{mu}m flux is
*          that of the blended single source. The coordinates quoted are
*          measured from the 450{mu}m image.
*      c = These sources are separable in the 850{mu}m images but blended
*          into one source in the smoothed 450{mu}m images. The quoted
*          450{mu}m flux is the flux of the blended single source.
*      d = A noisy bolometer clipped from the final rebinned 850{mu}m image
*          lies over this source and it was not possible to masure any
*          sensible peak or integrated 850{mu}m flux.
*      e = This sources lies on the edge of the field of view and thus one
*          or more of the quoted fluxes is a lower limit to the true flux.
*Note (3): Upper limits for non-detections at 450um
*Note (4): Quoted errors include calibration uncertainties of 30% at 450{mu}m
*          and 10% at 850{mu}m.
*Note (5): 450{mu}m peak flux measurements indicated by a dagger (+) are
*          measured from smoothed images and the flux density unit in this 
*          case is Janskys per 14" beam.
*          The resolution of the unsmoothed images is 8" at 450 {mu}m
*          and 14" at 850 {mu}m.
*Note (6): Where it was not possible to measure a 450{mu}m flux, either due
*          to the smaller FOV of the short wavelength array or calibration
*          problems this is indicated by an ellipsis (---).

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

C  Loading file 'table1.dat'	! UC HII fields observed during the survey, their central
*                         coordinates and estimated distance to the UC HIIs in
*                         each field

C  Format for file interpretation

    1 format(
     +  A13,A1,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.1,
     +  1X,F4.1,1X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,105
        read(1,'(A54)')ar__
        read(ar__,1)
     +  Field,n_Field,f_Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Dist,Dist2,
     +  r_Dist
        if (idig(ar__(40:43)).EQ.0) Dist =  rNULL__
        if(ar__(45:48) .EQ. '') Dist2 = rNULL__
        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)
     +  Field,n_Field,f_Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Dist,Dist2,
     +  r_Dist
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    2 format(I2,1X,A19,1X,A20,3X,A98)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,19
        read(1,'(A144)')ar__1
        read(ar__1,2)Ref,BibCode,Aut,Com
c    ..............Just test output...........
        write(6,2)Ref,BibCode,Aut,Com
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Identifications, coordinates, peak and integrated fluxes
*                         of each submillimetre source detected in the survey

C  Format for file interpretation

    3 format(
     +  A13,1X,A1,1X,A18,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,
     +  I2,1X,A1,F5.1,1X,F4.1,A1,1X,F4.1,1X,F3.1,1X,A1,F6.1,1X,F5.1,
     +  A1,1X,F5.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,159
        read(1,'(A105)')ar__2
        read(ar__2,3)
     +  Field_1,m_Field,Source,n_Source,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,
     +  DEm_1,DEs_1,l_Fp450um,Fp450um,e_Fp450um,n_Fp450um,Fp850um,
     +  e_Fp850um,l_Fi450um,Fi450um,e_Fi450um,n_Fi450um,Fi850um,
     +  e_Fi850um
        if (idig(ar__2(60:64)).EQ.0) Fp450um =  rNULL__
        if(ar__2(66:69) .EQ. '') e_Fp450um = rNULL__
        if (idig(ar__2(72:75)).EQ.0) Fp850um =  rNULL__
        if(ar__2(77:79) .EQ. '') e_Fp850um = rNULL__
        if (idig(ar__2(82:87)).EQ.0) Fi450um =  rNULL__
        if(ar__2(89:93) .EQ. '') e_Fi450um = rNULL__
        if (idig(ar__2(96:100)).EQ.0) Fi850um =  rNULL__
        if(ar__2(102:105) .EQ. '') e_Fi850um = rNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,3)
     +  Field_1,m_Field,Source,n_Source,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,
     +  DEm_1,DEs_1,l_Fp450um,Fp450um,e_Fp450um,n_Fp450um,Fp850um,
     +  e_Fp850um,l_Fi450um,Fi450um,e_Fi450um,n_Fi450um,Fi850um,
     +  e_Fi850um
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
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