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

Conversion of standardized ReadMe file for file /./ftp/cats/II/316 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 2017-Dec-16
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/316              UKIDSS-DR6 Galactic Plane Survey      (Lucas+ 2012)
*================================================================================
*UKIRT Infrared Deep Sky Survey (UKIDSS) Galactic Plane Survey (GPS) Release 6
*    UKIDSS Consortium
*   <Mon. Not. R. Astron. Soc. 391, 136 (2008)>
*   =2008MNRAS.391..136L
*   =2012yCat.2316....0U
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'gps6.sam'	! Sample of the UKIDSS-DR6 Galactic Plane Survey
                             among 604,327,143 sources (557,877,373 unique)

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

C  Position composed of: RAdeg DEdeg
      character*19  UGPS       (nr__) ! Name of source in survey (G5)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (ICRS, at Ep=Epoch)
      real*8        DEdeg      (nr__) ! (deg) Declination (ICRS, at Ep=Epoch)
      real*4        Jmag       (nr__) ! (mag) ? UKIDSS J magnitude (jAperMag3) (G1)
      real*4        Hmag       (nr__) ! (mag) ? UKIDSS H magnitude (hAperMag3) (G1)
      real*4        Kmag1      (nr__) ! (mag) ? UKIDSS K magnitude epoch1 (k_1AperMag3) (G1)
      real*4        Kmag2      (nr__) ! (mag) ? UKIDSS K magnitude epoch2 (k_2AperMag3) (G1)
      real*4        H2mag      (nr__) ! (mag) ? UKIDSS H2 magnitude (h2AperMag3) (G1)
      real*4        e_Jmag     (nr__) ! (mag) ? Mean error on Jmag (jAperMag3Err)
      real*4        e_Hmag     (nr__) ! (mag) ? Mean error on Hmag (hAperMag3Err)
      real*4        e_Kmag1    (nr__) ! (mag) ? Mean error on Kmag1 (k_1AperMag3Err)
      real*4        e_Kmag2    (nr__) ! (mag) ? Mean error on Kmag2 (k_2AperMag3Err)
      real*4        e_H2mag    (nr__) ! (mag) ? Mean error on H2mag (h2AperMag3Err)
*--------------------------------------------------------------------------------
      character*12  ID         (nr__) ! Unique ID of this merged detection (sourceID)
      integer*4     m          (nr__) ! [1/2] "2" indicates a duplicated source (G6)
      real*8        Epoch      (nr__) ! (yr) [2005/2009] Epoch of position measurement (epoch)
      integer*4     nf         (nr__) ! [0] Number of frames (nFrames)
      real*4        mStat      (nr__) ! Merged profile class statistic (mergedClassStat)
      integer*4     cl         (nr__) ! [-3,1] Merged source class (mergedClass) (G2)
      real*4        p_         (nr__) ! [0,1] Probability of being a star (pStar)
      real*4        pG         (nr__) ! [0,1] Probability of being a galaxy (pGalaxy)
      real*4        pN         (nr__) ! [0,1] Probability of being noise (pNoise)
*--------------------------------------------------------------------------------
      real*8        Jdiam      (nr__) ! (pix) ? J-band RMS of axes of ellipse fit (jGausig)
      real*4        Jell       (nr__) ! [0/1]? J-band ellipticity (1-b/a) (jEll)
      real*4        Jpa        (nr__) ! (deg) [0,180]? J-band position angle (jPA)
      integer*4     Jbad       (nr__) ! J-band zero confidence pixels (jErrBits) (G3)
      integer*4     Jcl        (nr__) ! [-3,1]? J-band source class (jClass) (G2)
      integer*4     Jflags     (nr__) ! [0,8388607] J-band flags (jppErrBits) (G4)
