FORTRAN Generation
(/./ftp/cats/J/MNRAS/391/1527)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/391/1527 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-May-19
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/391/1527    Compact HII regions IR photometry        (Phillips+, 2008)
*================================================================================
*Observations of 58 compact HII regions at mid-infrared wavelengths.
*    Phillips J.P., Ramos-Larios G.
*   <Mon. Not. R. Astron. Soc., 391, 1527-1544 (2008)>
*   =2008MNRAS.391.1527P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Infrared characteristics of compact galactic
                              HII regions

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

C  Position composed of: GLON GLAT
      integer*4     v_PR2008_   ! Sequential number
      real*8        GLON        ! (deg) Galactic longitude
      real*4        GLAT        ! (deg) Galactic latitude
      real*8        S12         ! (Jy) ?=- IRAS flux density at 12um
      real*8        S25         ! (Jy) ?=- IRAS flux density at 25um
      real*8        S60         ! (Jy) ?=- IRAS flux density at 60um
      real*8        S100        ! (Jy) ?=- IRAS flux density at 1060um
      integer*4     q_S12       ! ? Quality flag on S12um (1)
      integer*4     q_S25       ! ? Quality flag on S25um (1)
      integer*4     q_S60       ! ? Quality flag on S60um (1)
      integer*4     q_S100      ! ? Quality flag on S100um (1)
      real*4        m3_6        ! (mag) Spitzer magnitude at 3.6um
      real*4        m4_5        ! (mag) Spitzer magnitude at 4.5um
      real*4        m5_8        ! (mag) Spitzer magnitude at 5.8um
      real*4        m8_0        ! (mag) Spitzer magnitude at 8.0um
      integer*4     Min         ! (arcsec) Minimum diameter
      integer*4     Max         ! (arcsec) Maximum diameter
      character*1   Cont        ! [HL] Low or High contamination
      character*136 Id          ! Identification (2)
      character*9   r_Id        ! Reference(s), in refs.dat file
*Note (1): Quality of the IRAS flux measurements:
*      3 = high quality
*      2 = moderate quality
*      1 = upper limit
*Note (2): Source types are coded as follows:
*  RAD   = radio source
*  SUBMM = submillimetre source
*  H II  = H II region
*  Y*O   = young stellar object
*  GAL   = galaxy
*  MAS   = maser source
*  X-RAY = X-ray source
*  *CL   = stellar cluster

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref         ! Reference number
      character*19  BibCode     ! Bibcode
      character*22  Aut         ! Author's name
      character*21  Com         ! Comments

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

C  Loading file 'table1.dat'	! Infrared characteristics of compact galactic
*                              HII regions

C  Format for file interpretation

    1 format(
     +  I2,1X,F7.3,1X,F6.3,1X,F7.4,1X,F8.4,F8.3,1X,F7.2,1X,I1,I1,I1,
     +  I1,1X,F5.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,I3,2X,I3,1X,A1,1X,A136,
     +  1X,A9)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,58
        read(1,'(A235)')ar__
        read(ar__,1)
     +  v_PR2008_,GLON,GLAT,S12,S25,S60,S100,q_S12,q_S25,q_S60,q_S100,
     +  m3_6,m4_5,m5_8,m8_0,Min,Max,Cont,Id,r_Id
        if (idig(ar__(19:25)).EQ.0) S12 =  rNULL__
        if (idig(ar__(27:34)).EQ.0) S25 =  rNULL__
        if (idig(ar__(35:42)).EQ.0) S60 =  rNULL__
        if (idig(ar__(44:50)).EQ.0) S100 =  rNULL__
        if(ar__(52:52) .EQ. '') q_S12 = iNULL__
        if(ar__(53:53) .EQ. '') q_S25 = iNULL__
        if(ar__(54:54) .EQ. '') q_S60 = iNULL__
        if(ar__(55:55) .EQ. '') q_S100 = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  v_PR2008_,GLON,GLAT,S12,S25,S60,S100,q_S12,q_S25,q_S60,q_S100,
     +  m3_6,m4_5,m5_8,m8_0,Min,Max,Cont,Id,r_Id
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,A22,2X,A21)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,16
        read(1,'(A68)')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=============================================================================
      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