FORTRAN Generation
(/./ftp/cats/J/ApJ/663/1149)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/663/1149 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-10
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/663/1149    Spitzer survey of Serpens YSO population    (Harvey+, 2007)
*================================================================================
*The Spitzer c2d survey of large, nearby, interstellar clouds.
*IX. The Serpens YSO population as observed with IRAC and MIPS.
*    Harvey P., Merin B., Huard T.L., Rebull L.M., Chapman N., Evans II N.J.,
*    Myers P.C.
*   <Astrophys. J., 663, 1149-1173 (2007)>
*   =2007ApJ...663.1149H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! YSOs in Serpens

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

      integer*4     v_HMH2007_ (nr__) ! Running identification number
      character*1   n__HMH2007_(nr__) ! [b] Possible AGB (1)
      character*16  SSTc2dJ    (nr__) ! Object name (HHMMSSss+DDMMSSs) (G1)
      character*16  PName      (nr__) ! Previous name (G2)
      real*8        F3_6um     (nr__) ! (mJy) ?=- IRAC 3.6 micron flux density
      real*8        e_F3_6um   (nr__) ! (mJy) ? Uncertainty in F3.6um
      real*8        F4_5um     (nr__) ! (mJy) ?=- IRAC 4.5 micron flux density
      real*4        e_F4_5um   (nr__) ! (mJy) ? Uncertainty in F4.5um
      real*8        F5_8um     (nr__) ! (mJy) ?=- IRAC 5.8 micron flux density
      real*4        e_F5_8um   (nr__) ! (mJy) ? Uncertainty in F5.8um
      real*8        F8um       (nr__) ! (mJy) ?=- IRAC 8.0 micron flux density
      real*4        e_F8um     (nr__) ! (mJy) ? Uncertainty in F8um
      real*8        F24um      (nr__) ! (mJy) ?=- MIPS 24.0 micron flux density
      real*8        e_F24um    (nr__) ! (mJy) ? Uncertainty in F24um
      real*8        F70um      (nr__) ! (mJy) ?=- MIPS 70.0 micron flux density
      real*4        e_F70um    (nr__) ! (mJy) ? Uncertainty in F70um
*Note (1): b = May be AGB star, based on A_v_ derived from optical spectrum.

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

C  Declarations for 'table3.dat'	! YSO candidates in Serpens without
                              four-band IRAC observations

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

      integer*4     v_HMH2007__1(nr__1) ! Running identification number
      character*1   n__HMH2007__1(nr__1) ! [b] Possible AGB (1)
      character*16  SSTc2dJ_1  (nr__1) ! Object name (HHMMSSss+DDMMSSs) (G1)
      character*16  PName_1    (nr__1) ! Previous name (G2)
      real*8        F3_6um_1   (nr__1) ! (mJy) ?=- IRAC 3.6 micron flux density
      real*8        e_F3_6um_1 (nr__1) ! (mJy) ? Uncertainty in F3.6um
      real*8        F4_5um_1   (nr__1) ! (mJy) ?=- IRAC 4.5 micron flux density
      real*4        e_F4_5um_1 (nr__1) ! (mJy) ? Uncertainty in F4.5um
      real*8        F5_8um_1   (nr__1) ! (mJy) ?=- IRAC 5.8 micron flux density
      real*4        e_F5_8um_1 (nr__1) ! (mJy) ? Uncertainty in F5.8um
      real*8        F8um_1     (nr__1) ! (mJy) ?=- IRAC 8.0 micron flux density
      real*4        e_F8um_1   (nr__1) ! (mJy) ? Uncertainty in F8um
      real*8        F24um_1    (nr__1) ! (mJy) ?=- MIPS 24.0 micron flux density
      real*8        e_F24um_1  (nr__1) ! (mJy) ? Uncertainty in F24um
      real*8        F70um_1    (nr__1) ! (mJy) ?=- MIPS 70.0 micron flux density
      real*4        e_F70um_1  (nr__1) ! (mJy) ? Uncertainty in F70um
*Note (1): b = May be AGB star, based on A_v_ derived from optical spectrum.

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

