FORTRAN Generation
(/./ftp/cats/II/373)

Conversion of standardized ReadMe file for file /./ftp/cats/II/373 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 2026-Jun-15
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. II/373         The fourth UltraVISTA data release (DR4)         (Moneti+, 2019)
*================================================================================
*The fourth Deep/Ultra-Deep Near-IR Survey of the COSMOS Field (Ultra-VISTA)
*data release.
*    Moneti A., McCracken H.J., Hudelot W., Rouberol O., Herent O., Mellier Y.,
*    Dunlop J., Le Fevre O., Franx M., Fynbo J., Bowler R., Caputi K.,
*    Kauffmann O., Milvang-Jensen B., Gonzalez-Fernandez C., Gonzalez-Solares E.,
*    Irwin M., Lewis J., Blake R., Cross N., Read M., Sutorius E.
*   <Institut d'Astrophysique de Paris, UltraVISTA, Cambridge Astronomical
*    Survey Unit (CASU) and Wide Field Astronomy Unit (WFAU), 2019>
*   =2023yCat.2373....0M
*   =2012A&A...544A.156M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! The UltraVISTA DR4 five-band merged catalogue

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  UVISTADR4   ! UltraVISTA source designation (DR4)
*                                    (SOURCE_ID)
      integer*4     Seq         ! [1/451587] Running object number (NUMBER)
      real*8        RAdeg       ! (deg) [149/151] Right ascension of barycenter
*                                    (J2000) (ALPHA_J2000)
      real*8        DEdeg       ! (deg) [1.5/3] Declination of barycenter (J2000)
*                                    (DELTA_J2000)
      real*8        Xpos        ! (pix) Object position along x (X_IMAGE)
      real*8        Ypos        ! (pix) Object position along y (Y_IMAGE)
      integer*4     F           ! [0/1] Bad region flag: !=0 for bad region
*                                    (field boundaries: 1) (FLAG_HJMCC) (1)
      real*8        EBV         ! (mag) [0.015/0.03] Galactic reddening E(B-V) based
*                                    on Schlegel+ 1998ApJ...500..525S dust maps
      real*8        Yap2        ! (mag) [12.6/37]? Y fixed aperture AB magnitude in
*                                    2" diameter (Y_APER2)
      real*8        e_Yap2      ! (mag) [3e-6/1542]? Yap2 error (Y_APER2_ERR)
      real*8        Yap7        ! (mag) [10.4/37.1]? Y fixed aperture AB magnitude
*                                    in 7.1" diameter (Y_APER7)
      real*8        e_Yap7      ! (mag) [1e-6/22565]? Yap7 error (Y_APER7_ERR)
      real*8        Ymag        ! (mag) [10.1/36.5]? VISTA Y auto AB magnitude
*                                    (Y_AUTO)
      real*8        e_Ymag      ! (mag) [2e-6/1436]? Ymag error (Y_AUTO_ERR)
      real*8        Yrad        ! (pix) [0.005/242]? Radius of aperture containing
*                                    half the flux of Ymag (Y_FLUX_RADIUS)
      integer*4     Ysf         ! [0/52] SExtractor Y flag (Y_FLAG) (1)
      real*8        Jap2        ! (mag) [13/35.3]? J fixed aperture AB magnitude in
*                                    2" diameter (J_APER2)
      real*8        e_Jap2      ! (mag) [3e-6/1432]? Jap2 error (J_APER2_ERR)
      real*8        Jap7        ! (mag) [10.8/38]? J fixed aperture AB magnitude in
*                                    7.1" diameter (J_APER7)
      real*8        e_Jap7      ! (mag) [2e-6/58792]? Jap7 error (J_APER7_ERR)
      real*8        Jmag        ! (mag) [10.2/34.6]? VISTA J auto AB magnitude
*                                    (J_AUTO)
      real*8        e_Jmag      ! (mag) [2e-6/955]? Jmag error (J_AUTO_ERR)
      real*8        Jrad        ! (pix) [0.004/226]? Radius of aperture containing
*                                    half the flux of Jmag (J_FLUX_RADIUS)
      integer*4     Jsf         ! [0/52] SExtractor J flag (J_FLAG) (1)
      real*8        Hap2        ! (mag) [12.6/38.2]? H fixed aperture AB magnitude
