FORTRAN Generation
(/./ftp/cats/J/ApJ/562/446)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/562/446 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-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/ApJ/562/446       X-rays and protostars in Trifid nebula         (Rho+, 2001)
*================================================================================
*X-rays and protostars in the Trifid nebula.
*    Rho J., Corcoran M.F., Chu Y.-H., Reach W.T.
*   <Astrophys. J. 562, 446 (2001)>
*   =2001ApJ...562..446R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table13.dat'	! List of the 12 sources detected in the PSPC Image
                             of the Trifid nebula and infrared counterparts

      integer*4 nr__
      parameter (nr__=13)	! Number of records
      character*132 ar__   	! Full-size record

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

      integer*4     RXT         ! RXT designation
      integer*4     RAh         ! (h) Right ascension (J2000.0)
      integer*4     RAm         ! (min) Right ascension (J2000.0)
      real*4        RAs         ! (s) Right ascension (J2000.0)
      character*1   DE_         ! Declination sign (J2000.0)
      integer*4     DEd         ! (deg) Declination (J2000.0)
      integer*4     DEm         ! (arcmin) Declination (J2000.0)
      real*4        DEs         ! (arcsec) Declination (J2000.0)
      real*4        CR          ! (ct/s) Count Rate
      real*4        e_CR        ! (ct/s) rms uncertainty on CR
      real*4        Det         ! Detection (1{sigma})
      real*4        logLX       ! ([10-10W/m2]) ? X-ray luminosity
      character*1   Note        ! [ab] Individual notes (1)
      character*4   Type        ! Type of the 2MASS counterparts (2)
      real*4        dproj       ! (arcsec) ? Projected distance between the X-ray and
*                                        2MASS sources
      integer*4     RA2h        ! (h) ? 2MASS counterpart right ascension (J2000)
      integer*4     RA2m        ! (min) ? 2MASS counterpart right ascension (J2000)
      real*4        RA2s        ! (s) ? 2MASS counterpart right ascension (J2000)
      character*1   DE2_        ! 2MASS counterpart declination sign (J2000)
      integer*4     DE2d        ! (deg) ? 2MASS counterpart declination (J2000)
      integer*4     DE2m        ! (arcmin) ? 2MASS counterpart declination (J2000)
      real*4        DE2s        ! (arcsec) ? 2MASS counterpart Declination (J2000)
      real*4        Jmag        ! (mag) ? 2MASS counterpart J magnitude
      real*4        Hmag        ! (mag) ? 2MASS counterpart H magnitude
      real*4        Ksmag       ! (mag) ? 2MASS counterpart Ks magnitude
      character*24  Com         ! Comments (3)
*Note (1): Individual notes as follows:
*      a = RXT 8 is HD 164492 (O7 star) and/or YSO (TC1 in Cernicharo et al.,
*          1998Sci...282..462C), and see table4 for Spectral Fit Results 
*      b = RXT 11 also coincides with HD 313596 (B8 star)
*Note (2): Notes for the 2MASS sources as follows:
*    TTS = T Tauri star
*    YSO = massive young stellar object
*    red = red 2MASS star
*   Mult = Multiple
*Note (3): In the comments:
*   J="fill": the J-band photometry is measured in band-filled within
*        the aperture, indicating their photometric uncertainties are large.
*   High psf {Delta}{chi}^2^: the goodness of the fit of a point-spread
*        function is high, indicating the sources are either extended or
*        unresolved double sources.

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

C  Declarations for 'table2.dat'	! 2MASS young stellar object and T Tauri star
                             candidates in the Trifid nebula

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

      character*6   v_RCC2001_  ! Object name (YSO NN or TTS NN)
      character*22  v2MASS      ! 2MASS designation (1)
*Note (1): 2MASSI and 2MASSW indicate the Incremental Release and Working
*          Database catalogs, respectively.

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

C  Loading file 'table13.dat'	! List of the 12 sources detected in the PSPC Image
*                             of the Trifid nebula and infrared counterparts

C  Format for file interpretation

    1 format(
     +  4X,I2,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F6.4,1X,
     +  F6.4,1X,F3.1,1X,F5.2,1X,A1,1X,A4,1X,F4.1,1X,I2,1X,I2,1X,F4.1,
     +  1X,A1,I2,1X,I2,1X,F4.1,1X,F5.2,1X,F5.2,1X,F5.2,1X,A24)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table13.dat')
      write(6,*) '....Loading file: table13.dat'
      do i__=1,13
        read(1,'(A132)')ar__
        read(ar__,1)
     +  RXT,RAh,RAm,RAs,DE_,DEd,DEm,DEs,CR,e_CR,Det,logLX,Note,Type,
     +  dproj,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,Jmag,Hmag,Ksmag,Com
        if(ar__(50:54) .EQ. '') logLX = rNULL__
        if(ar__(63:66) .EQ. '') dproj = rNULL__
        if(ar__(68:69) .EQ. '') RA2h = iNULL__
        if(ar__(71:72) .EQ. '') RA2m = iNULL__
        if(ar__(74:77) .EQ. '') RA2s = rNULL__
        if(ar__(80:81) .EQ. '') DE2d = iNULL__
        if(ar__(83:84) .EQ. '') DE2m = iNULL__
        if(ar__(86:89) .EQ. '') DE2s = rNULL__
        if(ar__(91:95) .EQ. '') Jmag = rNULL__
        if(ar__(97:101) .EQ. '') Hmag = rNULL__
        if(ar__(103:107) .EQ. '') Ksmag = 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)
     +  RXT,RAh,RAm,RAs,DE_,DEd,DEm,DEs,CR,e_CR,Det,logLX,Note,Type,
     +  dproj,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,Jmag,Hmag,Ksmag,Com
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! 2MASS young stellar object and T Tauri star
*                             candidates in the Trifid nebula

C  Format for file interpretation

    2 format(A6,1X,A22)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,85
        read(1,'(A29)')ar__1
        read(ar__1,2)v_RCC2001_,v2MASS
c    ..............Just test output...........
        write(6,2)v_RCC2001_,v2MASS
c    .......End.of.Just test output...........
      end do
      close(1)

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