FORTRAN Generation
(/./ftp/cats/J/ApJ/315/687)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/315/687 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-Mar-29
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/ApJ/315/687 X-Ray emission from solar-type stars: F and G   (Maggio+, 1987)
*================================================================================
*Einstein Observatory survey of X-ray emission from solar-type stars: the late F
*and G dwarf stars.
*       Maggio A., Sciortino S., Vaiana G.S., Majer P., Bookbinder J., Golub L.,
*       Harnden F.R.Jr, Rosner R.
*      <Astrophys. J. 315, 687 (1987)>
*      =1987ApJ...315..687M      (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'gstars_1.dat'	! EO Survey of Solar-type Stars: Optical Properties

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

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

      character*8   Name        ! Star-name  (1)
      character*8   HD          ! ? HD/DM (Henry Draper Catalog) number (1)
      integer*4     HR          ! HR (Bright Star Catalog) number (1)
      character*10  Oname       ! Other Name (1)
      character*11  Sp          ! Spectral class (2)
      real*4        Mabs        ! (mag) Absolute visual magnitude (2)
      real*4        B_V         ! (mag) B-V color index (2)
      real*4        Dist        ! (pc) Distance (2)
      character*55  Rem         ! Remarks (3)
      integer*4     RAh         ! (h) Right Ascension (B1950) (hour)
      integer*4     RAm         ! (min) Right Ascension (B1950) (min)
      integer*4     RAs         ! (s) Right Ascension (B1950) (sec)
      character*1   DE_         ! Declination sign (B1950)
      integer*4     DEd         ! (deg) Declination (B1950) (deg)
      integer*4     DEm         ! (arcmin) Declination (B1950) (arcmin)
      integer*4     DEs         ! (arcsec) Declination (B1950) (arcsec)
*Note (1): These columns contain the name of the star, its HD (Henry Draper
*          Catalog (Cat.<III/135>) number, its HR (Bright Star Catalog
*          (See <V/50>)) number, and its other name, if any.
*Note (2): These columns contain basic optical information about the stars
*          in this survey. The spectral class, listed in the "Sp" column, is
*          from Hoffleit and Jaschek 1982 (See Cat. <V/50>). The absolute
*          visual magnitude is given in the "Mabs" column; the B-V color
*          index is given in the "B-V" column; and the distance, in parsecs,
*          is given in the "Dist" column.
*Note (3): This column contains remarks, mostly from Hoffleit and Jaschek
*          (1982) (See Cat. <V/50>:
*
*          SB1 and SB2 -- indicate spectroscopic binaries with single- or
*                         double-lined spectra (respectively)
*          suffix "O"  -- signifies that an orbit has been determined
*             Cp       -- indicates companion
*            CPM       -- common proper motion
*             RV       -- radial velocity
*            A,B,C     -- indicate first, second, and third brightest members
*                         (respectively) in multiple systems
*            Sun       -- Not directly observed; for inferences of solar
*                         X-ray emission from Einstein observations of the
*                         sunlit Earth, see Schmitt, Harnden, and Fink
*                         (1987ApJ...322.1023S)

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

C  Declarations for 'gstars_2.dat'	! EO Survey of Solar-type Stars: X-ray Fluxes

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

      character*8   Name_1      ! Star name (1)
      character*1   mult        ! [SM] Multiplicity flag (1)
      integer*4     Seqno       ! IPC sequence number (2)
      character*1   f_fx        ! [01] "1" if X-ray flux is an upper limit (3)
      real*4        fx          ! (10-16W/m2) X-ray flux in the 0.16-4.0 keV band (3)
      character*1   Remark      ! Numeric reference to remarks from the
*                                 published table (4)
*Note (1): The "Name" column gives the star name. For the star's HD (Bright
*          Star Catalog (See <V/50>)) or HR (Henry Draper Catalog
*          (Cat.<III/135>) numbers, or its other name, see the table
*          gstars_1.dat. The "mult" column contains a multiplicity flag. We
*          consider a source (or upper limit) to be multiple (M), for
*          purposes of determining X-ray fluxes, if there is at least one
*          other optical source within a 2' radius of the optical
*          counterpart of the IPC source and as long as there is no
*          additional X-ray information from HRI exposures which resolves
*          the sources. Otherwise, the source is considered single (S).
*Note (2): This column contains the Einstein sequence number, a two to five
*          digit number which uniquely identifies the observation. The
*          numbers were assigned sequentially at the time of proposal
*          submission.
*Note (3): The first column is flagged with a "1" if the given X-ray flux is
*          an upper limit; if the column is marked with a "0", the star was
*          detected in the broad band and the X-ray flux is determined from
*          the measured count rate. The X-ray flux is given in the "fx"
*          column in the 0.15-4.0 keV band in units of 10^-13^ erg/cm^2^/s
*          (or 10^-16^ W/m2).
*          Present in the published table but omitted here is the fourth
*          column which gave X-ray fluxes from multiple IPC exposures of the
*          same star or from single IPC exposures for which an HRI exposure
*          is also available. Here we give only a single, "adopted" flux for
*          each star (which appeared in the fifth column of the published
*          table).
*Note (4): This column gives a numeric reference to remarks in the published
*          table. The following are used:
*
*          1   77% of X-ray emission can be attributed to 34B (dM0) on the
*              basis of HRI observation (Harris and Johnson, 1985ApJ...294..649H)
*          2   Mean value adopted
*          3   Upper limit due to source confusion
*          4   70% of x-ray emission can be attributed to W559B (K0V) on the
*              basis of HRI observation (Golub, et al. 1982ApJ...253..242G)

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

C  Declarations for 'gstars_3.dat'	! EO Survey of Solar-type Stars: X-ray Luminosities

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

      character*8   Name_2      ! Star name (1)
      character*1   f_lx        ! Flag on lx (2)
      real*4        Lx          ! ([10-7W]) log of X-ray luminosity from 0.15 - 4.0 keV (2)
      character*1   l_Age       ! [ >] limit flag on age (3)
      real*4        Age         ! (Gyr) ? yrs Age in Giga-years (3)
      character*1   r_Age       ! Reference for age (3)
      real*4        Vsini       ! (km/s) Rotational velocity (4)
      real*4        e_Vsini     ! (km/s) Error on rotational velocity (4)
      character*1   r_Vsini     ! Reference for rotational velocity (4)
      real*4        Veq         ! (km/s) Equatorial velocity (5)
      character*1   r_Veq       ! Reference for Equatorial velocity (5)
*Note (1): This column gives the star name. For the star's HD (Bright Star
*          Catalog) or HR (Henry Draper Catalog) number, or an alternative
*          name, see the table gstars_1.dat.
*Note (2): The first column is flagged with a "1" if the given X-ray
*          luminosity is an upper limit; if the column is marked with a "0",
*          the star was detected in the broad band and the X-ray luminosity
*          is determined from the measured count rate. The log of the X-ray
*          luminosity is given in the "lx" column in ergs/s in the 0.15-4.0
*          keV passband. Because individual distances are known only to
*          within an error of 20% or less, we estimate an overall error of
*          0.25 in the logarithm of the X-ray luminosity.
*Note (3): The "Age" column gives the age of the star, in billions of years.
*          The reference for the age is given in the "r_Age" column. The
*          following references were used (note: column is 0 if no reference
*          is made):
*               1  Soderblom, 1982ApJ...263..239S
*               3  Baliunas, et al.  1983ApJ...275..752B
*Note (4): The rotational velocity and its error and reference are given in
*          these columns. The rotational velocity and error are in units of
*          km/s and the following references were used (note: column is 0 if
*          no reference is made):
*               1  Soderblom, 1982ApJ...263..239S
*               5  Smith, 1979PASP...91..737S
*               6  Kraft, R.P. 1967ApJ...150..551K
*Note (5): The "Veq" column gives equatorial velocity, inferred from
*          measured periods (in km/s). The reference is given in the
*          "r_Veq" column. The following references were used (note:
*          column is 0 if no reference is made):
*
*               2  Duncan, 1981ApJ...248..651D
*               4  Noyes, et al. 1984ApJ...279..763N
*               7  Hallam and Wolff, 1981ApJ...248L..73H

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

C  Loading file 'gstars_1.dat'	! EO Survey of Solar-type Stars: Optical Properties

C  Format for file interpretation

    1 format(
     +  1X,A8,1X,A8,1X,I4,1X,A10,1X,A11,1X,F4.2,1X,F4.2,1X,F5.2,1X,
     +  A55,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'gstars_1.dat')
      write(6,*) '....Loading file: gstars_1.dat'
      do i__=1,62
        read(1,'(A137)')ar__
        read(ar__,1)
     +  Name,HD,HR,Oname,Sp,Mabs,B_V,Dist,Rem,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs
        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)
     +  Name,HD,HR,Oname,Sp,Mabs,B_V,Dist,Rem,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'gstars_2.dat'	! EO Survey of Solar-type Stars: X-ray Fluxes

C  Format for file interpretation

    2 format(1X,A8,1X,A1,1X,I5,1X,A1,1X,F5.2,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'gstars_2.dat')
      write(6,*) '....Loading file: gstars_2.dat'
      do i__=1,61
        read(1,'(A27)')ar__1
        read(ar__1,2)Name_1,mult,Seqno,f_fx,fx,Remark
c    ..............Just test output...........
        write(6,2)Name_1,mult,Seqno,f_fx,fx,Remark
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'gstars_3.dat'	! EO Survey of Solar-type Stars: X-ray Luminosities

C  Format for file interpretation

    3 format(
     +  1X,A8,1X,A1,1X,F5.2,1X,A1,F3.1,1X,A1,1X,F4.1,1X,F3.1,1X,A1,1X,
     +  F4.1,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'gstars_3.dat')
      write(6,*) '....Loading file: gstars_3.dat'
      do i__=1,62
        read(1,'(A42)')ar__2
        read(ar__2,3)
     +  Name_2,f_lx,Lx,l_Age,Age,r_Age,Vsini,e_Vsini,r_Vsini,Veq,r_Veq
        if(ar__2(20:22) .EQ. '') Age = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name_2,f_lx,Lx,l_Age,Age,r_Age,Vsini,e_Vsini,r_Vsini,Veq,r_Veq
c    .......End.of.Just test output...........
      end do
      close(1)

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