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

Conversion of standardized ReadMe file for file /./ftp/cats/I/238A 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-Nov-18
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      (nr__) ! (deg) Right Ascension 1900.0
      real*8        DEdeg      (nr__) ! (deg)     Declination 1900.0
C  ---------------------------------- ! (position vector(s) in degrees)

      character*1   f_GCTP     (nr__) ! [*] Indicates a note in file "errata.dat"
      real*8        GCTP       (nr__) ! *Catalog number
      integer*4     RAh        (nr__) ! (h) ?Right ascension hours (1900.0)
      integer*4     RAm        (nr__) ! (min) ?Right ascension minutes (1900.0)
      real*4        RAs        (nr__) ! (s) *?Right ascension seconds (1900.0)
      character*1   DE_        (nr__) ! Declination sign
      integer*4     DEd        (nr__) ! (deg) ?Declination degrees (1900.0)
      integer*4     DEm        (nr__) ! (arcmin) ?Declination minutes (1900.0)
      integer*4     DEs        (nr__) ! (arcsec) ?Declination seconds (1900.0)
      character*1   u_RAm      (nr__) ! *[:C] : = lower precision position
      real*4        Vmag       (nr__) ! (mag) *?V magnitude or other magnitude
      character*1   n_Vmag     (nr__) ! P indicates blue passband
      real*4        B_V        (nr__) ! (mag) ?B-V color
      real*4        U_B        (nr__) ! (mag) ?U-B color
      character*1   r_Vmag     (nr__) ! Source code for photometry
      character*10  MK         (nr__) ! *Spectral type
      character*1   r_MK       (nr__) ! Source code for spectral type
      character*1   comp       (nr__) ! *Double star component
      character*9   var        (nr__) ! *Variable star name
      integer*4     HR         (nr__) ! *?HR number
      character*1   supp       (nr__) ! [S] S=in Hoffleit BSS Cat. <V/36>
      character*7   HD         (nr__) ! HD number and component
      character*10  DM         (nr__) ! *DM identification and component
      character*11  name       (nr__) ! Star name
      real*4        pm         (nr__) ! (arcsec/yr) ?Total Proper motion
      integer*4     pmPA       (nr__) ! (deg) ?Proper motion position angle
      real*8        pi         (nr__) ! (arcsec) ?Weighted absolute parallax
      integer*4     e_pi       (nr__) ! (0.1mas) ?Standard error of parallax
      character*1   q_pi       (nr__) ! *[ GFPX]Quality of interagreement
      integer*4     o_pi       (nr__) ! *?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       (nr__1) ! [ubvsp ] type of source, "ubv" or "sp"
      character*1   code       (nr__1) ! Code for source (ubv or sp)
      character*142 source     (nr__1) ! 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     (nr__2) ! Designation in  picat.dat
      character*3   m_GCTP     (nr__2) ! Multicplicity index on GCTP
      character*121 Text       (nr__2) ! 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(i__),GCTP(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),u_RAm(i__),Vmag(i__),n_Vmag(i__),
     +  B_V(i__),U_B(i__),r_Vmag(i__),MK(i__),r_MK(i__),comp(i__),
     +  var(i__),HR(i__),supp(i__),HD(i__),DM(i__),name(i__),pm(i__),
     +  pmPA(i__),pi(i__),e_pi(i__),q_pi(i__),o_pi(i__)
        if(ar__(10:11) .EQ. '') RAh(i__) = iNULL__
        if(ar__(13:14) .EQ. '') RAm(i__) = iNULL__
        if(ar__(16:19) .EQ. '') RAs(i__) = rNULL__
        if(ar__(22:23) .EQ. '') DEd(i__) = iNULL__
        if(ar__(25:26) .EQ. '') DEm(i__) = iNULL__
        if(ar__(28:29) .EQ. '') DEs(i__) = iNULL__
        if(ar__(32:36) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(39:43) .EQ. '') B_V(i__) = rNULL__
        if(ar__(45:49) .EQ. '') U_B(i__) = rNULL__
        if(ar__(74:77) .EQ. '') HR(i__) = iNULL__
        if(ar__(107:112) .EQ. '') pm(i__) = rNULL__
        if(ar__(114:116) .EQ. '') pmPA(i__) = iNULL__
        if(ar__(118:124) .EQ. '') pi(i__) = rNULL__
        if(ar__(126:128) .EQ. '') e_pi(i__) = iNULL__
        if(ar__(131:132) .EQ. '') o_pi(i__) = iNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  f_GCTP(i__),GCTP(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),u_RAm(i__),Vmag(i__),n_Vmag(i__),
     +  B_V(i__),U_B(i__),r_Vmag(i__),MK(i__),r_MK(i__),comp(i__),
     +  var(i__),HR(i__),supp(i__),HD(i__),DM(i__),name(i__),pm(i__),
     +  pmPA(i__),pi(i__),e_pi(i__),q_pi(i__),o_pi(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
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(i__),code(i__),source(i__)
c    ..............Just test output...........
        write(6,2)type(i__),code(i__),source(i__)
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(i__),m_GCTP(i__),Text(i__)
c    ..............Just test output...........
        write(6,3)GCTP_1(i__),m_GCTP(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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