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 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 2024-Apr-20
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      ! 2MASS IAU2000 designation (HHMMSSss+DDMMSSs)
      character*10  Tyc2        ! Tycho-2 designation (TYC1 TYC2)
      integer*4     HIP         ! ? Hipparcos number
      integer*4     Cl          ! [1/3] Stellar class among WD, ESD, USD (1)
      real*4        KsMAG       ! (mag) Obtained absolute Ks magnitude
      real*8        pmGlon      ! (mas/yr) Proper motion along galactic longitude
*                                  (includes the cos(b) factor)
      real*8        pmGlat      ! (mas/yr) Proper motion along galactic latitude
      real*4        plx         ! (mas) ? Hipparcos parallax
      real*4        e_plx       ! (mas) ? Parallax precision
      real*4        BTmag       ! (mag) ? HIP/BT magnitude from Tycho-2
      real*4        e_BTmag     ! (mag) ? rms uncertainty on BTmag
      real*4        VTmag       ! (mag) ? HIP/VT magnitude from Tycho-2
      real*4        e_VTmag     ! (mag) ? rms uncertainty on VTmag
      real*4        Jmag        ! (mag) 2MASS J magnitude
      real*4        Ksmag_1     ! (mag) 2MASS Ks magnitude
      real*4        R3mag       ! (mag) ? UCAC/R magnitude from UCAC3
      real*4        e_R3mag     ! (mag) ? R3mag magnitude precision
      real*4        Bmag        ! (mag) ? SuperCosmos B magnitude from SuperCosmos
      real*4        Rmag        ! (mag) ? SuperCosmos R magnitude from SuperCosmos
      real*4        Imag        ! (mag) ? SuperCosmos I magnitude from SuperCosmos
      integer*4     q_Bmag      ! [0/2]? B magnitude quality flag (unexplained)
      integer*4     q_Rmag      ! [0/2]? R magnitude quality flag (unexplained)
      integer*4     q_Imag      ! [0/2]? I magnitude quality flag (unexplained)
      integer*4     Dist        ! (pc) Obtained photometric heliocentric distance
      integer*4     Xdist       ! (pc) Obtained X distance (galactic frame)
      integer*4     Ydist       ! (pc) Obtained Y distance (galactic frame)
      integer*4     Zdist       ! (pc) Obtained Z distance (galactic frame)
      real*4        RV          ! (km/s) ? Radial velocity
      integer*4     e_RV        ! (km/s) ? Radial velocity precision
      real*4        Fe_H        ! ([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,Tyc2,HIP,Cl,KsMAG,pmGlon,pmGlat,plx,e_plx,BTmag,
     +  e_BTmag,VTmag,e_VTmag,Jmag,Ksmag_1,R3mag,e_R3mag,Bmag,Rmag,
     +  Imag,q_Bmag,q_Rmag,q_Imag,Dist,Xdist,Ydist,Zdist,RV,e_RV,Fe_H
        if(ar__(29:34) .EQ. '') HIP = iNULL__
        if(ar__(56:61) .EQ. '') plx = rNULL__
        if(ar__(62:65) .EQ. '') e_plx = rNULL__
        if(ar__(66:70) .EQ. '') BTmag = rNULL__
        if(ar__(71:74) .EQ. '') e_BTmag = rNULL__
        if(ar__(75:79) .EQ. '') VTmag = rNULL__
        if(ar__(80:83) .EQ. '') e_VTmag = rNULL__
        if(ar__(97:101) .EQ. '') R3mag = rNULL__
        if(ar__(103:106) .EQ. '') e_R3mag = rNULL__
        if(ar__(108:112) .EQ. '') Bmag = rNULL__
        if(ar__(114:118) .EQ. '') Rmag = rNULL__
        if(ar__(120:124) .EQ. '') Imag = rNULL__
        if(ar__(126:126) .EQ. '') q_Bmag = iNULL__
        if(ar__(127:127) .EQ. '') q_Rmag = iNULL__
        if(ar__(128:128) .EQ. '') q_Imag = iNULL__
        if(ar__(149:154) .EQ. '') RV = rNULL__
        if(ar__(155:156) .EQ. '') e_RV = iNULL__
        if(ar__(158:161) .EQ. '') Fe_H = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  v2MASS,Tyc2,HIP,Cl,KsMAG,pmGlon,pmGlat,plx,e_plx,BTmag,
     +  e_BTmag,VTmag,e_VTmag,Jmag,Ksmag_1,R3mag,e_R3mag,Bmag,Rmag,
     +  Imag,q_Bmag,q_Rmag,q_Imag,Dist,Xdist,Ydist,Zdist,RV,e_RV,Fe_H
c    .......End.of.Just test output...........
      end do
      close(1)

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