FORTRAN Generation
(/./ftp/cats/J/A_A/476/1019)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/476/1019 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 2024-Apr-16
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/476/1019    RMS survey of southern candidate massive YSOs (Mottram+, 2007)
*================================================================================
*The RMS survey: mid-infrared observations of candidate massive YSOs in the
*southern hemisphere.
*    Mottram J.C., Hoare M.G., Lumsden S.L., Oudmaijer R.D., Urquhart J.S.,
*    Sheret T.L., Clarke A.J., Allsopp J.
*   <Astron. Astrophys., 476, 1019-1111 (2007)>
*   =2007A&A...476.1019M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Observed targets

      integer*4 nr__
      parameter (nr__=489)	! Number of records
      character*117 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*17  MSX6C      (nr__) ! Object name (GLLL.llll+BB.bbbb, Cat. V/114) (1)
      integer*4     Src        (nr__) ! [1/8] Source number (1)
      integer*4     RAh        (nr__) ! (h) TIMMI2 Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) TIMMI2 Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) TIMMI2 Right ascension (J2000)
      character*1   n_RAs      (nr__) ! [*] * : MSX coordinates used
      character*1   DE_        (nr__) ! TIMMI2 declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) TIMMI2 declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) TIMMI2 declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) TIMMI2 declination (J2000)
      real*4        rMSX       (nr__) ! (arcsec) ?=- Offset from MSX position
      real*4        aFWHM      (nr__) ! (arcsec) ?=- FWHM of the major axis of the source
      real*4        bFWHM      (nr__) ! (arcsec) ?=- FWHM of the minor axis of the source
      character*1   l_Flux     (nr__) ! Limit flag on Flux
      real*4        Flux       (nr__) ! (Jy) TIMMI2 10.4um flux
      real*4        e_Flux     (nr__) ! (Jy) ? rms uncertainty on Flux
      integer*4     RA2h       (nr__) ! (h) ? 2MASS Right ascension (J2000) (2)
      integer*4     RA2m       (nr__) ! (min) ? 2MASS Right ascension (J2000) (2)
      real*4        RA2s       (nr__) ! (s) ? 2MASS Right ascension (J2000) (2)
      character*1   DE2_       (nr__) ! 2MASS declination sign (J2000) (2)
      integer*4     DE2d       (nr__) ! (deg) ? 2MASS declination (J2000) (2)
      integer*4     DE2m       (nr__) ! (arcmin) ? 2MASS declination (J2000) (2)
      real*4        DE2s       (nr__) ! (arcsec) ? 2MASS declination (J2000) (2)
      character*1   n_r2MASS   (nr__) ! [d] No obvious 2MASS association
      real*4        r2MASS     (nr__) ! (arcsec) ?=- Offset from 2MASS position (2)
      character*2   Radio      (nr__) ! [YNTWV -] Flag indicates whether any radio
*                                  continuum emission has been detected near
*                                  the MSX target (3)
      character*10  Date       (nr__) ! ("D/M/Y") Observation date
*Note (1): Sources identified as [MHL2007] GLLL.llll+BB.bbbb N in Simbad,
*     where N is the source number.
*Note (2): Coordinates and offset of the most likely 2MASS PSC source within
*     5" which is associated with the TIMMI2 source, if one exists. These
*     are only considered counterparts for angular separations <=2.4".
*Note (3): Flags as follows:
*      - = no observations have been made towards that target
*      Y = nearby detection
*      N = non-detection by Urquhart et al. (2007, Cat. J/A+A/461/11)
*     WY = results of nearby observations by Walsh et al. (1998,
*          Cat. J/MNRAS/301/640) only
*     WN = results of nearby observations by Walsh et al. (1998,
*          Cat. J/MNRAS/301/640) only
*     TY = nearby detection by Thompson et al. (2004A&A...415..627T)
*     VY = nearby detection by Van de Steene & Pottasch (1993,
*          Cat. J/A+A/274/895)

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

C  Loading file 'table2.dat'	! Observed targets

C  Format for file interpretation

    1 format(
     +  A17,1X,I1,1X,I2,1X,I2,1X,F5.2,A1,1X,A1,I2,1X,I2,1X,F4.1,1X,
     +  F5.2,1X,F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2,1X,I2,1X,I2,1X,F5.2,
     +  1X,A1,I2,1X,I2,1X,F4.1,A1,1X,F4.2,1X,A2,1X,A10)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,489
        read(1,'(A117)')ar__
        read(ar__,1)
     +  MSX6C(i__),Src(i__),RAh(i__),RAm(i__),RAs(i__),n_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),rMSX(i__),aFWHM(i__),
     +  bFWHM(i__),l_Flux(i__),Flux(i__),e_Flux(i__),RA2h(i__),
     +  RA2m(i__),RA2s(i__),DE2_(i__),DE2d(i__),DE2m(i__),DE2s(i__),
     +  n_r2MASS(i__),r2MASS(i__),Radio(i__),Date(i__)
        if (idig(ar__(46:50)).EQ.0) rMSX(i__) =  rNULL__
        if (idig(ar__(52:56)).EQ.0) aFWHM(i__) =  rNULL__
        if (idig(ar__(58:61)).EQ.0) bFWHM(i__) =  rNULL__
        if(ar__(70:73) .EQ. '') e_Flux(i__) = rNULL__
        if(ar__(75:76) .EQ. '') RA2h(i__) = iNULL__
        if(ar__(78:79) .EQ. '') RA2m(i__) = iNULL__
        if(ar__(81:85) .EQ. '') RA2s(i__) = rNULL__
        if(ar__(88:89) .EQ. '') DE2d(i__) = iNULL__
        if(ar__(91:92) .EQ. '') DE2m(i__) = iNULL__
        if(ar__(94:97) .EQ. '') DE2s(i__) = rNULL__
        if (idig(ar__(100:103)).EQ.0) r2MASS(i__) =  rNULL__
        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__),Src(i__),RAh(i__),RAm(i__),RAs(i__),n_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),rMSX(i__),aFWHM(i__),
     +  bFWHM(i__),l_Flux(i__),Flux(i__),e_Flux(i__),RA2h(i__),
     +  RA2m(i__),RA2s(i__),DE2_(i__),DE2d(i__),DE2m(i__),DE2s(i__),
     +  n_r2MASS(i__),r2MASS(i__),Radio(i__),Date(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
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