FORTRAN Generation
(/./ftp/cats/J/MNRAS/452/4029)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/452/4029 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 2024-Mar-28
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/452/4029                  RMS survey                   (Urquhart+, 2015)
*================================================================================
*The RMS survey: ammonia mapping of the environment of massive young stellar
*objects.
*    Urquhart J.S., Figura C.C., Moore T.J.T., Csengeri T., Lumsden S.L.,
*    Pillai T., Thompson M.A., Eden D.J., Morgan L.K.
*   <Mon. Not. R. Astron. Soc., 452, 4029-4053 (2015)>
*   =2015MNRAS.452.4029U    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Observed field parameters

      integer*4 nr__
      parameter (nr__=66)	! Number of records
      character*60 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)

      integer*4     Seq         ! Field sequential number
      character*15  Field       ! Field name (GLLL.lll+BB.bbb)
      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        Map         ! (K.km/s) Map sensitivity
      integer*4     NClump      ! Number of clumps
      real*4        VLSR        ! (km/s) ?=- LSR velocity
      real*4        Dist        ! (kpc) ?=- Distance

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

C  Declarations for 'table2.dat'	! *The FellWalker source catalogue

      integer*4 nr__1
      parameter (nr__1=115)	! Number of records
      character*82 ar__1  	! 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)

      integer*4     Seq_1       ! Field sequential number
      character*15  Clump       ! Clump name (GLLL.lll+BB.bbb)
      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)
      real*4        DEs_1       ! (arcsec) Declination (J2000)
      integer*4     maj         ! (arcsec) Semi-major axis
      integer*4     min         ! (arcsec) Semi-minor axis
      integer*4     PA          ! (deg) Position angle measured anticlockwise
*                                        from Galactic north
      real*4        Aspect      ! Aspect ratio
      real*4        thetaR      ! (arcsec) Effective radius of the source
      real*4        NH3peak     ! (K.km/s/beam) NH_3_ peak flux density
      real*4        e_NH3peak   ! (K.km/s/beam) rms uncertainty on NH3peak
      real*4        NH3int      ! (K.km/s) NH_3_ integrated flux density
      real*4        SNR         ! Signal-to-noise ratio

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

C  Declarations for 'table3.dat'	! Detected NH_3_ clump parameters

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

      integer*4     Seq_2       ! Field sequential number
      character*15  Clump_1     ! Clump name (GLLL.lll+BB.bbb)
      real*4        VLSR_1      ! (km/s) LSR velocity
      real*4        DV          ! (km/s) Intrinsic FWHM line width
      real*4        e_DV        ! (km/s) rms uncertainty on DV
      real*4        taumain     ! Optical depth of the transition
      real*4        e_taumain   ! rms uncertainty on taumain
      real*4        Tex         ! (K) Excitation temperature
      real*4        e_Tex       ! (K) rms uncertainty on Tex
      real*4        Trot        ! (K) Rotation temperature
      real*4        e_Trot      ! (K) rms uncertainty on Trot
      real*4        Tkin        ! (K) Kinetic temperature
      real*4        e_Tkin      ! (K) rms uncertainty on Tkin
      real*4        Bff         ! Beam filling factor (Tex/Trot)
      real*4        logN_NH3    ! ([cm-2]) NH_3_ column density measured towards
*                                            the emission peak
      real*4        v_logN_NH3__ ! ([cm-2]) NH_3_ column density median value
*                                            determined over the clump
      real*4        log_N_NH3__N_H2_ ! ([-]) ?=- NH_3_ abundance measured towards
*                                            the emission peak
      real*4        v_log_N_NH3__N_H2___ ! ([-]) ? NH_3_ abundance median value
*                                            determined over the clump
      integer*4     Notes       ! [1/3]? Notes (1)
*Note (1): Note as follows:
*    1 = the emission profile appears to arise from a single clump
*    2 = the emission profile appears to arise from multiple distinct clumps
*         along the line of sight
*    3 = identifies sources that are associated with broad emission wings,
*         which are themselves indicative of outflow motion

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

C  Declarations for 'table4.dat'	! Matches between NH_3_ clumps and RMS sources

      integer*4 nr__3
      parameter (nr__3=88)	! Number of records
      character*61 ar__3  	! Full-size record

      integer*4     Seq_3       ! Field sequential number
      character*15  Clump_2     ! Clump name
      character*18  RMS         ! MSX Source Name
      real*4        Offset      ! (arcsec) ?=- Angular offset between RMS and Clump
*                                   positions
      character*18  RMSType     ! RMS source type

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

