FORTRAN Generation
(/./ftp/cats/J/MNRAS/411/705)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/411/705 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-13
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/411/705    Spectrophotometric distances of HII regions   (Moises+, 2011)
*================================================================================
*Spectrophotometric distances to Galactic H II regions.
*    Moises A.P., Damineli A., Figueredo E., Blum R.D., Conti P.S., Barbosa C.L.
*   <Mon. Not. R. Astron. Soc., 411, 705-760 (2011)>
*   =2011MNRAS.411..705M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Massive YSOs identified using the color-color
                              and color-magnitude diagrams and with a
                              counterpart in their respective Spitzer images

      integer*4 nr__
      parameter (nr__=65)	! Number of records
      character*93 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*10  v_MDF2011_ (nr__) ! Region designation, GLLL.ll+B.bb
      character*1   r__MDF2011_(nr__) ! [abcde] Reference for the region (1)
      character*10  Name       (nr__) ! Other name of the region, or [MDF2011]
      integer*4     Cand       (nr__) ! Candidate number,
*                                   [MDF2011] GLLL.ll+B.bb NNNN in Simbad
      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        Ksmag      (nr__) ! (mag) MYSO Ks-band magnitude
      real*4        v_3_6_     (nr__) ! (mag) ? IRAC 3.6um magnitude
      integer*4     n__3_6_    (nr__) ! [1/3]? reason of non-detection in [3.6] (2)
      real*4        v_4_5_     (nr__) ! (mag) ? IRAC 4.5um magnitude
      integer*4     n__4_5_    (nr__) ! [1/3]? reason of non-detection in [4.5] (2)
      real*4        v_5_8_     (nr__) ! (mag) ? IRAC 5.8um magnitude
      integer*4     n__5_8_    (nr__) ! [1/3]? reason of non-detection in [5.8] (2)
      real*4        v_8_0_     (nr__) ! (mag) ? IRAC 8.0um magnitude
      integer*4     n__8_0_    (nr__) ! [1/4]? reason of non-detection in [8.0] (2)
      character*4   Class      (nr__) ! Classificiation of the MYSO, when possible
