FORTRAN Generation
(/./ftp/cats/J/A_A/430/137)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/430/137 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-19
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/430/137    Close visual companions in Scorpius OB2    (Kouwenhoven+, 2005)
*================================================================================
*The primordial binary population. I. A near-infrared adaptive optics search for
*close visual companions to A star members of Scorpius OB2.
*    Kouwenhoven M.B.N., Brown A.G.A., Zinnecker H., Kaper L.,
*    Portegies Zwart S.F.
*   <Astron. Astrophys., 430, 137-154 (2005)>
*   =2005A&A...430..137K
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Results from the ADONIS adaptive optics survey
                             among 199 Sco OB2 member stars

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

      integer*4     HIP        (nr__) ! Hipparcos number of target (primary) star (1)
      real*4        Jmag       (nr__) ! (mag) ? J magnitude of the observed star
      real*4        Hmag       (nr__) ! (mag) ? H magnitude of the observed star
      real*4        Ksmag      (nr__) ! (mag) ? Ks magnitude of the observed star
      character*11  SpType     (nr__) ! Primary (target) star MK spectral type
      real*4        rho        (nr__) ! (arcsec) ? Angular separation between target and
*                                     observed stars
      real*4        PA         (nr__) ! (deg) ? Position angle, measured from North to East,
*                                     between target and observed stars
      character*2   status     (nr__) ! [pcnb ] Status of the observed star (2)
      character*3   subg       (nr__) ! Subgroup of target (primary) star (3)
      character*2   Rem        (nr__) ! [JH ] JH: observing conditions were not
*                                             photometric
*Note (1): The Hipparcos member stars HIP 77315 and HIP 77317 are a common
*    proper motion pair (see the Double Star Catalog, Cat. <I/237>). Here,
*    the two stars are treated as separate primaries and not as one system.
*Note (2): Status is coded as follows:
*      p = primary/single, target star
*      c = companion
*      n = new
*      b = background
*Note (3): Subgroups use the following abbreviations:
*     US = Upper Scorpius
*    LCC = Upper Centaurus Lupus
*    UCL = Lower Centaurus Crux

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

C  Loading file 'table1.dat'	! Results from the ADONIS adaptive optics survey
*                             among 199 Sco OB2 member stars

C  Format for file interpretation

    1 format(
     +  3X,I5,3X,F5.2,3X,F5.2,3X,F5.2,1X,A11,3X,F5.2,3X,F6.2,1X,A2,1X,
     +  A3,2X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,348
        read(1,'(A72)')ar__
        read(ar__,1)
     +  HIP(i__),Jmag(i__),Hmag(i__),Ksmag(i__),SpType(i__),rho(i__),
     +  PA(i__),status(i__),subg(i__),Rem(i__)
        if(ar__(12:16) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(20:24) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(28:32) .EQ. '') Ksmag(i__) = rNULL__
        if(ar__(48:52) .EQ. '') rho(i__) = rNULL__
        if(ar__(56:61) .EQ. '') PA(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  HIP(i__),Jmag(i__),Hmag(i__),Ksmag(i__),SpType(i__),rho(i__),
     +  PA(i__),status(i__),subg(i__),Rem(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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