*                                    in 2" diameter (H_APER2)
      real*8        e_Hap2      ! (mag) [3e-6/29111]? Hap2 error (H_APER2_ERR)
      real*8        Hap7        ! (mag) [10.3/36]? H fixed aperture AB magnitude in
*                                    7.1" diameter (H_APER7)
      real*8        e_Hap7      ! (mag) [3e-6/13636]? Hap7 error (H_APER7_ERR)
      real*8        Hmag        ! (mag) [9.7/35.5]? VISTA H auto AB magnitude
*                                    (H_AUTO)
      real*8        e_Hmag      ! (mag) [4e-6/2977]? Hmag error (H_AUTO_ERR)
      real*8        Hrad        ! (pix) [0.005/268]? Radius of aperture containing
*                                    half the flux of Hmag (H_FLUX_RADIUS)
      integer*4     Hsf         ! [0/52] SExtractor H flag (H_FLAG) (1)
      real*8        Ksap2       ! (mag) [12.7/31.5]? Ks fixed aperture AB magnitude
*                                    in 2" diameter [detection image] (KS_APER2)
      real*8        e_Ksap2     ! (mag) [2e-6/27]? Ksap2 error (KS_APER2_ERR)
      real*8        Ksap7       ! (mag) [10.6/35]? Ks fixed aperture AB magnitude in
*                                    7.1" diameter [detection image] (KS_APER7)
      real*8        e_Ksap7     ! (mag) [3e-6/3851]? Ksap7 error (KS_APER7_ERR)
      real*8        Ksmag       ! (mag) [9.8/30.8]? VISTA Ks auto AB magnitude
*                                    [detection image] (KS_AUTO)
      real*8        e_Ksmag     ! (mag) [6e-6/15]? Ksmag error (KS_AUTO_ERR)
      real*8        Ksrad       ! (pix) [0.16/222]? Radius of aperture containing
*                                    half the flux of Ksmag (KS_FLUX_RADIUS)
      integer*4     Ksf         ! [0/52] SExtractor Ks flag [detection image]
*                                    (KS_FLAG) (1)
      real*8        NB118ap2    ! (mag) [11.6/37]? NB118 fixed aperture AB magnitude
*                                    in 2" diameter (NB118_APER2)
      real*8        e_NB118ap2  ! (mag) [4e-6/25607]? NB118ap2 error
*                                    (NB118_APER2_ERR)
      real*8        NB118ap7    ! (mag) [9.8/39.1]? NB118 fixed aperture AB
*                                    magnitude in 7.1" diameter (NB118_APER7)
      real*8        e_NB118ap7  ! (mag) [2e-6/193362]? NB118ap7 error
*                                    (NB118_APER7_ERR)
      real*8        NB118mag    ! (mag) [9.5/42]? VISTA NB118 (1.18um) auto AB
*                                    magnitude (NB118_AUTO)
      real*8        e_NB118mag  ! (mag) [3e-6/826846]? NB118mag error
*                                    (NB118_AUTO_ERR)
      real*8        NB118rad    ! (pix) [8e-6/1884]? Radius of aperture containing
*                                    half the flux of NB118mag
*                                    (NB118_FLUX_RADIUS)
      integer*4     NB118sf     ! [0/53] SExtractor NB118 flag (NB118_FLAG) (1)
*Note (1): The best possible object sample are those objects which have all
*          flags equal to zero.

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

C  Loading file 'catalog.dat'	! The UltraVISTA DR4 five-band merged catalogue