C  Declarations for 'table4.dat'	! Matching Spitzer sources/fluxes for previously
                              identified IR sources in Serpens

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

      character*14  Name       (nr__2) ! Source identification (G2)
      character*16  SSTc2dJ_2  (nr__2) ! Spitzer name (HHMMSSss+DDMMSSs) (G1)
      character*1   l_F3_6um   (nr__2) ! Limit flag on F3.6um
      real*8        F3_6um_2   (nr__2) ! (mJy) ? IRAC 3.6 micron flux density
      real*8        e_F3_6um_2 (nr__2) ! (mJy) ? Uncertainty in F3.6um
      character*1   l_F4_5um   (nr__2) ! Limit flag on F3.6um
      real*8        F4_5um_2   (nr__2) ! (mJy) ? IRAC 4.5 micron flux density
      real*8        e_F4_5um_2 (nr__2) ! (mJy) ? Uncertainty in F4.5um
      character*1   l_F5_8um   (nr__2) ! Limit flag on F3.6um
      real*8        F5_8um_2   (nr__2) ! (mJy) ? IRAC 5.8 micron flux density
      real*8        e_F5_8um_2 (nr__2) ! (mJy) ? Uncertainty in F5.8um
      character*1   l_F8um     (nr__2) ! Limit flag on F3.6um
      real*8        F8um_2     (nr__2) ! (mJy) ? IRAC 8.0 micron flux density
      real*8        e_F8um_2   (nr__2) ! (mJy) ? Uncertainty in F8um
      character*1   l_F24um    (nr__2) ! Limit flag on F3.6um
      real*8        F24um_2    (nr__2) ! (mJy) ? MIPS 24.0 micron flux density
      real*8        e_F24um_2  (nr__2) ! (mJy) ? Uncertainty in F24um
      real*8        F70um_2    (nr__2) ! (mJy) ? MIPS 70.0 micron flux density
      real*4        e_F70um_2  (nr__2) ! (mJy) ? Uncertainty in F70um

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

C  Declarations for 'table7.dat'	! Disk modeling results in class II sources

      integer*4 nr__3
      parameter (nr__3=130)	! Number of records
      character*35 ar__3  	! Full-size record

      integer*4     v_HMH2007__2(nr__3) ! Star identification number
      character*2   SED        (nr__3) ! Spectral Energy Distribution type (1)
      real*4        AV         (nr__3) ! (mag) Extinction in the V band
      real*4        LStar      (nr__3) ! (solLum) Stellar luminosity
      real*4        LD_LS      (nr__3) ! The disk to star luminosity ratio
      real*4        Turnoff    (nr__3) ! (um) Wavelength at which the infrared excess begins
      real*4        Excess     (nr__3) ! ?=-99.0 Slope of the infrared excess (2)
*Note (1): SED type defined as follows:
*      T = SED identical to a Classical T Tauri star, within the errors
*      L = SED with lower fluxes at some wavelengths than a Classical T Tau star
*      H = SED with larger fluxes at some wavelengths than a Classical T Tau star
*     LU = photospheric fluxes up to around 8 micron but then a sudden
*          jump at longer wavelengths to the levels of a T-Tauri disk.
*Note (2): Starting at the last wavelength where the observed flux is
*     photospheric ({lambda}_excess_).

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

C  Declarations for 'table8.dat'	! Disk modeling results in class III sources

      integer*4 nr__4
      parameter (nr__4=39)	! Number of records
      character*35 ar__4  	! Full-size record

      integer*4     v_HMH2007__3(nr__4) ! Star identification number
      character*2   SED_1      (nr__4) ! Spectral Energy Distribution type (1)
      real*4        AV_1       (nr__4) ! (mag) Extinction in the V band
      real*4        LStar_1    (nr__4) ! (solLum) Stellar luminosity
      real*4        LD_LS_1    (nr__4) ! The disk to star luminosity ratio
      real*4        Turnoff_1  (nr__4) ! (um) Wavelength at which the infrared excess begins
      real*4        Excess_1   (nr__4) ! ?=-99.0 Slope of the infrared excess (2)
*Note (1): SED type defined as follows:
*      T = SED identical to a Classical T Tauri star, within the errors
*      L = SED with lower fluxes at some wavelengths than a Classical T Tau star
*      H = SED with larger fluxes at some wavelengths than a Classical T Tau star
*     LU = photospheric fluxes up to around 8 micron but then a sudden
*          jump at longer wavelengths to the levels of a T-Tauri disk.
*Note (2): Starting at the last wavelength where the observed flux is
*     photospheric ({lambda}_excess_).

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

C  Loading file 'table2.dat'	! YSOs in Serpens

