FORTRAN Generation
(/./ftp/cats/J/ApJ/687/230)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/687/230 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-Mar-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/ApJ/687/230            Survey of M31 with Spitzer               (Mould+, 2008)
*================================================================================
*A point-source survey of M31 with the Spitzer Space Telescope.
*    Mould J., Barmby P., Gordon K., Willner S.P., Ashby M.L.N., Gehrz R.D.,
*    Humphreys R., Woodward C.E.
*   <Astrophys. J., 687, 230-241 (2008)>
*   =2008ApJ...687..230M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Photometry of the infrared brightest stars

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  IRAC       (nr__) ! Identification (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg      (nr__) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      real*4        v3_6mag    (nr__) ! (mag) Spitzer/IRAC 3.6 micron band magnitude
      real*4        e_3_6mag   (nr__) ! (mag) Error in 3.6mag
      real*4        v4_5mag    (nr__) ! (mag) ? Spitzer/IRAC 4.5 micron band magnitude
      real*4        e_4_5mag   (nr__) ! (mag) ? Error in 4.5mag
      real*4        v5_8mag    (nr__) ! (mag) ? Spitzer/IRAC 5.8 micron band magnitude
      real*4        e_5_8mag   (nr__) ! (mag) ? Error in 5.8mag
      real*4        v8_0mag    (nr__) ! (mag) Spitzer/IRAC 8.0 micron band magnitude
      real*4        e_8_0mag   (nr__) ! (mag) Error in 8.0mag

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

C  Declarations for 'table2.dat'	! 2MASS 6X matches

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     v2MASS     (nr__1) ! 2MASS 6X identification number
      real*8        RAdeg_1    (nr__1) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination in decimal degrees (J2000)
      real*4        Jmag       (nr__1) ! (mag) 2MASS J band magnitude
      real*4        Hmag       (nr__1) ! (mag) 2MASS H band magnitude
      real*4        Ksmag      (nr__1) ! (mag) 2MASS Ks band magnitude
      real*4        v3_6mag_1  (nr__1) ! (mag) Spitzer/IRAC 3.6 micron band magnitude
      real*4        v4_5mag_1  (nr__1) ! (mag) ? Spitzer/IRAC 4.5 micron band magnitude
      real*4        v5_8mag_1  (nr__1) ! (mag) ? Spitzer/IRAC 5.8 micron band magnitude
      real*4        v8_0mag_1  (nr__1) ! (mag) Spitzer/IRAC 8.0 micron band magnitude

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

C  Declarations for 'table3.dat'	! Long period variables (LPV) matches

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

      integer*4     v_MSH2004_ (nr__2) ! Mould, Saha, & Hughes 2004,
*                                  Cat. J/ApJS/154/623 identification number
      real*4        Jmag_1     (nr__2) ! (mag) ? The J Johnson band magnitude
      real*4        Hmag_1     (nr__2) ! (mag) ? The H Johnson band magnitude
      real*4        Kmag       (nr__2) ! (mag) ? The K Johnson band magnitude
      real*4        v3_6mag_2  (nr__2) ! (mag) Spitzer/IRAC 3.6 micron band magnitude
      real*4        v4_5mag_2  (nr__2) ! (mag) ? Spitzer/IRAC 4.5 micron band magnitude
      real*4        v5_8mag_2  (nr__2) ! (mag) ? Spitzer/IRAC 5.8 micron band magnitude
      real*4        v8_0mag_2  (nr__2) ! (mag) ? Spitzer/IRAC 8.0 micron band magnitude

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

C  Declarations for 'table4.dat'	! MIPS 24 micron sources

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  SST        (nr__3) ! The SSTM1M311 identification
*                                  (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_2    (nr__3) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg_2    (nr__3) ! (deg) Declination in decimal degrees (J2000)
      real*4        v3_6mag_3  (nr__3) ! (mag) Spitzer/IRAC 3.6 micron band magnitude
      real*4        v4_5mag_3  (nr__3) ! (mag) ? Spitzer/IRAC 4.5 micron band magnitude
      real*4        v5_8mag_3  (nr__3) ! (mag) ? Spitzer/IRAC 5.8 micron band magnitude
      real*4        v8_0mag_3  (nr__3) ! (mag) Spitzer/IRAC 8.0 micron band magnitude
      real*4        v24mag     (nr__3) ! (mag) Spitzer/MIPS 24 micron band magnitude

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

C  Loading file 'table1.dat'	! Photometry of the infrared brightest stars

C  Format for file interpretation

    1 format(
     +  A19,1X,F8.5,1X,F8.5,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,426
        read(1,'(A81)')ar__
        read(ar__,1)
     +  IRAC(i__),RAdeg(i__),DEdeg(i__),v3_6mag(i__),e_3_6mag(i__),
     +  v4_5mag(i__),e_4_5mag(i__),v5_8mag(i__),e_5_8mag(i__),
     +  v8_0mag(i__),e_8_0mag(i__)
        if(ar__(50:54) .EQ. '') v4_5mag(i__) = rNULL__
        if(ar__(56:59) .EQ. '') e_4_5mag(i__) = rNULL__
        if(ar__(61:65) .EQ. '') v5_8mag(i__) = rNULL__
        if(ar__(67:70) .EQ. '') e_5_8mag(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  IRAC(i__),RAdeg(i__),DEdeg(i__),v3_6mag(i__),e_3_6mag(i__),
     +  v4_5mag(i__),e_4_5mag(i__),v5_8mag(i__),e_5_8mag(i__),
     +  v8_0mag(i__),e_8_0mag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! 2MASS 6X matches

C  Format for file interpretation

    2 format(
     +  I4,1X,F8.5,1X,F8.5,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,106
        read(1,'(A64)')ar__1
        read(ar__1,2)
     +  v2MASS(i__),RAdeg_1(i__),DEdeg_1(i__),Jmag(i__),Hmag(i__),
     +  Ksmag(i__),v3_6mag_1(i__),v4_5mag_1(i__),v5_8mag_1(i__),
     +  v8_0mag_1(i__)
        if(ar__1(48:52) .EQ. '') v4_5mag_1(i__) = rNULL__
        if(ar__1(54:58) .EQ. '') v5_8mag_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v2MASS(i__),RAdeg_1(i__),DEdeg_1(i__),Jmag(i__),Hmag(i__),
     +  Ksmag(i__),v3_6mag_1(i__),v4_5mag_1(i__),v5_8mag_1(i__),
     +  v8_0mag_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Long period variables (LPV) matches

C  Format for file interpretation

    3 format(
     +  I5,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,831
        read(1,'(A47)')ar__2
        read(ar__2,3)
     +  v_MSH2004_(i__),Jmag_1(i__),Hmag_1(i__),Kmag(i__),
     +  v3_6mag_2(i__),v4_5mag_2(i__),v5_8mag_2(i__),v8_0mag_2(i__)
        if(ar__2(7:11) .EQ. '') Jmag_1(i__) = rNULL__
        if(ar__2(13:17) .EQ. '') Hmag_1(i__) = rNULL__
        if(ar__2(19:23) .EQ. '') Kmag(i__) = rNULL__
        if(ar__2(31:35) .EQ. '') v4_5mag_2(i__) = rNULL__
        if(ar__2(37:41) .EQ. '') v5_8mag_2(i__) = rNULL__
        if(ar__2(43:47) .EQ. '') v8_0mag_2(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  v_MSH2004_(i__),Jmag_1(i__),Hmag_1(i__),Kmag(i__),
     +  v3_6mag_2(i__),v4_5mag_2(i__),v5_8mag_2(i__),v8_0mag_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! MIPS 24 micron sources

C  Format for file interpretation

    4 format(
     +  A19,1X,F8.5,1X,F8.5,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,599
        read(1,'(A67)')ar__3
        read(ar__3,4)
     +  SST(i__),RAdeg_2(i__),DEdeg_2(i__),v3_6mag_3(i__),
     +  v4_5mag_3(i__),v5_8mag_3(i__),v8_0mag_3(i__),v24mag(i__)
        if(ar__3(45:49) .EQ. '') v4_5mag_3(i__) = rNULL__
        if(ar__3(51:55) .EQ. '') v5_8mag_3(i__) = rNULL__
c    ..............Just test output...........
        write(6,4)
     +  SST(i__),RAdeg_2(i__),DEdeg_2(i__),v3_6mag_3(i__),
     +  v4_5mag_3(i__),v5_8mag_3(i__),v8_0mag_3(i__),v24mag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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