FORTRAN Generation
(/./ftp/cats/J/A_A/560/A4)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/560/A4 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 2026-Aug-11
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/A+A/560/A4        Rotation periods of active Kepler stars    (Reinhold+, 2013)
*================================================================================
*Rotation and differential rotation of active Kepler stars.
*    Reinhold T., Reiners A., Basri G.
*   <Astron. Astrophys. 560, A4 (2013)>
*   =2013A&A...560A...4R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table.dat'	! Rotation periods of Kepler stars

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

      integer*4     KIC         ! Kepler Input catalogue (KIC, V/133) number,
*                                  unique Kepler ID of each star
      real*8        P1          ! (d) Primary rotation period measured for all stars
      real*4        e_P1        ! (d) Error of P1 estimated by fitting a parabola to
*                                  the corresponding periodogram peak
      real*8        P2          ! (d) ?=- Second rotation period detected
      real*8        e_P2        ! (d) ?=- Error of P2
      integer*4     Teff        ! (K) [3232/17018] Effective temperature (from KIC)
      real*4        logg        ! ([cm/s2]) [3.5/6.11] Surface gravity (from KIC)
      real*4        Rvar        ! (%) [0/100]?=- Range of the variability amplitude
*                                (5th to 95th percentile of the total flux range;
*                                active stars have Rvar>0.3%)
      real*4        B_V         ! (mag) B-V color (1)
*Note (1): B-V color calculated from relation between (g-r) given by KIC and
*     (B-V) (see Jester et. al. 2005, Cat. J/AJ/130/873)

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

C  Loading file 'table.dat'	! Rotation periods of Kepler stars

C  Format for file interpretation

    1 format(
     +  I8,1X,F7.4,1X,F6.4,1X,F7.4,2X,F7.4,1X,I5,1X,F4.2,2X,F5.2,1X,
     +  F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table.dat')
      write(6,*) '....Loading file: table.dat'
      do i__=1,24124
        read(1,'(A64)')ar__
        read(ar__,1)KIC,P1,e_P1,P2,e_P2,Teff,logg,Rvar,B_V
        if (idig(ar__(25:31)).EQ.0) P2 =  rNULL__
        if (idig(ar__(34:40)).EQ.0) e_P2 =  rNULL__
        if (idig(ar__(54:58)).EQ.0) Rvar =  rNULL__
c    ..............Just test output...........
        write(6,1)KIC,P1,e_P1,P2,e_P2,Teff,logg,Rvar,B_V
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end