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

      character*18  MSX6C       ! Name of target, GLLL.llll+BB.bbbbA
      integer*4     RAh         ! (h) Right Ascension J2000 (hours)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes)
      real*4        RAs         ! (s) Right Ascension J2000 (seconds)
      character*1   DE_         ! Declination J2000 (sign)
      integer*4     DEd         ! (deg) Declination J2000 (degrees)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes)
      real*4        DEs         ! (arcsec) Declination J2000 (seconds)
      character*7   Class       ! RMS classification (G1)
      integer*4     Np          ! Number of detected flux data points used
*                                  for SED fit
      character*1   v2M         ! [Y/N] Flag for inclusion of 2MASS data
      character*1   T2          ! [Y/N] Flag for inclusion of TIMMI2 data (1)
      character*1   far         ! [I/M] Inclusion of far-IR IRAS Galaxy Atlas
*                                         data (I), or MIPSGAL (M) data (2)
      character*1   sc          ! [Y/N] Flag for inclusion of sub-mm SCUBA data
      character*1   mm          ! [1234N] Flag for 1.2mm data (3)
      real*4        chi2b       ! ? The chi-squared of the best fit
      real*4        dchi2       ! ? The delta-chi-squared at which at
*                                    least 10 fits exist
      integer*4     Nfit        ! ? The number of fits
      real*4        Flux        ! (10-11W/m2) Measured bolometric flux from the SED
      real*4        e_Flux      ! (10-11W/m2) Error in the measured bolometric flux
      character*2   dst         ! [s nf] Whether the distance ambiguity has
*                                         been solved (s) or not (nf)
      real*4        ApC         ! Aperture correction used for large-beam fluxes
*                                  (apportioning correction, 1=no apportioning)
      character*1   ApT         ! [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     ! (deg) Right Ascension J2000
      real*8        DEdeg_1     ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*18  MSX6C_1     ! Name of target, GLLL.llll+BB.bbbbA
      integer*4     RAh_1       ! (h) Right Ascension J2000 (hours)
      integer*4     RAm_1       ! (min) Right Ascension J2000 (minutes)
      real*4        RAs_1       ! (s) Right Ascension J2000 (seconds)
      character*1   DE__1       ! Declination J2000 (sign)
      integer*4     DEd_1       ! (deg) Declination J2000 (degrees)
      integer*4     DEm_1       ! (arcmin) Declination J2000 (minutes)
      real*4        DEs_1       ! (arcsec) Declination J2000 (seconds)
      character*7   Class_1     ! MSX Source classification (G1)
      real*8        MSX21       ! (Jy) MSX PSC 21 micron flux
      real*4        e_MSX21     ! (Jy) Error in the MSX PSC 21 micron flux
      real*8        Flux_1      ! (10-11W/m2) Measured bolometric flux using Fbol/F21
      real*8        E_Flux_1    ! (10-11W/m2) Positive error in the measured bolometric flux
      real*8        e_Flux_2    ! (10-11W/m2) Negative error in the measured bolometric flux
      real*4        ApC_1       ! Aperture correction used for large-beam fluxes
      character*1   ApT_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,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Class,Np,v2M,T2,far,sc,mm,
     +  chi2b,dchi2,Nfit,Flux,e_Flux,dst,ApC,ApT
        if(ar__(65:69) .EQ. '') chi2b = rNULL__
        if(ar__(71:74) .EQ. '') dchi2 = rNULL__
        if(ar__(76:79) .EQ. '') Nfit = iNULL__
        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)
     +  MSX6C,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Class,Np,v2M,T2,far,sc,mm,
     +  chi2b,dchi2,Nfit,Flux,e_Flux,dst,ApC,ApT
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
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,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Class_1,
     +  MSX21,e_MSX21,Flux_1,E_Flux_1,e_Flux_2,ApC_1,ApT_1
        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)
     +  MSX6C_1,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Class_1,
     +  MSX21,e_MSX21,Flux_1,E_Flux_1,e_Flux_2,ApC_1,ApT_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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