C  Format for file interpretation

    1 format(
     +  10X,A19,1X,I6,1X,F11.7,1X,F9.7,1X,F8.2,1X,F8.2,1X,I1,1X,F7.5,
     +  1X,F7.4,1X,F11.6,1X,F7.4,1X,F12.6,1X,F7.4,1X,F11.6,1X,F8.4,1X,
     +  I2,1X,F7.4,1X,F11.6,1X,F7.4,1X,F12.6,1X,F7.4,1X,F10.6,1X,F8.4,
     +  1X,I2,1X,F7.4,1X,F12.6,1X,F7.4,1X,F12.6,1X,F7.4,1X,F11.6,1X,
     +  F10.6,1X,I2,1X,F7.4,1X,F9.6,1X,F7.4,1X,F11.6,1X,F7.4,1X,F9.6,
     +  1X,F8.4,1X,I2,1X,F7.4,1X,F12.6,1X,F7.4,1X,F13.6,1X,F7.4,1X,
     +  F13.6,1X,F11.6,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,451587
        read(1,'(A455)')ar__
        read(ar__,1)
     +  UVISTADR4,Seq,RAdeg,DEdeg,Xpos,Ypos,F,EBV,Yap2,e_Yap2,Yap7,
     +  e_Yap7,Ymag,e_Ymag,Yrad,Ysf,Jap2,e_Jap2,Jap7,e_Jap7,Jmag,
     +  e_Jmag,Jrad,Jsf,Hap2,e_Hap2,Hap7,e_Hap7,Hmag,e_Hmag,Hrad,Hsf,
     +  Ksap2,e_Ksap2,Ksap7,e_Ksap7,Ksmag,e_Ksmag,Ksrad,Ksf,NB118ap2,
     +  e_NB118ap2,NB118ap7,e_NB118ap7,NB118mag,e_NB118mag,NB118rad,
     +  NB118sf
        if(ar__(88:94) .EQ. '') Yap2 = rNULL__
        if(ar__(96:106) .EQ. '') e_Yap2 = rNULL__
        if(ar__(108:114) .EQ. '') Yap7 = rNULL__
        if(ar__(116:127) .EQ. '') e_Yap7 = rNULL__
        if(ar__(129:135) .EQ. '') Ymag = rNULL__
        if(ar__(137:147) .EQ. '') e_Ymag = rNULL__
        if(ar__(149:156) .EQ. '') Yrad = rNULL__
        if(ar__(161:167) .EQ. '') Jap2 = rNULL__
        if(ar__(169:179) .EQ. '') e_Jap2 = rNULL__
        if(ar__(181:187) .EQ. '') Jap7 = rNULL__
        if(ar__(189:200) .EQ. '') e_Jap7 = rNULL__
        if(ar__(202:208) .EQ. '') Jmag = rNULL__
        if(ar__(210:219) .EQ. '') e_Jmag = rNULL__
        if(ar__(221:228) .EQ. '') Jrad = rNULL__
        if(ar__(233:239) .EQ. '') Hap2 = rNULL__
        if(ar__(241:252) .EQ. '') e_Hap2 = rNULL__
        if(ar__(254:260) .EQ. '') Hap7 = rNULL__
        if(ar__(262:273) .EQ. '') e_Hap7 = rNULL__
        if(ar__(275:281) .EQ. '') Hmag = rNULL__
        if(ar__(283:293) .EQ. '') e_Hmag = rNULL__
        if(ar__(295:304) .EQ. '') Hrad = rNULL__
        if(ar__(309:315) .EQ. '') Ksap2 = rNULL__
        if(ar__(317:325) .EQ. '') e_Ksap2 = rNULL__
        if(ar__(327:333) .EQ. '') Ksap7 = rNULL__
        if(ar__(335:345) .EQ. '') e_Ksap7 = rNULL__
        if(ar__(347:353) .EQ. '') Ksmag = rNULL__
        if(ar__(355:363) .EQ. '') e_Ksmag = rNULL__
        if(ar__(365:372) .EQ. '') Ksrad = rNULL__
        if(ar__(377:383) .EQ. '') NB118ap2 = rNULL__
        if(ar__(385:396) .EQ. '') e_NB118ap2 = rNULL__
        if(ar__(398:404) .EQ. '') NB118ap7 = rNULL__
        if(ar__(406:418) .EQ. '') e_NB118ap7 = rNULL__
        if(ar__(420:426) .EQ. '') NB118mag = rNULL__
        if(ar__(428:440) .EQ. '') e_NB118mag = rNULL__
        if(ar__(442:452) .EQ. '') NB118rad = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  UVISTADR4,Seq,RAdeg,DEdeg,Xpos,Ypos,F,EBV,Yap2,e_Yap2,Yap7,
     +  e_Yap7,Ymag,e_Ymag,Yrad,Ysf,Jap2,e_Jap2,Jap7,e_Jap7,Jmag,
     +  e_Jmag,Jrad,Jsf,Hap2,e_Hap2,Hap7,e_Hap7,Hmag,e_Hmag,Hrad,Hsf,
     +  Ksap2,e_Ksap2,Ksap7,e_Ksap7,Ksmag,e_Ksmag,Ksrad,Ksf,NB118ap2,
     +  e_NB118ap2,NB118ap7,e_NB118ap7,NB118mag,e_NB118mag,NB118rad,
     +  NB118sf
c    .......End.of.Just test output...........
      end do
      close(1)

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