*Note (1): References as follows:
*   a = Blum et al. (2001AJ....121.3149B)
*   b = Blum et al. (2000AJ....119.1860B
*   c = Blum et al. (1999AJ....117.1392B)
*   d = Figueredo et al. (2008AJ....136..221F)
*   e = Figueredo et al. (2005AJ....129.1523F)
*Note (2): Identification of non-detected objects code as follows:
*   1 = undetected object
*   2 = saturated object
*   3 = strong nebulosity obscurating the object
*   4 = crowded cluster

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

C  Declarations for 'table3.dat'	! Regions with distances derived from the
                              trigonometric parallax

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

C  Position composed of: GLON GLAT
      real*4        GLON       (nr__1) ! (deg) Galactic longitude
      real*4        GLAT       (nr__1) ! (deg) Galactic latitude
      character*10  Name_1     (nr__1) ! Name of the HII region
      real*4        Dkin       (nr__1) ! (kpc) Kinematic distance (1)
      real*4        Dplx       (nr__1) ! (kpc) Distance derived from the trigonometric parallax
      real*4        E_Dplx     (nr__1) ! (kpc) Error on Dplx (upper value)
      real*4        e_Dplx_1   (nr__1) ! (kpc) Error on Dplx (lower value)
      integer*4     r_Dplx     (nr__1) ! References for Dplx (2)
*Note (1): Kinematic distance from From Reid et al. (2009ApJ...700..137R)
*Note (2): References for the adopted distance moduli as follows:
*   1 = Reid et al. (2009ApJ...693..397R)
*   2 = Moscadelli et al. (2009ApJ...693..406M)
*   3 = Xu et al. (2009ApJ...693..413X)
*   4 = Zhang et al. (2009ApJ...693..419Z)
*   5 = Brunthaler et al. (2009ApJ...693..424B)
*   6 = Bartkiewicz et al. (2008A&A...490..787B)
*   7 = Moellenbrock, Claussen & Goss (2009ApJ...694..192M)
*   8 = Sato et al. (2008PASJ...60..975S)
*   9 = Xu et al. (2006Sci...311...54X),
*       Hachisuka et al. (2006ApJ...645..337H)
*  10 = Hachisuka et al. (2009ApJ...696.1981H)
*  11 = Honma et al. (2007PASJ...59..889H)
*  12 = Hirota et al. (2007PASJ...59..897H),
*       Menten et al. (2007A&A...474..515M)
*  13 = Choi et al. (2008PASJ...60.1007C)
*  14 = Reid et al. (2009ApJ...705.1548R)

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

C  Declarations for 'table4.dat'	! Spectrophotometric distances

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

C  Position composed of: GLON GLAT
      real*4        GLON_1     (nr__2) ! (deg) Galactic longitude
      real*4        GLAT_1     (nr__2) ! (deg) Galactic latitude
      character*10  Name_2     (nr__2) ! Name of the HII region
      integer*4     r_Dist     (nr__2) ! Reference for adopted distance moduli (1)
      integer*4     Nstar      (nr__2) ! Number of stars used in each region
      real*4        Dkin_1     (nr__2) ! (kpc) Kinematic distance (2)
      real*4        e_Dkin     (nr__2) ! (kpc) rms uncertainty on Dkin
      real*4        DM         (nr__2) ! (kpc) Spectrophotometric distance using the Mathis
*                                   (1990ARA&A..28...37M) interstellar
*                                   extinction law
      real*4        e_DM       (nr__2) ! (kpc) rms uncertainty on DM
      real*4        DS         (nr__2) ! (kpc) Spectrophotometric distance using the
*                                   Stead & Hoare (2009MNRAS.400..731S)
*                                   interstellar extinction law
      real*4        e_DS       (nr__2) ! (kpc) rms uncertainty on DS
      real*4        v_Dspec_   (nr__2) ! (kpc) Average of both spectrophotometric distances
*Note (1): References for the adopted distance moduli as follows:
*   1 = Bik et al. (2005A&A...440..121B)
*   2 = Blum et al. (2001AJ....121.3149B)
*   3 = Hanson et al. (1996, Cat. J/ApJS/107/281)
*   4 = Blum et al. (2000AJ....119.1860B)
*   5 = Blum et al. (1999AJ....117.1392B)
*   6 = Figueredo et al. (2008AJ....136..221F)
*   7 = Navarete et al. (in preparation)
*   8 = Figueredo et al. (2005AJ....129.1523F)
*Note (2): All kinematic distances are from Russeil (2003, Cat. J/A+A/397/133)
*     except for W31-South and W31-North with distances from
*     Corbel & Eikenberry (2004A&A...419..191C).

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

C  Loading file 'table2.dat'	! Massive YSOs identified using the color-color
*                              and color-magnitude diagrams and with a
*                              counterpart in their respective Spitzer images

C  Format for file interpretation

    1 format(
     +  A10,A1,1X,A10,I4,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F5.2,
     +  1X,F5.2,1X,F5.2,1X,I1,1X,F5.2,1X,I1,1X,F5.2,1X,I1,1X,F4.2,1X,
     +  I1,1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,65
        read(1,'(A93)')ar__
        read(ar__,1)
     +  v_MDF2011_(i__),r__MDF2011_(i__),Name(i__),Cand(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  Ksmag(i__),v_3_6_(i__),n__3_6_(i__),v_4_5_(i__),n__4_5_(i__),
     +  v_5_8_(i__),n__5_8_(i__),v_8_0_(i__),n__8_0_(i__),Class(i__)
        if(ar__(59:63) .EQ. '') v_3_6_(i__) = rNULL__
        if(ar__(65:65) .EQ. '') n__3_6_(i__) = iNULL__
        if(ar__(67:71) .EQ. '') v_4_5_(i__) = rNULL__
        if(ar__(73:73) .EQ. '') n__4_5_(i__) = iNULL__
        if(ar__(75:79) .EQ. '') v_5_8_(i__) = rNULL__
        if(ar__(81:81) .EQ. '') n__5_8_(i__) = iNULL__
        if(ar__(83:86) .EQ. '') v_8_0_(i__) = rNULL__
        if(ar__(88:88) .EQ. '') n__8_0_(i__) = iNULL__
        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)
     +  v_MDF2011_(i__),r__MDF2011_(i__),Name(i__),Cand(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),
     +  Ksmag(i__),v_3_6_(i__),n__3_6_(i__),v_4_5_(i__),n__4_5_(i__),
     +  v_5_8_(i__),n__5_8_(i__),v_8_0_(i__),n__8_0_(i__),Class(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 'table3.dat'	! Regions with distances derived from the
*                              trigonometric parallax

C  Format for file interpretation

    2 format(
     +  F6.2,1X,F6.2,1X,A10,2X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,19
        read(1,'(A48)')ar__1
        read(ar__1,2)
     +  GLON(i__),GLAT(i__),Name_1(i__),Dkin(i__),Dplx(i__),
     +  E_Dplx(i__),e_Dplx_1(i__),r_Dplx(i__)
c    ..............Just test output...........
        write(6,2)
     +  GLON(i__),GLAT(i__),Name_1(i__),Dkin(i__),Dplx(i__),
     +  E_Dplx(i__),e_Dplx_1(i__),r_Dplx(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Spectrophotometric distances

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,27
        read(1,'(A63)')ar__2
        read(ar__2,3)
     +  GLON_1(i__),GLAT_1(i__),Name_2(i__),r_Dist(i__),Nstar(i__),
     +  Dkin_1(i__),e_Dkin(i__),DM(i__),e_DM(i__),DS(i__),e_DS(i__),
     +  v_Dspec_(i__)
c    ..............Just test output...........
        write(6,3)
     +  GLON_1(i__),GLAT_1(i__),Name_2(i__),r_Dist(i__),Nstar(i__),
     +  Dkin_1(i__),e_Dkin(i__),DM(i__),e_DM(i__),DS(i__),e_DS(i__),
     +  v_Dspec_(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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