*--------------------------------------------------------------------------------
      real*8        Hdiam      (nr__) ! (pix) ? H-band RMS of axes of ellipse fit (hGausig)
      real*4        Hell       (nr__) ! ? Ellipticity in H-band (hEll)
      real*4        Hpa        (nr__) ! (deg) [0,180]? H-band position angle (hPA)
      integer*4     Hbad       (nr__) ! H-band zero confidence pixels (hErrBits) (G3)
      integer*4     Hcl        (nr__) ! [-3,1] H-band source class (hClass) (G2)
      integer*4     Hflags     (nr__) ! [0,8388607] H-band flags (hppErrBits) (G4)
      real*4        Hdx        (nr__) ! (arcsec) [-1,1]? {xi} offset from master position (hXi)
      real*4        Hdy        (nr__) ! (arcsec) [-1,1]? {eta} offset from master position (hEta)
*--------------------------------------------------------------------------------
      real*8        Kdiam1     (nr__) ! (pix) ? K-band RMS of ellipse fit, epoch 1 (k_1Gausig)
      real*4        Kell1      (nr__) ! ? K-band ellipticity (k_1Ell)
      real*4        Kpa1       (nr__) ! (deg) [0,180]? K-band position angle (k_1PA)
      integer*4     Kbad1      (nr__) ! K-band zero confidence pixels (k_1ErrBits) (G3)
      integer*4     Kcl1       (nr__) ! [-3,1] K-band source class (k_1Class) (G2)
      integer*4     Kflag1     (nr__) ! [0,8388607] K-band flags (k_1ppErrBits) (G4)
      real*4        Kdx1       (nr__) ! (arcsec) [-1,1]? {xi} offset from master position (k_1Xi)
      real*4        Kdy1       (nr__) ! (arcsec) [-1,1]? {eta} offset from master position(k_1Eta)
*--------------------------------------------------------------------------------
      real*8        Kdiam2     (nr__) ! (pix) ? K-band RMS of ellipse fit, epoch 2 (k_2Gausig)
      real*4        Kell2      (nr__) ! ? K-band ellipticity (k_2Ell)
      real*4        Kpa2       (nr__) ! (deg) [0,180]? K-band position angle (k_2PA)
      integer*4     Kbad2      (nr__) ! ? K-band source class (k_2ErrBits)
      integer*4     Kcl2       (nr__) ! [-3,1]? K-band source class (k_2Class)
      integer*4     Kflag2     (nr__) ! [0,8388607]? K-band flags (k_2ppErrBits)
      real*4        Kdx2       (nr__) ! (arcsec) [-1,1]? {xi} offset from master position (k_2Xi)
      real*4        Kdy2       (nr__) ! (arcsec) [-1,1]? {eta} offset from master position(k_2Eta)
*--------------------------------------------------------------------------------
      real*8        H2diam     (nr__) ! (pix) ? H2-band RMS of ellipse fit (h2Gausig)
      real*4        H2ell      (nr__) ! ? H2-band ellipticity (h2Ell)
      real*4        H2pa       (nr__) ! (deg) ? H2-band position angle (h2PA)
      integer*4     H2bad      (nr__) ! ? H2-band zero confidence pixels(h2ErrBits) (G3)
      integer*4     H2cl       (nr__) ! [-3,1]? H2-band source class (h2Class) (G2)
      integer*4     H2flag     (nr__) ! [0,8388607]? H2-band flags (h2ppErrBits)
      real*4        H2dx       (nr__) ! (arcsec) [-1,1]? {xi} offset from master position (h2Xi)
      real*4        H2dy       (nr__) ! (arcsec) [-1,1]? {eta} offset from master position (h2Eta)