C  Format for file interpretation

    1 format(
     +  I3,1X,A1,1X,A16,1X,A16,1X,F8.3,1X,F7.3,1X,F7.2,1X,F6.2,1X,
     +  F7.2,1X,F6.2,1X,F7.2,1X,F6.2,1X,F7.2,1X,F7.2,1X,F7.1,1X,F6.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,235
        read(1,'(A132)')ar__
        read(ar__,1)
     +  v_HMH2007_(i__),n__HMH2007_(i__),SSTc2dJ(i__),PName(i__),
     +  F3_6um(i__),e_F3_6um(i__),F4_5um(i__),e_F4_5um(i__),
     +  F5_8um(i__),e_F5_8um(i__),F8um(i__),e_F8um(i__),F24um(i__),
     +  e_F24um(i__),F70um(i__),e_F70um(i__)
        if (idig(ar__(41:48)).EQ.0) F3_6um(i__) =  rNULL__
        if(ar__(50:56) .EQ. '') e_F3_6um(i__) = rNULL__
        if (idig(ar__(58:64)).EQ.0) F4_5um(i__) =  rNULL__
        if(ar__(66:71) .EQ. '') e_F4_5um(i__) = rNULL__
        if (idig(ar__(73:79)).EQ.0) F5_8um(i__) =  rNULL__
        if(ar__(81:86) .EQ. '') e_F5_8um(i__) = rNULL__
        if (idig(ar__(88:94)).EQ.0) F8um(i__) =  rNULL__
        if(ar__(96:101) .EQ. '') e_F8um(i__) = rNULL__
        if (idig(ar__(103:109)).EQ.0) F24um(i__) =  rNULL__
        if(ar__(111:117) .EQ. '') e_F24um(i__) = rNULL__
        if (idig(ar__(119:125)).EQ.0) F70um(i__) =  rNULL__
        if(ar__(127:132) .EQ. '') e_F70um(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  v_HMH2007_(i__),n__HMH2007_(i__),SSTc2dJ(i__),PName(i__),
     +  F3_6um(i__),e_F3_6um(i__),F4_5um(i__),e_F4_5um(i__),
     +  F5_8um(i__),e_F5_8um(i__),F8um(i__),e_F8um(i__),F24um(i__),
     +  e_F24um(i__),F70um(i__),e_F70um(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! YSO candidates in Serpens without
*                              four-band IRAC observations

C  Format for file interpretation

    2 format(
     +  I3,1X,A1,1X,A16,1X,A16,1X,F8.3,1X,F7.3,1X,F7.2,1X,F6.2,1X,
     +  F7.2,1X,F6.2,1X,F7.2,1X,F6.2,1X,F7.2,1X,F7.2,1X,F7.1,1X,F6.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,51
        read(1,'(A132)')ar__1
        read(ar__1,2)
     +  v_HMH2007__1(i__),n__HMH2007__1(i__),SSTc2dJ_1(i__),
     +  PName_1(i__),F3_6um_1(i__),e_F3_6um_1(i__),F4_5um_1(i__),
     +  e_F4_5um_1(i__),F5_8um_1(i__),e_F5_8um_1(i__),F8um_1(i__),
     +  e_F8um_1(i__),F24um_1(i__),e_F24um_1(i__),F70um_1(i__),
     +  e_F70um_1(i__)
        if (idig(ar__1(41:48)).EQ.0) F3_6um_1(i__) =  rNULL__
        if(ar__1(50:56) .EQ. '') e_F3_6um_1(i__) = rNULL__
        if (idig(ar__1(58:64)).EQ.0) F4_5um_1(i__) =  rNULL__
        if(ar__1(66:71) .EQ. '') e_F4_5um_1(i__) = rNULL__
        if (idig(ar__1(73:79)).EQ.0) F5_8um_1(i__) =  rNULL__
        if(ar__1(81:86) .EQ. '') e_F5_8um_1(i__) = rNULL__
        if (idig(ar__1(88:94)).EQ.0) F8um_1(i__) =  rNULL__
        if(ar__1(96:101) .EQ. '') e_F8um_1(i__) = rNULL__
        if (idig(ar__1(103:109)).EQ.0) F24um_1(i__) =  rNULL__
        if(ar__1(111:117) .EQ. '') e_F24um_1(i__) = rNULL__
        if (idig(ar__1(119:125)).EQ.0) F70um_1(i__) =  rNULL__
        if(ar__1(127:132) .EQ. '') e_F70um_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v_HMH2007__1(i__),n__HMH2007__1(i__),SSTc2dJ_1(i__),
     +  PName_1(i__),F3_6um_1(i__),e_F3_6um_1(i__),F4_5um_1(i__),
     +  e_F4_5um_1(i__),F5_8um_1(i__),e_F5_8um_1(i__),F8um_1(i__),
     +  e_F8um_1(i__),F24um_1(i__),e_F24um_1(i__),F70um_1(i__),
     +  e_F70um_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Matching Spitzer sources/fluxes for previously
*                              identified IR sources in Serpens

C  Format for file interpretation

    3 format(
     +  A14,1X,A16,1X,A1,F8.3,1X,F7.3,1X,A1,F8.3,1X,F7.3,1X,A1,F8.3,
     +  1X,F7.3,1X,A1,F8.3,1X,F7.3,1X,A1,F7.2,1X,F7.2,1X,F7.1,1X,F6.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,373
        read(1,'(A135)')ar__2
        read(ar__2,3)
     +  Name(i__),SSTc2dJ_2(i__),l_F3_6um(i__),F3_6um_2(i__),
     +  e_F3_6um_2(i__),l_F4_5um(i__),F4_5um_2(i__),e_F4_5um_2(i__),
     +  l_F5_8um(i__),F5_8um_2(i__),e_F5_8um_2(i__),l_F8um(i__),
     +  F8um_2(i__),e_F8um_2(i__),l_F24um(i__),F24um_2(i__),
     +  e_F24um_2(i__),F70um_2(i__),e_F70um_2(i__)
        if(ar__2(34:41) .EQ. '') F3_6um_2(i__) = rNULL__
        if(ar__2(43:49) .EQ. '') e_F3_6um_2(i__) = rNULL__
        if(ar__2(52:59) .EQ. '') F4_5um_2(i__) = rNULL__
        if(ar__2(61:67) .EQ. '') e_F4_5um_2(i__) = rNULL__
        if(ar__2(70:77) .EQ. '') F5_8um_2(i__) = rNULL__
        if(ar__2(79:85) .EQ. '') e_F5_8um_2(i__) = rNULL__
        if(ar__2(88:95) .EQ. '') F8um_2(i__) = rNULL__
        if(ar__2(97:103) .EQ. '') e_F8um_2(i__) = rNULL__
        if(ar__2(106:112) .EQ. '') F24um_2(i__) = rNULL__
        if(ar__2(114:120) .EQ. '') e_F24um_2(i__) = rNULL__
        if(ar__2(122:128) .EQ. '') F70um_2(i__) = rNULL__
        if(ar__2(130:135) .EQ. '') e_F70um_2(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name(i__),SSTc2dJ_2(i__),l_F3_6um(i__),F3_6um_2(i__),
     +  e_F3_6um_2(i__),l_F4_5um(i__),F4_5um_2(i__),e_F4_5um_2(i__),
     +  l_F5_8um(i__),F5_8um_2(i__),e_F5_8um_2(i__),l_F8um(i__),
     +  F8um_2(i__),e_F8um_2(i__),l_F24um(i__),F24um_2(i__),
     +  e_F24um_2(i__),F70um_2(i__),e_F70um_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! Disk modeling results in class II sources

C  Format for file interpretation

    4 format(I3,1X,A2,1X,F4.1,1X,F6.2,1X,F5.3,1X,F4.1,1X,F5.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,130
        read(1,'(A35)')ar__3
        read(ar__3,4)
     +  v_HMH2007__2(i__),SED(i__),AV(i__),LStar(i__),LD_LS(i__),
     +  Turnoff(i__),Excess(i__)
c    ..............Just test output...........
        write(6,4)
     +  v_HMH2007__2(i__),SED(i__),AV(i__),LStar(i__),LD_LS(i__),
     +  Turnoff(i__),Excess(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table8.dat'	! Disk modeling results in class III sources

C  Format for file interpretation

    5 format(I3,1X,A2,1X,F4.1,1X,F6.2,1X,F5.3,1X,F4.1,1X,F5.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table8.dat')
      write(6,*) '....Loading file: table8.dat'
      do i__=1,39
        read(1,'(A35)')ar__4
        read(ar__4,5)
     +  v_HMH2007__3(i__),SED_1(i__),AV_1(i__),LStar_1(i__),
     +  LD_LS_1(i__),Turnoff_1(i__),Excess_1(i__)
c    ..............Just test output...........
        write(6,5)
     +  v_HMH2007__3(i__),SED_1(i__),AV_1(i__),LStar_1(i__),
     +  LD_LS_1(i__),Turnoff_1(i__),Excess_1(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