FORTRAN Generation
(/./ftp/cats/J/ApJ/676/944)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/676/944 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-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/676/944 GALEX and CFHTLS candidate tidal disruption events (Gezari+, 2008)
*================================================================================
*UV/Optical detections of candidate tidal disruption events by GALEX and CFHTLS.
*    Gezari S., Basa S., Martin D.C., Bazin G., Forster K., Milliard B.,
*    Halpern J.P., Friedman P.G., Morrissey P., Neff S.G., Schiminovich D.,
*    Seibert M., Small T., Wyder T.K.
*   <Astrophys. J., 676, 944-969 (2008)>
*   =2008ApJ...676..944G
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'sources.dat'	! UV variable sources with optical matches in
                             XMM-LSS (D1, 23 sources, table 2),
                             COSMOS (D2, 23 sources, table 3),
                             GROTH (D3, 32 sources, table 4),
                             CFHTLS (D4, 9 sources, table 5),

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

C  J2000 position composed of: RAdeg DEdeg
      character*5   Name       (nr__) ! Name (DN-NN)
      character*16  GALEX      (nr__) ! GALEX name (JHHMMSS.s+DDMMSS)
      real*8        RAdeg      (nr__) ! (deg) Right ascension in decimal degrees (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      character*1   l_FUV03    (nr__) ! Limit flag on FUV03
      real*4        FUV03      (nr__) ! (mag) ?=- GALEX FUV (135-175nm) magnitude in 2003
      real*4        e_FUV03    (nr__) ! (mag) ? rms uncertainty on FUV03
      character*1   l_FUV04    (nr__) ! Limit flag on FUV04
      real*4        FUV04      (nr__) ! (mag) GALEX FUV (135-175nm) magnitude in 2004
      real*4        e_FUV04    (nr__) ! (mag) ? rms uncertainty on FUV04
      character*1   l_FUV05    (nr__) ! Limit flag on FUV05
      real*4        FUV05      (nr__) ! (mag) ?=- GALEX FUV (135-175nm) magnitude in 2005
      real*4        e_FUV05    (nr__) ! (mag) ? rms uncertainty on FUV05
      character*1   l_FUV06    (nr__) ! Limit flag on FUV06
      real*4        FUV06      (nr__) ! (mag) GALEX FUV (135-175nm) magnitude in 2006
      real*4        e_FUV06    (nr__) ! (mag) ? rms uncertainty on FUV06
      character*1   l_FUV07    (nr__) ! Limit flag on FUV07
      real*4        FUV07      (nr__) ! (mag) ?=- GALEX FUV (135-175nm) magnitude in 2007
      real*4        e_FUV07    (nr__) ! (mag) ? rms uncertainty on FUV07
      real*4        sigma      (nr__) ! Factor times {sigma}(m) that the source varies
      character*1   FT         (nr__) ! [FT] Flare/Transient Type (G1)
      character*1   l_NUV03    (nr__) ! Limit flag on NUV03
      real*4        NUV03      (nr__) ! (mag) ?=- GALEX NUV (175-280nm) magnitude in 2003
      real*4        e_NUV03    (nr__) ! (mag) ? rms uncertainty on NUV03
      character*1   l_NUV04    (nr__) ! Limit flag on NUV04
      real*4        NUV04      (nr__) ! (mag) GALEX NUV (175-280nm) magnitude in 2004
      real*4        e_NUV04    (nr__) ! (mag) ? rms uncertainty on NUV04
      character*1   l_NUV05    (nr__) ! Limit flag on NUV05
      real*4        NUV05      (nr__) ! (mag) ?=- GALEX NUV (175-280nm) magnitude in 2005
      real*4        e_NUV05    (nr__) ! (mag) ? rms uncertainty on NUV05
      character*1   l_NUV06    (nr__) ! Limit flag on NUV06
      real*4        NUV06      (nr__) ! (mag) GALEX NUV (175-280nm) magnitude in 2006
      real*4        e_NUV06    (nr__) ! (mag) ? rms uncertainty on NUV06
      character*1   l_NUV07    (nr__) ! Limit flag on NUV07
      real*4        NUV07      (nr__) ! (mag) ?=- GALEX NUV (175-280nm) magnitude in 2007
      real*4        e_NUV07    (nr__) ! (mag) ? rms uncertainty on NUV07

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

C  Declarations for 'matches.dat'	! Optical matches to UV variable sources in
                             XMM-LSS (D1, table 6), COSMOS (D2, table 7),
                             GROTH (D3, table 8) and CFHTLS (D4, table 9)

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

      character*5   Name_1     (nr__1) ! Name (DN-NN)
      character*16  GALEX_1    (nr__1) ! GALEX name (JHHMMSS.s+DDMMSS)
      real*4        umag       (nr__1) ! (mag) SDSS u magnitude
      real*4        e_umag     (nr__1) ! (mag) rms uncertainty on umag
      real*4        gmag       (nr__1) ! (mag) SDSS g magnitude
      real*4        e_gmag     (nr__1) ! (mag) rms uncertainty on gmag
      real*4        rmag       (nr__1) ! (mag) SDSS r magnitude
      real*4        e_rmag     (nr__1) ! (mag) rms uncertainty on rmag
      real*4        imag       (nr__1) ! (mag) SDSS i magnitude
      real*4        e_imag     (nr__1) ! (mag) rms uncertainty on imag
      real*4        zmag       (nr__1) ! (mag) SDSS z magnitude
      real*4        e_zmag     (nr__1) ! (mag) rms uncertainty on zmag
      real*4        r1_2       (nr__1) ! (arcsec) Half-light radius
      real*4        Sep        (nr__1) ! (arcsec) Separation UV/optical
      character*3   Flag       (nr__1) ! [oxsg ] Source pecularities (G2)
      character*4   Class      (nr__1) ! Classification (1)
      real*4        z          (nr__1) ! ? Redshift
*Note (1): Classification as follows:
*    QSO = optically unresolved sources (r_1/2_<0.6") with g-r<0.6 and
*          u-g<1 are classified as quasars
*   STAR = optically unresolved sources with u-g>1.75 or g-r<0.6 and
*          u-g>1 are classified as stars
*    GAL = optically resolved sources (r_1/2_>0.6") are classified as galaxies
*    AGN = optically resolved sources with a hard X-ray detection or an
*          active galaxy spectrum are classified as active galactic nuclei

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

C  Declarations for 'table10.dat'	! Tidal disruption flare candidates

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

      character*5   Name_2     (nr__2) ! Name (DN-NN)
      character*16  GALEX_2    (nr__2) ! GALEX name (JHHMMSS.s+DDMMSS)
      character*1   FT_1       (nr__2) ! [FT] Flare Type (G1)
      character*1   Flag_1     (nr__2) ! [o] Source pecularities (G2)
      character*4   Template   (nr__2) ! Galaxy template from photo-z fitting
*                                   routine (1)
      real*4        zph1       (nr__2) ! Photometric redshift range
      real*4        zph2       (nr__2) ! Photometric redshift range
      real*4        zsp        (nr__2) ! ? Spectroscopic redshift
      character*6   Type       (nr__2) ! Spectral type (2)
*Note (1): Emission-line galaxies (either star-forming or Seyfert galaxies)
*     are labeled as "em".
*Note (2): Classes are:
*    Early = spectra with no emission lines (early-type galaxies)
*      Sy2 = spectra with diagnostic narrow-line ratios of
*            ([OIII]{lambda}5007)/(H{beta})>3  (Seyfert 2 galaxies)
*      Sy1 = spectra that show broad H{beta} emission (Seyfert 1 galaxies)

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

C  Declarations for 'table11.dat'	! Log of optical spectroscopic observations

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

      character*5   Name_3     (nr__3) ! Name (DN-NN)
      character*16  GALEX_3    (nr__3) ! GALEX name (JHHMMSS.s+DDMMSS)
      character*10  Date       (nr__3) ! ("YYYY/MM/DD") UT date
      character*8   Tel        (nr__3) ! Telescope
      character*5   Inst       (nr__3) ! Instrument
      real*4        Slit       (nr__3) ! (arcsec) Slit
      real*4        Dlambda    (nr__3) ! (0.1nm) Interval wavelength
      integer*4     Texp       (nr__3) ! (s) Exposure time
      real*4        z_1        (nr__3) ! Spectroscopic redshift
      character*1   l__OIII_Hb_(nr__3) ! Limit flag on [OIII/Hb]
      real*4        v_OIII_Hb_ (nr__3) ! ? [OIII]{lambda}5007)/(H{beta})
*                                           narrow-line ratio
      character*1   l_logL__OIII_(nr__3) ! Limit flag on logL([OIII)]
      real*4        logL__OIII_(nr__3) ! ([10-7W]) ? [OIII]{lambda}5007 luminosity

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

C  Loading file 'sources.dat'	! UV variable sources with optical matches in
*                             XMM-LSS (D1, 23 sources, table 2),
*                             COSMOS (D2, 23 sources, table 3),
*                             GROTH (D3, 32 sources, table 4),
*                             CFHTLS (D4, 9 sources, table 5),

C  Format for file interpretation

    1 format(
     +  A5,1X,A16,1X,F8.4,1X,F8.4,1X,A1,F5.2,1X,F4.2,1X,A1,F5.2,1X,
     +  F4.2,1X,A1,F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2,
     +  1X,F4.1,1X,A1,1X,A1,F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2,1X,A1,
     +  F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2,1X,A1,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'sources.dat')
      write(6,*) '....Loading file: sources.dat'
      do i__=1,87
        read(1,'(A167)')ar__
        read(ar__,1)
     +  Name(i__),GALEX(i__),RAdeg(i__),DEdeg(i__),l_FUV03(i__),
     +  FUV03(i__),e_FUV03(i__),l_FUV04(i__),FUV04(i__),e_FUV04(i__),
     +  l_FUV05(i__),FUV05(i__),e_FUV05(i__),l_FUV06(i__),FUV06(i__),
     +  e_FUV06(i__),l_FUV07(i__),FUV07(i__),e_FUV07(i__),sigma(i__),
     +  FT(i__),l_NUV03(i__),NUV03(i__),e_NUV03(i__),l_NUV04(i__),
     +  NUV04(i__),e_NUV04(i__),l_NUV05(i__),NUV05(i__),e_NUV05(i__),
     +  l_NUV06(i__),NUV06(i__),e_NUV06(i__),l_NUV07(i__),NUV07(i__),
     +  e_NUV07(i__)
        if (idig(ar__(43:47)).EQ.0) FUV03(i__) =  rNULL__
        if(ar__(49:52) .EQ. '') e_FUV03(i__) = rNULL__
        if(ar__(61:64) .EQ. '') e_FUV04(i__) = rNULL__
        if (idig(ar__(67:71)).EQ.0) FUV05(i__) =  rNULL__
        if(ar__(73:76) .EQ. '') e_FUV05(i__) = rNULL__
        if(ar__(85:88) .EQ. '') e_FUV06(i__) = rNULL__
        if (idig(ar__(91:95)).EQ.0) FUV07(i__) =  rNULL__
        if(ar__(97:100) .EQ. '') e_FUV07(i__) = rNULL__
        if (idig(ar__(110:114)).EQ.0) NUV03(i__) =  rNULL__
        if(ar__(116:119) .EQ. '') e_NUV03(i__) = rNULL__
        if(ar__(128:131) .EQ. '') e_NUV04(i__) = rNULL__
        if (idig(ar__(134:138)).EQ.0) NUV05(i__) =  rNULL__
        if(ar__(140:143) .EQ. '') e_NUV05(i__) = rNULL__
        if(ar__(152:155) .EQ. '') e_NUV06(i__) = rNULL__
        if (idig(ar__(158:162)).EQ.0) NUV07(i__) =  rNULL__
        if(ar__(164:167) .EQ. '') e_NUV07(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),GALEX(i__),RAdeg(i__),DEdeg(i__),l_FUV03(i__),
     +  FUV03(i__),e_FUV03(i__),l_FUV04(i__),FUV04(i__),e_FUV04(i__),
     +  l_FUV05(i__),FUV05(i__),e_FUV05(i__),l_FUV06(i__),FUV06(i__),
     +  e_FUV06(i__),l_FUV07(i__),FUV07(i__),e_FUV07(i__),sigma(i__),
     +  FT(i__),l_NUV03(i__),NUV03(i__),e_NUV03(i__),l_NUV04(i__),
     +  NUV04(i__),e_NUV04(i__),l_NUV05(i__),NUV05(i__),e_NUV05(i__),
     +  l_NUV06(i__),NUV06(i__),e_NUV06(i__),l_NUV07(i__),NUV07(i__),
     +  e_NUV07(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'matches.dat'	! Optical matches to UV variable sources in
*                             XMM-LSS (D1, table 6), COSMOS (D2, table 7),
*                             GROTH (D3, table 8) and CFHTLS (D4, table 9)

C  Format for file interpretation

    2 format(
     +  A5,1X,A16,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F3.1,1X,A3,1X,A4,1X,
     +  F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'matches.dat')
      write(6,*) '....Loading file: matches.dat'
      do i__=1,87
        read(1,'(A112)')ar__1
        read(ar__1,2)
     +  Name_1(i__),GALEX_1(i__),umag(i__),e_umag(i__),gmag(i__),
     +  e_gmag(i__),rmag(i__),e_rmag(i__),imag(i__),e_imag(i__),
     +  zmag(i__),e_zmag(i__),r1_2(i__),Sep(i__),Flag(i__),Class(i__),
     +  z(i__)
        if(ar__1(108:112) .EQ. '') z(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1(i__),GALEX_1(i__),umag(i__),e_umag(i__),gmag(i__),
     +  e_gmag(i__),rmag(i__),e_rmag(i__),imag(i__),e_imag(i__),
     +  zmag(i__),e_zmag(i__),r1_2(i__),Sep(i__),Flag(i__),Class(i__),
     +  z(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table10.dat'	! Tidal disruption flare candidates

C  Format for file interpretation

    3 format(
     +  A5,1X,A16,1X,A1,1X,A1,1X,A4,1X,F4.2,1X,F4.2,1X,F6.4,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table10.dat')
      write(6,*) '....Loading file: table10.dat'
      do i__=1,11
        read(1,'(A55)')ar__2
        read(ar__2,3)
     +  Name_2(i__),GALEX_2(i__),FT_1(i__),Flag_1(i__),Template(i__),
     +  zph1(i__),zph2(i__),zsp(i__),Type(i__)
        if(ar__2(43:48) .EQ. '') zsp(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name_2(i__),GALEX_2(i__),FT_1(i__),Flag_1(i__),Template(i__),
     +  zph1(i__),zph2(i__),zsp(i__),Type(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table11.dat'	! Log of optical spectroscopic observations

C  Format for file interpretation

    4 format(
     +  A5,1X,A16,1X,A10,1X,A8,1X,A5,1X,F3.1,1X,F4.1,1X,I4,1X,F6.4,1X,
     +  A1,F3.1,1X,A1,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table11.dat')
      write(6,*) '....Loading file: table11.dat'
      do i__=1,8
        read(1,'(A80)')ar__3
        read(ar__3,4)
     +  Name_3(i__),GALEX_3(i__),Date(i__),Tel(i__),Inst(i__),
     +  Slit(i__),Dlambda(i__),Texp(i__),z_1(i__),l__OIII_Hb_(i__),
     +  v_OIII_Hb_(i__),l_logL__OIII_(i__),logL__OIII_(i__)
        if(ar__3(72:74) .EQ. '') v_OIII_Hb_(i__) = rNULL__
        if(ar__3(77:80) .EQ. '') logL__OIII_(i__) = rNULL__
c    ..............Just test output...........
        write(6,4)
     +  Name_3(i__),GALEX_3(i__),Date(i__),Tel(i__),Inst(i__),
     +  Slit(i__),Dlambda(i__),Texp(i__),z_1(i__),l__OIII_Hb_(i__),
     +  v_OIII_Hb_(i__),l_logL__OIII_(i__),logL__OIII_(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