FORTRAN Generation
(/./ftp/cats/J/MNRAS/413/1581)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/413/1581 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-28
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/MNRAS/413/1581    Candidate subdwarfs and white dwarfs     (Gontcharov+, 2011)
*================================================================================
*Candidate subdwarfs and white dwarfs from the 2MASS, Tycho-2, XPM and UCAC3
*catalogues.
*    Gontcharov G.A., Bajkova A.T., Fedorov P.N., Akhmetov V.S.
*   <Mon. Not. R. Astron. Soc., 413, 1581-1599 (2011)>
*   =2011MNRAS.413.1581G
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table4.dat'	! Catalogue of candidate subdwarfs and white
                              dwarfs from 2MASS, Tycho-2, XPM and UCAC3

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

      character*16  v2MASS     (nr__) ! 2MASS IAU2000 designation (HHMMSSss+DDMMSSs)
      character*10  Tyc2       (nr__) ! Tycho-2 designation (TYC1 TYC2)
      integer*4     HIP        (nr__) ! ? Hipparcos number
      integer*4     Cl         (nr__) ! [1/3] Stellar class among WD, ESD, USD (1)
      real*4        KsMAG      (nr__) ! (mag) Obtained absolute Ks magnitude
      real*8        pmGlon     (nr__) ! (mas/yr) Proper motion along galactic longitude
*                                  (includes the cos(b) factor)
      real*8        pmGlat     (nr__) ! (mas/yr) Proper motion along galactic latitude
      real*4        plx        (nr__) ! (mas) ? Hipparcos parallax
      real*4        e_plx      (nr__) ! (mas) ? Parallax precision
      real*4        BTmag      (nr__) ! (mag) ? HIP/BT magnitude from Tycho-2
      real*4        e_BTmag    (nr__) ! (mag) ? rms uncertainty on BTmag
      real*4        VTmag      (nr__) ! (mag) ? HIP/VT magnitude from Tycho-2
      real*4        e_VTmag    (nr__) ! (mag) ? rms uncertainty on VTmag
      real*4        Jmag       (nr__) ! (mag) 2MASS J magnitude
      real*4        Ksmag_1    (nr__) ! (mag) 2MASS Ks magnitude
      real*4        R3mag      (nr__) ! (mag) ? UCAC/R magnitude from UCAC3
      real*4        e_R3mag    (nr__) ! (mag) ? R3mag magnitude precision
      real*4        Bmag       (nr__) ! (mag) ? SuperCosmos B magnitude from SuperCosmos
      real*4        Rmag       (nr__) ! (mag) ? SuperCosmos R magnitude from SuperCosmos
      real*4        Imag       (nr__) ! (mag) ? SuperCosmos I magnitude from SuperCosmos
      integer*4     q_Bmag     (nr__) ! [0/2]? B magnitude quality flag (unexplained)
      integer*4     q_Rmag     (nr__) ! [0/2]? R magnitude quality flag (unexplained)
      integer*4     q_Imag     (nr__) ! [0/2]? I magnitude quality flag (unexplained)
      integer*4     Dist       (nr__) ! (pc) Obtained photometric heliocentric distance
      integer*4     Xdist      (nr__) ! (pc) Obtained X distance (galactic frame)
      integer*4     Ydist      (nr__) ! (pc) Obtained Y distance (galactic frame)
      integer*4     Zdist      (nr__) ! (pc) Obtained Z distance (galactic frame)
      real*4        RV         (nr__) ! (km/s) ? Radial velocity
      integer*4     e_RV       (nr__) ! (km/s) ? Radial velocity precision
      real*4        Fe_H       (nr__) ! ([Sun]) ? Metallicity
*Note (1): Stellar class as follows:
*   1 = white dwarf (WD)
*   2 = evolved subdwarf (ESD)
*   3 = unevolved subdwarf (USD)

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

C  Loading file 'table4.dat'	! Catalogue of candidate subdwarfs and white
*                              dwarfs from 2MASS, Tycho-2, XPM and UCAC3

C  Format for file interpretation

    1 format(
     +  A16,1X,A10,1X,I6,1X,I1,F5.2,F7.1,F7.1,F6.2,F4.1,F5.2,F4.2,
     +  F5.2,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F5.2,1X,
     +  F5.2,1X,I1,I1,I1,1X,I4,I5,I5,I5,F6.1,I2,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,9495
        read(1,'(A161)')ar__
        read(ar__,1)
     +  v2MASS(i__),Tyc2(i__),HIP(i__),Cl(i__),KsMAG(i__),pmGlon(i__),
     +  pmGlat(i__),plx(i__),e_plx(i__),BTmag(i__),e_BTmag(i__),
     +  VTmag(i__),e_VTmag(i__),Jmag(i__),Ksmag_1(i__),R3mag(i__),
     +  e_R3mag(i__),Bmag(i__),Rmag(i__),Imag(i__),q_Bmag(i__),
     +  q_Rmag(i__),q_Imag(i__),Dist(i__),Xdist(i__),Ydist(i__),
     +  Zdist(i__),RV(i__),e_RV(i__),Fe_H(i__)
        if(ar__(29:34) .EQ. '') HIP(i__) = iNULL__
        if(ar__(56:61) .EQ. '') plx(i__) = rNULL__
        if(ar__(62:65) .EQ. '') e_plx(i__) = rNULL__
        if(ar__(66:70) .EQ. '') BTmag(i__) = rNULL__
        if(ar__(71:74) .EQ. '') e_BTmag(i__) = rNULL__
        if(ar__(75:79) .EQ. '') VTmag(i__) = rNULL__
        if(ar__(80:83) .EQ. '') e_VTmag(i__) = rNULL__
        if(ar__(97:101) .EQ. '') R3mag(i__) = rNULL__
        if(ar__(103:106) .EQ. '') e_R3mag(i__) = rNULL__
        if(ar__(108:112) .EQ. '') Bmag(i__) = rNULL__
        if(ar__(114:118) .EQ. '') Rmag(i__) = rNULL__
        if(ar__(120:124) .EQ. '') Imag(i__) = rNULL__
        if(ar__(126:126) .EQ. '') q_Bmag(i__) = iNULL__
        if(ar__(127:127) .EQ. '') q_Rmag(i__) = iNULL__
        if(ar__(128:128) .EQ. '') q_Imag(i__) = iNULL__
        if(ar__(149:154) .EQ. '') RV(i__) = rNULL__
        if(ar__(155:156) .EQ. '') e_RV(i__) = iNULL__
        if(ar__(158:161) .EQ. '') Fe_H(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  v2MASS(i__),Tyc2(i__),HIP(i__),Cl(i__),KsMAG(i__),pmGlon(i__),
     +  pmGlat(i__),plx(i__),e_plx(i__),BTmag(i__),e_BTmag(i__),
     +  VTmag(i__),e_VTmag(i__),Jmag(i__),Ksmag_1(i__),R3mag(i__),
     +  e_R3mag(i__),Bmag(i__),Rmag(i__),Imag(i__),q_Bmag(i__),
     +  q_Rmag(i__),q_Imag(i__),Dist(i__),Xdist(i__),Ydist(i__),
     +  Zdist(i__),RV(i__),e_RV(i__),Fe_H(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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