FORTRAN Generation
(/./home/cats/J/A_A/525/A149)

Conversion of standardized ReadMe file for file /./home/cats/J/A_A/525/A149 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-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/A+A/525/A149 Red MSX Survey (RMS): bolometric fluxes of YSOs  (Mottram+, 2011)
*================================================================================
*The Red MSX Survey survey: the bolometric fluxes and luminosity distributions of
*young massive stars.
*    Mottram J.C., Hoare M.G., Urquhart J.S., Lumsden S.L., Oudmaijer R.D.,
*    Robitaille T.P., Moore T.J.T, Davies B., Stead J.J.
*   <Astron. Astrophys. 525, A149 (2011)>
*   =2011A&A...525A.149M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Bolometric fluxes for sources with far-IR data
                              using SED fitting

      integer*4 nr__
      parameter (nr__=1173)	! Number of records
      character*103 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*18  MSX6C      (nr__) ! Name of target, GLLL.llll+BB.bbbbA
      integer*4     RAh        (nr__) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes)
      real*4        RAs        (nr__) ! (s) Right Ascension J2000 (seconds)
      character*1   DE_        (nr__) ! Declination J2000 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination J2000 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes)
      real*4        DEs        (nr__) ! (arcsec) Declination J2000 (seconds)
      character*7   Class      (nr__) ! RMS classification (G1)
      integer*4     Np         (nr__) ! Number of detected flux data points used
*                                  for SED fit
      character*1   v2M        (nr__) ! [Y/N] Flag for inclusion of 2MASS data
      character*1   T2         (nr__) ! [Y/N] Flag for inclusion of TIMMI2 data (1)
      character*1   far        (nr__) ! [I/M] Inclusion of far-IR IRAS Galaxy Atlas
*                                         data (I), or MIPSGAL (M) data (2)
      character*1   sc         (nr__) ! [Y/N] Flag for inclusion of sub-mm SCUBA data
      character*1   mm         (nr__) ! [1234N] Flag for 1.2mm data (3)
      real*4        chi2b      (nr__) ! ? The chi-squared of the best fit
      real*4        dchi2      (nr__) ! ? The delta-chi-squared at which at
*                                    least 10 fits exist
      integer*4     Nfit       (nr__) ! ? The number of fits
      real*4        Flux       (nr__) ! (10-11W/m2) Measured bolometric flux from the SED
      real*4        e_Flux     (nr__) ! (10-11W/m2) Error in the measured bolometric flux
      character*2   dst        (nr__) ! [s nf] Whether the distance ambiguity has
*                                         been solved (s) or not (nf)
      real*4        ApC        (nr__) ! Aperture correction used for large-beam fluxes
*                                  (apportioning correction, 1=no apportioning)
      character*1   ApT        (nr__) ! [NGTS] Type of apportioning used:
*                                  N=no (ApC=1), G=GLIMPSE, T=TIMMI2, S=split
*Note (1): Data from Mottram et al. (2007A&A...476.1019M)
*Note (2): Data from Mottram et al. (2010A&A...510A..89M)
*Note (3): Flag for 1.2mm data as follows:
*      N = no
*      1 = Beuther et al. (2002ApJ...566..945B),
*      2 = Faundez et al.  (2004A&A...426...97F),
*      3 = Hill et al. (2005MNRAS.363..405H),
*      4 = Beltran et al. (2006A&A...447..221B)

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

C  Declarations for 'table2.dat'	! Bolometric fluxes for sources with no far-IR
                              data using Fbol/F21

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

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

      character*18  MSX6C_1    (nr__1) ! Name of target, GLLL.llll+BB.bbbbA
      integer*4     RAh_1      (nr__1) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm_1      (nr__1) ! (min) Right Ascension J2000 (minutes)
      real*4        RAs_1      (nr__1) ! (s) Right Ascension J2000 (seconds)
      character*1   DE__1      (nr__1) ! Declination J2000 (sign)
      integer*4     DEd_1      (nr__1) ! (deg) Declination J2000 (degrees)
      integer*4     DEm_1      (nr__1) ! (arcmin) Declination J2000 (minutes)
      real*4        DEs_1      (nr__1) ! (arcsec) Declination J2000 (seconds)
      character*7   Class_1    (nr__1) ! MSX Source classification (G1)
      real*8        MSX21      (nr__1) ! (Jy) MSX PSC 21 micron flux
      real*4        e_MSX21    (nr__1) ! (Jy) Error in the MSX PSC 21 micron flux
      real*8        Flux_1     (nr__1) ! (10-11W/m2) Measured bolometric flux using Fbol/F21
      real*8        E_Flux_1   (nr__1) ! (10-11W/m2) Positive error in the measured bolometric flux
      real*8        e_Flux_2   (nr__1) ! (10-11W/m2) Negative error in the measured bolometric flux
      real*4        ApC_1      (nr__1) ! Aperture correction used for large-beam fluxes
      character*1   ApT_1      (nr__1) ! [NGTS] Type of apportioning used:
*                                  N=no (ApC=1), G=GLIMPSE, T=TIMMI2, S=split

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

C  Loading file 'table1.dat'	! Bolometric fluxes for sources with far-IR data
*                              using SED fitting

C  Format for file interpretation

    1 format(
     +  A18,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A7,1X,I2,1X,
     +  A1,1X,A1,1X,A1,1X,A1,1X,A1,1X,F5.1,1X,F4.1,1X,I4,1X,F6.3,1X,
     +  F6.3,1X,A2,1X,F4.2,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,1173
        read(1,'(A103)')ar__
        read(ar__,1)
     +  MSX6C(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Class(i__),Np(i__),v2M(i__),T2(i__),
     +  far(i__),sc(i__),mm(i__),chi2b(i__),dchi2(i__),Nfit(i__),
     +  Flux(i__),e_Flux(i__),dst(i__),ApC(i__),ApT(i__)
        if(ar__(65:69) .EQ. '') chi2b(i__) = rNULL__
        if(ar__(71:74) .EQ. '') dchi2(i__) = rNULL__
        if(ar__(76:79) .EQ. '') Nfit(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)
     +  MSX6C(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Class(i__),Np(i__),v2M(i__),T2(i__),
     +  far(i__),sc(i__),mm(i__),chi2b(i__),dchi2(i__),Nfit(i__),
     +  Flux(i__),e_Flux(i__),dst(i__),ApC(i__),ApT(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 'table2.dat'	! Bolometric fluxes for sources with no far-IR
*                              data using Fbol/F21

C  Format for file interpretation

    2 format(
     +  A18,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A7,1X,F7.2,
     +  1X,F6.2,1X,F7.3,1X,F7.3,1X,F7.3,1X,F4.2,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,280
        read(1,'(A96)')ar__1
        read(ar__1,2)
     +  MSX6C_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Class_1(i__),MSX21(i__),
     +  e_MSX21(i__),Flux_1(i__),E_Flux_1(i__),e_Flux_2(i__),
     +  ApC_1(i__),ApT_1(i__)
        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,2)
     +  MSX6C_1(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Class_1(i__),MSX21(i__),
     +  e_MSX21(i__),Flux_1(i__),E_Flux_1(i__),e_Flux_2(i__),
     +  ApC_1(i__),ApT_1(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