FORTRAN Generation
(/./ftp/cats/I/238A)

Conversion of standardized ReadMe file for file /./ftp/cats/I/238A 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 2018-Sep-22
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/238A      Yale Trigonometric Parallaxes, Fourth Edition  (van Altena+ 1995)
*================================================================================
*The General Catalogue of Trigonometric Stellar Parallaxes, Fourth Edition
*    Van Altena W.F., Lee J.T., Hoffleit E.D.
*   <Yale University Observatory (1995)>
*   =1995GCTP..C......0V
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'picat.dat'	! The data file

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

C  1900.0 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension 1900.0
      real*8        DEdeg       ! (deg)     Declination 1900.0
C  ---------------------------------- ! (position vector(s) in degrees)

      character*1   f_GCTP      ! [*] Indicates a note in file "errata.dat"
      real*8        GCTP        ! *Catalog number
      integer*4     RAh         ! (h) ?Right ascension hours (1900.0)
      integer*4     RAm         ! (min) ?Right ascension minutes (1900.0)
      real*4        RAs         ! (s) *?Right ascension seconds (1900.0)
      character*1   DE_         ! Declination sign
      integer*4     DEd         ! (deg) ?Declination degrees (1900.0)
      integer*4     DEm         ! (arcmin) ?Declination minutes (1900.0)
      integer*4     DEs         ! (arcsec) ?Declination seconds (1900.0)
      character*1   u_RAm       ! *[:C] : = lower precision position
      real*4        Vmag        ! (mag) *?V magnitude or other magnitude
      character*1   n_Vmag      ! P indicates blue passband
      real*4        B_V         ! (mag) ?B-V color
      real*4        U_B         ! (mag) ?U-B color
      character*1   r_Vmag      ! Source code for photometry
      character*10  MK          ! *Spectral type
      character*1   r_MK        ! Source code for spectral type
      character*1   comp        ! *Double star component
      character*9   var         ! *Variable star name
      integer*4     HR          ! *?HR number
      character*1   supp        ! [S] S=in Hoffleit BSS Cat. <V/36>
      character*7   HD          ! HD number and component
      character*10  DM          ! *DM identification and component
      character*11  name        ! Star name
      real*4        pm          ! (arcsec/yr) ?Total Proper motion
      integer*4     pmPA        ! (deg) ?Proper motion position angle
      real*8        pi          ! (arcsec) ?Weighted absolute parallax
      integer*4     e_pi        ! (0.1mas) ?Standard error of parallax
      character*1   q_pi        ! *[ GFPX]Quality of interagreement
      integer*4     o_pi        ! *?Number of parallax observations
*Note on GCTP:
*    There are nine stars for which no data are given. They were previously
*    misidentified and had no parallaxes available. They have been retained
*    for completeness in the star numbers. These are:
*    268.00, 1810.10, 1965.00, 2129.10, 3023.00, 3686.10, 4132.00, 4728.00,
*    and 5699.10. There are no entries in the records for these stars
*    except the identifications.
*Note on RAs, u_RAm:
*    The number of significant figures indicates the accuracy of the
*    position. No explanation was given to the flag 'C' in the u_RAm column
*Note on Vmag:
*    The magnitudes of stars with two digits following the decimal point
*    are photoelectric V magnitudes; the remaining magnitudes are lower
*    accuracy visual magnitudes or miscellaneous other types. Details are
*    given in the printed Catalogue.
*Note on MK:
*    The MK type is given if it exists.
*Note on var:
*    A number beginning with S is a New Suspected Variable number (see
*    Cat. <II/140>)
*Note on HR:
*    From Hoffleit, E.D. and Warren, W., 1988 revised in the electronic
*    version (see cat. <V/50>)
*Note on comp:
*    M indicates photometrically unresolved components
*Note on DM:
*    B = Bonner Durchmusterung (catalogs <I/119>, <I/122>)
*    C = Cordoba Durchmusterung (catalog <I/114>)
*    P = Cape Photographic Durchmusterung (catalog <I/108>)
*Note on q_pi:
*    G = good
*    F = fair
*    P = poor
*    X = discordant
*Note on o_pi:
*    Number of parallax observations included in the weighted average
*    parallax

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