*--------------------------------------------------------------------------------
      real*4        Jmap1      (nr__) ! (mag) ? J-band UKIDSS J 1"aperture mag. (jAperMag1)
      real*4        e_Jmap1    (nr__) ! (mag) ? Mean error on Jmap1 (jAperMag1Err)
      real*4        Jmap4      (nr__) ! (mag) ? J-band UKIDSS J 4"aperture mag. (jAperMag4)
      real*4        e_Jmap4    (nr__) ! (mag) ? Mean error on Jmap4 (jAperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Hmap1      (nr__) ! (mag) ? H-band UKIDSS H 1"aperture mag. (hAperMag1)
      real*4        e_Hmap1    (nr__) ! (mag) ? Mean error on Hmap1 (hAperMag1Err)
      real*4        Hmap4      (nr__) ! (mag) ? H-band UKIDSS H 4"aperture mag. (hAperMag4)
      real*4        e_Hmap4    (nr__) ! (mag) ? Mean error on Hmap4 (hAperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Kmap1_1    (nr__) ! (mag) ? K-band UKIDSS K 1"aperture 1st ep.(k_1AperMag1)
      real*4        e_Kmap1_1  (nr__) ! (mag) ? Mean error on Kmap1.1 (k_1AperMag1Err)
      real*4        Kmap4_1    (nr__) ! (mag) ? K-band UKIDSS K 4"aperture mag. (k_1AperMag4)
      real*4        e_Kmap4_1  (nr__) ! (mag) ? Mean error on Kmap4.1 (k_1AperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Kmap1_2    (nr__) ! (mag) ? K-band UKIDSS K 1"aperture mag. (k_2AperMag1)
      real*4        e_Kmap1_2  (nr__) ! (mag) ? Mean error on Kmap1.2 (k_2AperMag1Err)
      real*4        Kmap4_2    (nr__) ! (mag) ? K-band UKIDSS K 4"aperture mag. (k_2AperMag4)
      real*4        e_Kmap4_2  (nr__) ! (mag) ? Mean error on Kmap4.2 (k_2AperMag4Err)
*--------------------------------------------------------------------------------
      real*4        H2map1     (nr__) ! (mag) ? H2-band UKIDSS H2 1"aperture mag. (h2AperMag1)
      real*4        e_H2map1   (nr__) ! (mag) ? Mean error on H2map1 (h2AperMag1Err)
      real*4        H2map4     (nr__) ! (mag) ? H2-band UKIDSS H2 4"aperture mag. (h2AperMag4)
      real*4        e_H2map4   (nr__) ! (mag) ? Mean error on H2map4 (h2AperMag4Err)

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

C  Loading file 'gps6.sam'	! Sample of the UKIDSS-DR6 Galactic Plane Survey
*                             among 604,327,143 sources (557,877,373 unique)

C  Format for file interpretation

    1 format(
     +  A19,1X,F10.6,1X,F10.6,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,A12,1X,I1,1X,F9.4,
     +  1X,I1,1X,F6.2,1X,I2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F7.3,1X,F4.2,
     +  1X,F5.1,1X,I2,1X,I2,1X,I7,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,
     +  1X,I7,1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,
     +  I7,1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,I7,
     +  1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,I7,1X,
     +  F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'gps6.sam')
      write(6,*) '....Loading file: gps6.sam'
      do i__=1,1000
        read(1,'(A529)')ar__
        read(ar__,1)
     +  UGPS(i__),RAdeg(i__),DEdeg(i__),Jmag(i__),Hmag(i__),
     +  Kmag1(i__),Kmag2(i__),H2mag(i__),e_Jmag(i__),e_Hmag(i__),
     +  e_Kmag1(i__),e_Kmag2(i__),e_H2mag(i__),ID(i__),m(i__),
     +  Epoch(i__),nf(i__),mStat(i__),cl(i__),p_(i__),pG(i__),pN(i__),
     +  Jdiam(i__),Jell(i__),Jpa(i__),Jbad(i__),Jcl(i__),Jflags(i__),
     +  Hdiam(i__),Hell(i__),Hpa(i__),Hbad(i__),Hcl(i__),Hflags(i__),
     +  Hdx(i__),Hdy(i__),Kdiam1(i__),Kell1(i__),Kpa1(i__),Kbad1(i__),
     +  Kcl1(i__),Kflag1(i__),Kdx1(i__),Kdy1(i__),Kdiam2(i__),
     +  Kell2(i__),Kpa2(i__),Kbad2(i__),Kcl2(i__),Kflag2(i__),
     +  Kdx2(i__),Kdy2(i__),H2diam(i__),H2ell(i__),H2pa(i__),
     +  H2bad(i__),H2cl(i__),H2flag(i__),H2dx(i__),H2dy(i__),
     +  Jmap1(i__),e_Jmap1(i__),Jmap4(i__),e_Jmap4(i__),Hmap1(i__),
     +  e_Hmap1(i__),Hmap4(i__),e_Hmap4(i__),Kmap1_1(i__),
     +  e_Kmap1_1(i__),Kmap4_1(i__),e_Kmap4_1(i__),Kmap1_2(i__),
     +  e_Kmap1_2(i__),Kmap4_2(i__),e_Kmap4_2(i__),H2map1(i__),
     +  e_H2map1(i__),H2map4(i__),e_H2map4(i__)
        if(ar__(43:48) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(50:55) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(57:62) .EQ. '') Kmag1(i__) = rNULL__
        if(ar__(64:69) .EQ. '') Kmag2(i__) = rNULL__
        if(ar__(71:76) .EQ. '') H2mag(i__) = rNULL__
        if(ar__(78:83) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__(85:90) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__(92:97) .EQ. '') e_Kmag1(i__) = rNULL__
        if(ar__(99:104) .EQ. '') e_Kmag2(i__) = rNULL__
        if(ar__(106:111) .EQ. '') e_H2mag(i__) = rNULL__
        if(ar__(165:171) .EQ. '') Jdiam(i__) = rNULL__
        if(ar__(173:176) .EQ. '') Jell(i__) = rNULL__
        if(ar__(178:182) .EQ. '') Jpa(i__) = rNULL__
        if(ar__(187:188) .EQ. '') Jcl(i__) = iNULL__
        if(ar__(198:204) .EQ. '') Hdiam(i__) = rNULL__
        if(ar__(206:209) .EQ. '') Hell(i__) = rNULL__
        if(ar__(211:215) .EQ. '') Hpa(i__) = rNULL__
        if(ar__(231:236) .EQ. '') Hdx(i__) = rNULL__
        if(ar__(238:243) .EQ. '') Hdy(i__) = rNULL__
        if(ar__(245:251) .EQ. '') Kdiam1(i__) = rNULL__
        if(ar__(253:256) .EQ. '') Kell1(i__) = rNULL__
        if(ar__(258:262) .EQ. '') Kpa1(i__) = rNULL__
        if(ar__(278:283) .EQ. '') Kdx1(i__) = rNULL__
        if(ar__(285:290) .EQ. '') Kdy1(i__) = rNULL__
        if(ar__(292:298) .EQ. '') Kdiam2(i__) = rNULL__
        if(ar__(300:303) .EQ. '') Kell2(i__) = rNULL__
        if(ar__(305:309) .EQ. '') Kpa2(i__) = rNULL__
        if(ar__(311:312) .EQ. '') Kbad2(i__) = iNULL__
        if(ar__(314:315) .EQ. '') Kcl2(i__) = iNULL__
        if(ar__(317:323) .EQ. '') Kflag2(i__) = iNULL__
        if(ar__(325:330) .EQ. '') Kdx2(i__) = rNULL__
        if(ar__(332:337) .EQ. '') Kdy2(i__) = rNULL__
        if(ar__(339:345) .EQ. '') H2diam(i__) = rNULL__
        if(ar__(347:350) .EQ. '') H2ell(i__) = rNULL__
        if(ar__(352:356) .EQ. '') H2pa(i__) = rNULL__
        if(ar__(358:359) .EQ. '') H2bad(i__) = iNULL__
        if(ar__(361:362) .EQ. '') H2cl(i__) = iNULL__
        if(ar__(364:370) .EQ. '') H2flag(i__) = iNULL__
        if(ar__(372:377) .EQ. '') H2dx(i__) = rNULL__
        if(ar__(379:384) .EQ. '') H2dy(i__) = rNULL__
        if(ar__(387:392) .EQ. '') Jmap1(i__) = rNULL__
        if(ar__(394:399) .EQ. '') e_Jmap1(i__) = rNULL__
        if(ar__(401:406) .EQ. '') Jmap4(i__) = rNULL__
        if(ar__(408:413) .EQ. '') e_Jmap4(i__) = rNULL__
        if(ar__(416:421) .EQ. '') Hmap1(i__) = rNULL__
        if(ar__(423:428) .EQ. '') e_Hmap1(i__) = rNULL__
        if(ar__(430:435) .EQ. '') Hmap4(i__) = rNULL__
        if(ar__(437:442) .EQ. '') e_Hmap4(i__) = rNULL__
        if(ar__(445:450) .EQ. '') Kmap1_1(i__) = rNULL__
        if(ar__(452:457) .EQ. '') e_Kmap1_1(i__) = rNULL__
        if(ar__(459:464) .EQ. '') Kmap4_1(i__) = rNULL__
        if(ar__(466:471) .EQ. '') e_Kmap4_1(i__) = rNULL__
        if(ar__(474:479) .EQ. '') Kmap1_2(i__) = rNULL__
        if(ar__(481:486) .EQ. '') e_Kmap1_2(i__) = rNULL__
        if(ar__(488:493) .EQ. '') Kmap4_2(i__) = rNULL__
        if(ar__(495:500) .EQ. '') e_Kmap4_2(i__) = rNULL__
        if(ar__(503:508) .EQ. '') H2map1(i__) = rNULL__
        if(ar__(510:515) .EQ. '') e_H2map1(i__) = rNULL__
        if(ar__(517:522) .EQ. '') H2map4(i__) = rNULL__
        if(ar__(524:529) .EQ. '') e_H2map4(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  UGPS(i__),RAdeg(i__),DEdeg(i__),Jmag(i__),Hmag(i__),
     +  Kmag1(i__),Kmag2(i__),H2mag(i__),e_Jmag(i__),e_Hmag(i__),
     +  e_Kmag1(i__),e_Kmag2(i__),e_H2mag(i__),ID(i__),m(i__),
     +  Epoch(i__),nf(i__),mStat(i__),cl(i__),p_(i__),pG(i__),pN(i__),
     +  Jdiam(i__),Jell(i__),Jpa(i__),Jbad(i__),Jcl(i__),Jflags(i__),
     +  Hdiam(i__),Hell(i__),Hpa(i__),Hbad(i__),Hcl(i__),Hflags(i__),
     +  Hdx(i__),Hdy(i__),Kdiam1(i__),Kell1(i__),Kpa1(i__),Kbad1(i__),
     +  Kcl1(i__),Kflag1(i__),Kdx1(i__),Kdy1(i__),Kdiam2(i__),
     +  Kell2(i__),Kpa2(i__),Kbad2(i__),Kcl2(i__),Kflag2(i__),
     +  Kdx2(i__),Kdy2(i__),H2diam(i__),H2ell(i__),H2pa(i__),
     +  H2bad(i__),H2cl(i__),H2flag(i__),H2dx(i__),H2dy(i__),
     +  Jmap1(i__),e_Jmap1(i__),Jmap4(i__),e_Jmap4(i__),Hmap1(i__),
     +  e_Hmap1(i__),Hmap4(i__),e_Hmap4(i__),Kmap1_1(i__),
     +  e_Kmap1_1(i__),Kmap4_1(i__),e_Kmap4_1(i__),Kmap1_2(i__),
     +  e_Kmap1_2(i__),Kmap4_2(i__),e_Kmap4_2(i__),H2map1(i__),
     +  e_H2map1(i__),H2map4(i__),e_H2map4(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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