FORTRAN Generation
(/./ftp/cats/J/AJ/138/598)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/138/598 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/AJ/138/598        NUV sources in Hubble Ultra Deep Field   (Voyer+, 2009)
*================================================================================
*Near-ultraviolet sources in the Hubble Ultra Deep Field: the catalog.
*    Voyer E.N., De Mello D.F., Siana B., Gardner J.P., Quirk C., Teplitz H.I.
*   <Astron. J., 138, 598-605 (2009)>
*   =2009AJ....138..598V
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! UDF U-band sources

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

C  J2000 position composed of: RAdeg DEdeg
      real*8        RAdeg      (nr__) ! (deg) Right ascension in decimal degrees (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      character*3   Note       (nr__) ! Note (1)
      real*4        Umag       (nr__) ! (mag) GOODS U magnitude (AB)
      real*4        e_Umag     (nr__) ! (mag) rms uncertainty on Umag
      real*4        FUVh       (nr__) ! (mag) ?=- HST/SBC F150LP magnitude (161nm) (AB)
      real*4        e_FUVh     (nr__) ! (mag) ?=- rms uncertainty on FUVlmag
      real*4        Bmag       (nr__) ! (mag) ?=- GOODS B magnitude (AB)
      real*4        e_Bmag     (nr__) ! (mag) ?=- rms uncertainty on Bmag
      real*4        Vmag       (nr__) ! (mag) ?=- GOODS V magnitude (AB)
      real*4        e_Vmag     (nr__) ! (mag) ?=- rms uncertainty on Vmag
      real*4        imag       (nr__) ! (mag) ?=- GOODS i magnitude (AB)
      real*4        e_imag     (nr__) ! (mag) ?=- rms uncertainty on imag
      real*4        zmag       (nr__) ! (mag) GOODS z magnitude (AB)
      real*4        e_zmag     (nr__) ! (mag) rms uncertainty on zmag
      real*4        NUVg       (nr__) ! (mag) ?=- GALEX NUV magnitude (231nm) (AB)
      real*4        e_NUVg     (nr__) ! (mag) ?=- rms uncertainty on NUVg
      real*4        FUVg       (nr__) ! (mag) ?=- GALEX FUV magnitude (269nm) (AB)
      real*4        e_FUVg     (nr__) ! (mag) ?=- rms uncertainty on FUVg
      real*4        zph        (nr__) ! ?=- Photometric redshift
      real*4        zsp        (nr__) ! ?=- GOODS spectroscopic redshift
      real*4        Type       (nr__) ! Galaxy type (2)
*Note (1): Notes as follows:
*   a = X-ray source Koekemoer et al. (2004ApJ...600L.123K)
*   b = Source is outside the UDF footprint
*   c = Confusion in GALEX image
*   d = Star
*Note (2): Spectral types from the GOODS B-selected catalog based on
*     spectral energy distributions (SED) from Coleman et al.
*     (1980ApJS...43..393C) and Kinney et al. (1996ApJ...467...38K).
*   * Type 1 galaxies are early-types (E, S0, and Sa),
*   * Type 2 are Sbc,
*   * Type 3 are Scd,
*   * type 4 are irregulars,
*   * types 5 and 6 are starbursts SB1 and SB2.

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

C  Loading file 'table1.dat'	! UDF U-band sources

C  Format for file interpretation

    1 format(
     +  F10.7,1X,F11.7,A3,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,F6.4,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,96
        read(1,'(A130)')ar__
        read(ar__,1)
     +  RAdeg(i__),DEdeg(i__),Note(i__),Umag(i__),e_Umag(i__),
     +  FUVh(i__),e_FUVh(i__),Bmag(i__),e_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),imag(i__),e_imag(i__),zmag(i__),e_zmag(i__),
     +  NUVg(i__),e_NUVg(i__),FUVg(i__),e_FUVg(i__),zph(i__),zsp(i__),
     +  Type(i__)
        if (idig(ar__(38:42)).EQ.0) FUVh(i__) =  rNULL__
        if (idig(ar__(44:47)).EQ.0) e_FUVh(i__) =  rNULL__
        if (idig(ar__(49:53)).EQ.0) Bmag(i__) =  rNULL__
        if (idig(ar__(55:58)).EQ.0) e_Bmag(i__) =  rNULL__
        if (idig(ar__(60:64)).EQ.0) Vmag(i__) =  rNULL__
        if (idig(ar__(66:69)).EQ.0) e_Vmag(i__) =  rNULL__
        if (idig(ar__(71:75)).EQ.0) imag(i__) =  rNULL__
        if (idig(ar__(77:80)).EQ.0) e_imag(i__) =  rNULL__
        if (idig(ar__(93:97)).EQ.0) NUVg(i__) =  rNULL__
        if (idig(ar__(99:102)).EQ.0) e_NUVg(i__) =  rNULL__
        if (idig(ar__(104:108)).EQ.0) FUVg(i__) =  rNULL__
        if (idig(ar__(110:113)).EQ.0) e_FUVg(i__) =  rNULL__
        if (idig(ar__(115:118)).EQ.0) zph(i__) =  rNULL__
        if (idig(ar__(120:125)).EQ.0) zsp(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  RAdeg(i__),DEdeg(i__),Note(i__),Umag(i__),e_Umag(i__),
     +  FUVh(i__),e_FUVh(i__),Bmag(i__),e_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),imag(i__),e_imag(i__),zmag(i__),e_zmag(i__),
     +  NUVg(i__),e_NUVg(i__),FUVg(i__),e_FUVg(i__),zph(i__),zsp(i__),
     +  Type(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