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 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-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      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*13  Field      (nr__) ! UC HII field designation
      character*1   n_Field    (nr__) ! [+] Note on Field (1)
      character*1   f_Field    (nr__) ! [*] Note on Field (2)
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000)
      character*1   DE_        (nr__) ! Declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000)
      real*4        Dist       (nr__) ! (kpc) ?=- Distance or near distance (3)
      real*4        Dist2      (nr__) ! (kpc) ? Far distance (3)
      character*5   r_Dist     (nr__) ! 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        (nr__1) ! Reference number
      character*19  BibCode    (nr__1) ! BibCode
      character*20  Aut        (nr__1) ! Author's name
      character*98  Com        (nr__1) ! 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    (nr__2) ! (deg) Right Ascension J2000
      real*8        DEdeg_1    (nr__2) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*13  Field_1    (nr__2) ! UCH II field designation
      character*1   m_Field    (nr__2) ! [a-d] Multiplicity index on Field
      character*18  Source     (nr__2) ! Source designation (1)
      character*1   n_Source   (nr__2) ! [a-e] Note on Source (2)
      integer*4     RAh_1      (nr__2) ! (h) Right ascension (J2000)
      integer*4     RAm_1      (nr__2) ! (min) Right ascension (J2000)
      real*4        RAs_1      (nr__2) ! (s) Right ascension (J2000)
      character*1   DE__1      (nr__2) ! Declination sign (J2000)
      integer*4     DEd_1      (nr__2) ! (deg) Declination (J2000)
      integer*4     DEm_1      (nr__2) ! (arcmin) Declination (J2000)
      integer*4     DEs_1      (nr__2) ! (arcsec) Declination (J2000)
      character*1   l_Fp450um  (nr__2) ! Limit flag on Fp450um (3)
      real*4        Fp450um    (nr__2) ! (Jy) ?=- Peak flux density at 450um (in Jy/beam) (6)
      real*4        e_Fp450um  (nr__2) ! (Jy) ? rms uncertainty in Fp450um (in Jy/beam) (4)
      character*1   n_Fp450um  (nr__2) ! [+] Note on Fp450um (5)
      real*4        Fp850um    (nr__2) ! (Jy) ?=- Peak flux density at 850um (in Jy/beam) (6)
      real*4        e_Fp850um  (nr__2) ! (Jy) ? rms uncertainty in Fp850um (in Jy/beam) (4)
      character*1   l_Fi450um  (nr__2) ! Limit flag on F450umI (3)
      real*4        Fi450um    (nr__2) ! (Jy) ?=- Integrated flux density at 450um
*                                     (in Jy/beam) (6)
      real*4        e_Fi450um  (nr__2) ! (Jy) ? rms uncertainty in F450umI (in Jy/beam) (4)
      character*1   n_Fi450um  (nr__2) ! [+] Note on Fi450um (5)
      real*4        Fi850um    (nr__2) ! (Jy) ?=- Integrated flux density at 850um
*                                     (in Jy/beam) (6)
      real*4        e_Fi850um  (nr__2) ! (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(i__),n_Field(i__),f_Field(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),Dist(i__),
     +  Dist2(i__),r_Dist(i__)
        if (idig(ar__(40:43)).EQ.0) Dist(i__) =  rNULL__
        if(ar__(45:48) .EQ. '') Dist2(i__) = rNULL__
        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)
     +  Field(i__),n_Field(i__),f_Field(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),Dist(i__),
     +  Dist2(i__),r_Dist(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 '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(i__),BibCode(i__),Aut(i__),Com(i__)
c    ..............Just test output...........
        write(6,2)Ref(i__),BibCode(i__),Aut(i__),Com(i__)
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(i__),m_Field(i__),Source(i__),n_Source(i__),
     +  RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),
     +  DEm_1(i__),DEs_1(i__),l_Fp450um(i__),Fp450um(i__),
     +  e_Fp450um(i__),n_Fp450um(i__),Fp850um(i__),e_Fp850um(i__),
     +  l_Fi450um(i__),Fi450um(i__),e_Fi450um(i__),n_Fi450um(i__),
     +  Fi850um(i__),e_Fi850um(i__)
        if (idig(ar__2(60:64)).EQ.0) Fp450um(i__) =  rNULL__
        if(ar__2(66:69) .EQ. '') e_Fp450um(i__) = rNULL__
        if (idig(ar__2(72:75)).EQ.0) Fp850um(i__) =  rNULL__
        if(ar__2(77:79) .EQ. '') e_Fp850um(i__) = rNULL__
        if (idig(ar__2(82:87)).EQ.0) Fi450um(i__) =  rNULL__
        if(ar__2(89:93) .EQ. '') e_Fi450um(i__) = rNULL__
        if (idig(ar__2(96:100)).EQ.0) Fi850um(i__) =  rNULL__
        if(ar__2(102:105) .EQ. '') e_Fi850um(i__) = rNULL__
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = 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(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  Field_1(i__),m_Field(i__),Source(i__),n_Source(i__),
     +  RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),
     +  DEm_1(i__),DEs_1(i__),l_Fp450um(i__),Fp450um(i__),
     +  e_Fp450um(i__),n_Fp450um(i__),Fp850um(i__),e_Fp850um(i__),
     +  l_Fi450um(i__),Fi450um(i__),e_Fi450um(i__),n_Fi450um(i__),
     +  Fi850um(i__),e_Fi850um(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
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