FORTRAN Generation
(/./ftp/cats/J/A_A/603/A30)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/603/A30 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 2024-Apr-16
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/603/A30  Evidence for two distinct giant planet population (Santos+, 2017)
*================================================================================
*Observational evidence for two distinct giant planet populations.
*    Santos N.C., Adibekyan V., Figueira P., Andreasen D.T., Barros S.C.C.,
*    Delgado-Mena E., Demangeon O., Faria J.P., Oshagh M., Sousa S.G.,
*    Viana P.T.P., Ferreira A.C.S.
*    <Astron. Astrophys. 603, A30 (2017)>
*    =2017A&A...603A..30S        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table.dat'	! Sample overview

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

      character*15  Star       (nr__) ! Star name
      real*8        Vmag       (nr__) ! ?=- V magnitude
      real*8        Teff       (nr__) ! (K) ?=- Effective temperature
      real*4        logg       (nr__) ! ([cm/s2]) ?=- Stellar surface gravity
      real*8        smaj       (nr__) ! (AU) ?=- Semi-major axis
      real*4        v_Fe_H_    (nr__) ! ([-]) Metallicity
      real*4        Mass_      (nr__) ! (Msun) ?=- Stellar mass
      real*4        MassPl     (nr__) ! (Mjup) ?=- Planet mass
      real*8        Per        (nr__) ! (d) ?=- Planet orbital period
      real*8        e          (nr__) ! ?=- Planet orbital eccentricity

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

C  Loading file 'table.dat'	! Sample overview

C  Format for file interpretation

    1 format(
     +  A15,1X,F7.4,1X,F7.1,1X,F4.2,1X,F13.8,1X,F5.2,1X,F4.2,1X,
     +  E16.13,1X,F17.11,1X,F7.5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table.dat')
      write(6,*) '....Loading file: table.dat'
      do i__=1,3360
        read(1,'(A104)')ar__
        read(ar__,1)
     +  Star(i__),Vmag(i__),Teff(i__),logg(i__),smaj(i__),
     +  v_Fe_H_(i__),Mass_(i__),MassPl(i__),Per(i__),e(i__)
        if (idig(ar__(17:23)).EQ.0) Vmag(i__) =  rNULL__
        if (idig(ar__(25:31)).EQ.0) Teff(i__) =  rNULL__
        if (idig(ar__(33:36)).EQ.0) logg(i__) =  rNULL__
        if (idig(ar__(38:50)).EQ.0) smaj(i__) =  rNULL__
        if (idig(ar__(58:61)).EQ.0) Mass_(i__) =  rNULL__
        if (idig(ar__(63:78)).EQ.0) MassPl(i__) =  rNULL__
        if (idig(ar__(80:96)).EQ.0) Per(i__) =  rNULL__
        if (idig(ar__(98:104)).EQ.0) e(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Star(i__),Vmag(i__),Teff(i__),logg(i__),smaj(i__),
     +  v_Fe_H_(i__),Mass_(i__),MassPl(i__),Per(i__),e(i__)
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