FORTRAN Generation
(/./ftp/cats/I/333)

Conversion of standardized ReadMe file for file /./ftp/cats/I/333 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 2018-Jan-23
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. I/333               URAT Parallax Catalog (UPC)                  (Finch+, 2016)
*================================================================================
*The URAT Parallax Catalog (UPC).
*   Finch C.T., Zacharias N.
*   <URAT Parallax Catalog (2016)>
*   =2016yCat.1333....0F
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'upc.dat'	! URAT Parallax Catalog

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

C  Position composed of: RAdeg DEdeg (Epoch=J2014)
      integer*4     UPC        (nr__) ! URAT Parallax Catalog (UPC) number
      real*8        RAdeg      (nr__) ! (deg) Right ascension on ICRS, at Epoch J2014 (1)
      real*8        DEdeg      (nr__) ! (deg) Declination on ICRS, at Epoch J2014     (1)
      character*30  Name       (nr__) ! Identifier                              (2)
      real*4        f_mag      (nr__) ! (mag) URAT mean model fit magnitude           (3)
      real*4        relpi      (nr__) ! (mas) URAT relative parallax
      real*4        picor      (nr__) ! (mas) Parallax correction
      character*1   corflg     (nr__) ! [0-2] Parallax correction flag          (4)
      real*4        abspi      (nr__) ! (mas) Absolute parallax
      real*4        e_abspi    (nr__) ! (mas) Error on absolute parallax
      real*8        pmRA       (nr__) ! (mas/yr) Proper motion in right ascension
      real*4        e_pmRA     (nr__) ! (mas/yr) Error proper motion in right ascension
      real*8        pmDE       (nr__) ! (mas/yr) Proper motion in Declination
      real*4        e_pmDE     (nr__) ! (mas/yr) Error proper motion in Declination
      integer*4     ne         (nr__) ! Total number of epochs available        (5)
      integer*4     nr         (nr__) ! Total number of epochs rejected         (5)
      real*4        Espan      (nr__) ! (yr) Epoch span of data
      real*4        Elo        (nr__) ! Average elongation of image             (6)
      real*4        fsig1      (nr__) ! Fit sigma 1 (reduced chi-square)        (7)
      real*4        fsig2      (nr__) ! (mas) Fit sigma 2 (mean error indiv.obs.)
      character*1   srcflg     (nr__) ! [0-5] Source flag                       (8)
      real*8        srcpi      (nr__) ! (mas) Parallax from external source           (9)
      real*4        e_srcpi    (nr__) ! (mas) Parallax error from external source     (9)
*Note (1):  Positions are on the International Celestial Reference System
*     (ICRS) as represented by the UCAC4 catalog. Mean observed positions
*     are given at epoch J2014 (mean observed positions have been updated
*     to J2014 using the proper motions from column ('pmRA', 'pmDE').
*Note (2): Identifier comes from the external source from which the URAT
*     position was matched column ('srcflg').  For Mearth the LSPM North
*     Catalog Designation is given. This is left blank if no identifier
*     was found.
*Note (3):  This is the mean, observed magnitude in the 680-750 nm URAT
*     bandpass, calibrated by APASS photometry. This bandpass is between
*     R and I, thus further into the red than UCAC. Observations in
*     non-photometric nights *are* included thus the URAT magnitudes need
*     to be taken with caution.
*Note (4): The parallax correction flag is as follows:
*     0 = correction from the photometric parallaxes of UCAC4 ref.stars
*     1 = no correction so the mean of 1.3mas was used
*     2 = large correction so the cut off of 3.9mas was used
*Note (5): the number of epochs available in the URAT epoch data (ne) and
*     the number of epochs rejected (nr) during the fit solutions.
*Note (6): average image elongation from moment analysis, ratio of major
*     to minor axis is given (1.0 = round)
*Note (7): The error of unit weight (reduced chi-square) of the parallax fit
*     solution is given. Thus 1.0 means the scatter of the post-fit residuals
*     match the expected observational errors and assigned weights.
*Note (8): The source flag gives the external source to which the URAT
*     position was matched and where the information for columns 'srcpi'
*     and e_srcpi are from.
*       0 = no match to any of the following external catalogs found
*       1 = matched to Hipparcos (Cat. I/239)
*       2 = matched with The Yale Parallax Catalog
*            (van Altena et al., 1995, Cat. I/238)
*       3 = matched with (Finch & Zacharias, 2016, AJ, in press)
*       4 = matched with MEarth parallaxes
*             (Dittmann et.  al., 2014ApJ...784..156D)
*       5 = matched with SIMBAD database (http://simbad.u-strasbg.fr/simbad/)
*Note (9): Parallax and error from external source. Due to the
*     limitations of the SIMBAD database automated search feature the
*     parallax error or the source of the parallax is not given so for
*     all srcflg = 5, the parallax error is reported as 0.0. For all
*     srcflg = 0, meaning no match to an external catalog the parallax
*     and error are reported as 0.0.

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

C  Loading file 'upc.dat'	! URAT Parallax Catalog

C  Format for file interpretation

    1 format(
     +  I6,1X,F11.7,1X,F11.7,1X,A30,1X,F5.2,1X,F6.1,1X,F3.1,1X,A1,1X,
     +  F6.1,1X,F5.1,1X,F7.1,1X,F5.1,1X,F7.1,1X,F5.1,1X,I3,1X,I2,1X,
     +  F4.2,1X,F5.3,1X,F5.3,1X,F5.1,1X,A1,1X,F7.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'upc.dat')
      write(6,*) '....Loading file: upc.dat'
      do i__=1,112177
        read(1,'(A167)')ar__
        read(ar__,1)
     +  UPC(i__),RAdeg(i__),DEdeg(i__),Name(i__),f_mag(i__),
     +  relpi(i__),picor(i__),corflg(i__),abspi(i__),e_abspi(i__),
     +  pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__),ne(i__),nr(i__),
     +  Espan(i__),Elo(i__),fsig1(i__),fsig2(i__),srcflg(i__),
     +  srcpi(i__),e_srcpi(i__)
c    ..............Just test output...........
        write(6,1)
     +  UPC(i__),RAdeg(i__),DEdeg(i__),Name(i__),f_mag(i__),
     +  relpi(i__),picor(i__),corflg(i__),abspi(i__),e_abspi(i__),
     +  pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__),ne(i__),nr(i__),
     +  Espan(i__),Elo(i__),fsig1(i__),fsig2(i__),srcflg(i__),
     +  srcpi(i__),e_srcpi(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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