C  Declarations for 'source.dat'	! Explanation of the source codes

      integer*4 nr__1
      parameter (nr__1=58)	! Number of records
      character*148 ar__1  	! Full-size record

      character*3   type        ! [ubvsp ] type of source, "ubv" or "sp"
      character*1   code        ! Code for source (ubv or sp)
      character*142 source      ! Source reference.

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

C  Declarations for 'errata.dat'	! *Corrections and additions by Erkki U. Vilkki

      integer*4 nr__2
      parameter (nr__2=2132)	! Number of records
      character*132 ar__2  	! Full-size record

      real*8        GCTP_1      ! Designation in  picat.dat
      character*3   m_GCTP      ! Multicplicity index on GCTP
      character*121 Text        ! Text of note

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

C  Loading file 'picat.dat'	! The data file

C  Format for file interpretation

    1 format(
     +  A1,F7.2,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,A1,1X,F5.2,
     +  A1,1X,F5.2,1X,F5.2,1X,A1,1X,A10,A1,A1,A9,I4,A1,A7,A10,A11,
     +  F6.3,1X,I3,1X,F7.4,1X,I3,1X,A1,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'picat.dat')
      write(6,*) '....Loading file: picat.dat'
      do i__=1,8994
        read(1,'(A132)')ar__
        read(ar__,1)
     +  f_GCTP,GCTP,RAh,RAm,RAs,DE_,DEd,DEm,DEs,u_RAm,Vmag,n_Vmag,B_V,
     +  U_B,r_Vmag,MK,r_MK,comp,var,HR,supp,HD,DM,name,pm,pmPA,pi,
     +  e_pi,q_pi,o_pi
        if(ar__(10:11) .EQ. '') RAh = iNULL__
        if(ar__(13:14) .EQ. '') RAm = iNULL__
        if(ar__(16:19) .EQ. '') RAs = rNULL__
        if(ar__(22:23) .EQ. '') DEd = iNULL__
        if(ar__(25:26) .EQ. '') DEm = iNULL__
        if(ar__(28:29) .EQ. '') DEs = iNULL__
        if(ar__(32:36) .EQ. '') Vmag = rNULL__
        if(ar__(39:43) .EQ. '') B_V = rNULL__
        if(ar__(45:49) .EQ. '') U_B = rNULL__
        if(ar__(74:77) .EQ. '') HR = iNULL__
        if(ar__(107:112) .EQ. '') pm = rNULL__
        if(ar__(114:116) .EQ. '') pmPA = iNULL__
        if(ar__(118:124) .EQ. '') pi = rNULL__
        if(ar__(126:128) .EQ. '') e_pi = iNULL__
        if(ar__(131:132) .EQ. '') o_pi = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  f_GCTP,GCTP,RAh,RAm,RAs,DE_,DEd,DEm,DEs,u_RAm,Vmag,n_Vmag,B_V,
     +  U_B,r_Vmag,MK,r_MK,comp,var,HR,supp,HD,DM,name,pm,pmPA,pi,
     +  e_pi,q_pi,o_pi
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'source.dat'	! Explanation of the source codes

C  Format for file interpretation

    2 format(A3,1X,A1,1X,A142)

C  Effective file loading

      open(unit=1,status='old',file=
     +'source.dat')
      write(6,*) '....Loading file: source.dat'
      do i__=1,58
        read(1,'(A148)')ar__1
        read(ar__1,2)type,code,source
c    ..............Just test output...........
        write(6,2)type,code,source
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'errata.dat'	! *Corrections and additions by Erkki U. Vilkki

C  Format for file interpretation

    3 format(F7.2,A3,1X,A121)

C  Effective file loading

      open(unit=1,status='old',file=
     +'errata.dat')
      write(6,*) '....Loading file: errata.dat'
      do i__=1,2132
        read(1,'(A132)')ar__2
        read(ar__2,3)GCTP_1,m_GCTP,Text
c    ..............Just test output...........
        write(6,3)GCTP_1,m_GCTP,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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