C  Declarations for 'table6.dat'	! Derived clump parameters

      integer*4 nr__4
      parameter (nr__4=115)	! Number of records
      character*53 ar__4  	! Full-size record

      integer*4     Seq_4       ! Field sequential number
      character*15  Clump_3     ! Clump name (GLLL.lll+BB.bbb)
      character*3   RMS_        ! [yes/no ] RMS association ?
      real*4        Dist_1      ! (kpc) ?=- Distance
      real*4        Rad         ! (kpc) ?=- Radius
      real*4        log_PeakN_H2_ ! ([cm-2]) ?=- NH_2_ peak column density
      real*4        logMclump   ! ([Msun]) ?=- Clump mass
      real*4        logMvir     ! ([Msun]) ?=- Virial mass
      real*4        logLbol     ! ([Lsun]) ?=- Bobometric velocity (1)
*Note (1): The bolometric luminosity given is the sum of all RMS sources
*  embedded in each clump.

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

C  Loading file 'table1.dat'	! Observed field parameters

C  Format for file interpretation

    1 format(
     +  I2,1X,A15,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.2,
     +  1X,I1,1X,F5.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,66
        read(1,'(A60)')ar__
        read(ar__,1)
     +  Seq,Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Map,NClump,VLSR,Dist
        if (idig(ar__(51:55)).EQ.0) VLSR =  rNULL__
        if (idig(ar__(57:60)).EQ.0) Dist =  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)
     +  Seq,Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Map,NClump,VLSR,Dist
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! *The FellWalker source catalogue

C  Format for file interpretation

    2 format(
     +  I2,1X,A15,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I2,1X,
     +  I2,1X,I3,1X,F3.1,1X,F4.1,1X,F4.1,1X,F4.2,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,115
        read(1,'(A82)')ar__1
        read(ar__1,2)
     +  Seq_1,Clump,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,maj,min,
     +  PA,Aspect,thetaR,NH3peak,e_NH3peak,NH3int,SNR
        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,2)
     +  Seq_1,Clump,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,maj,min,
     +  PA,Aspect,thetaR,NH3peak,e_NH3peak,NH3int,SNR
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Detected NH_3_ clump parameters

C  Format for file interpretation

    3 format(
     +  I2,1X,A15,1X,F5.1,1X,F3.1,1X,F3.1,1X,F3.1,1X,F3.1,1X,F4.1,1X,
     +  F4.1,1X,F4.1,1X,F4.1,1X,F4.1,1X,F4.1,1X,F4.2,1X,F5.2,1X,F5.2,
     +  1X,F5.2,1X,F5.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,115
        read(1,'(A101)')ar__2
        read(ar__2,3)
     +  Seq_2,Clump_1,VLSR_1,DV,e_DV,taumain,e_taumain,Tex,e_Tex,Trot,
     +  e_Trot,Tkin,e_Tkin,Bff,logN_NH3,v_logN_NH3__,log_N_NH3__N_H2_,
     +  v_log_N_NH3__N_H2___,Notes
        if (idig(ar__2(89:93)).EQ.0) log_N_NH3__N_H2_ =  rNULL__
        if(ar__2(95:99) .EQ. '') v_log_N_NH3__N_H2___ = rNULL__
        if(ar__2(101:101) .EQ. '') Notes = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  Seq_2,Clump_1,VLSR_1,DV,e_DV,taumain,e_taumain,Tex,e_Tex,Trot,
     +  e_Trot,Tkin,e_Tkin,Bff,logN_NH3,v_logN_NH3__,log_N_NH3__N_H2_,
     +  v_log_N_NH3__N_H2___,Notes
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Matches between NH_3_ clumps and RMS sources

C  Format for file interpretation

    4 format(I2,1X,A15,1X,A18,1X,F4.1,1X,A18)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,88
        read(1,'(A61)')ar__3
        read(ar__3,4)Seq_3,Clump_2,RMS,Offset,RMSType
        if (idig(ar__3(39:42)).EQ.0) Offset =  rNULL__
c    ..............Just test output...........
        write(6,4)Seq_3,Clump_2,RMS,Offset,RMSType
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Derived clump parameters

C  Format for file interpretation

    5 format(
     +  I2,1X,A15,1X,A3,1X,F4.1,1X,F4.2,1X,F5.2,1X,F3.1,1X,F5.2,1X,
     +  F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,115
        read(1,'(A53)')ar__4
        read(ar__4,5)
     +  Seq_4,Clump_3,RMS_,Dist_1,Rad,log_PeakN_H2_,logMclump,logMvir,
     +  logLbol
        if (idig(ar__4(24:27)).EQ.0) Dist_1 =  rNULL__
        if (idig(ar__4(29:32)).EQ.0) Rad =  rNULL__
        if (idig(ar__4(34:38)).EQ.0) log_PeakN_H2_ =  rNULL__
        if (idig(ar__4(40:42)).EQ.0) logMclump =  rNULL__
        if (idig(ar__4(44:48)).EQ.0) logMvir =  rNULL__
        if (idig(ar__4(50:53)).EQ.0) logLbol =  rNULL__
c    ..............Just test output...........
        write(6,5)
     +  Seq_4,Clump_3,RMS_,Dist_1,Rad,log_PeakN_H2_,logMclump,logMvir,
     +  logLbol
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