FORTRAN Generation
(/./ftp/cats/V/59/)

Conversion of standardized ReadMe file for file /./ftp/cats/V/59/ 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 2017-Sep-22
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. V/59      Cataclysmic Binaries, LMXBs and related objects, 5th Ed. (Ritter 1990)
*================================================================================
*Catalogue of cataclysmic binaries, low-mass X-ray binaries and
*related objects (5th edition).
*     RITTER H.: 1990
*    <Astron. Astrophys. Suppl. Ser. 85, 1179 (1990)>
*    =1990A&AS...85.1179R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog'	! *Cataclysmic binaries in machine-readable format

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

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

      character*12  Name       (nr__) ! Object name
      character*12  Alias      (nr__) ! Alternative name
      integer*4     RAh        (nr__) ! (h) Right Ascension J2000 (hours)
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes)
      real*4        RAs        (nr__) ! (s) ?Right Ascension J2000 (seconds)
      character*1   DE_        (nr__) ! Declination J2000 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination J2000 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes)
      integer*4     DEs        (nr__) ! (arcsec) ? Declination J2000 (seconds)
      character*1   e_DEs      (nr__) ! (arcsec) [1-9A-F]  Accuracy of the coordinates,
*                                    in hexadecimal number (A=10")
      character*2   Type1      (nr__) ! Type of the object (1)
      character*1   u_Type1    (nr__) ! [?] Uncertainty flag on Type1
      character*2   Type2      (nr__) ! Second Type of the object (1)
      character*1   u_Type2    (nr__) ! [?] Uncertainty flag on Type2
      character*2   Type3      (nr__) ! Third Type of the object (1)
      character*2   Type4      (nr__) ! Fourth Type of the object (1)
      character*1   l_mag1     (nr__) ! Limit flag on mag1
      real*4        mag1       (nr__) ! (mag) ?=99.9 MAG1 (see "print" file page 13)
      character*1   x_mag1     (nr__) ! [B] Indication on mag1 (2)
      character*1   l_mag2     (nr__) ! [>] Limit flag on mag2
      real*4        mag2       (nr__) ! (mag) ?=99.9 MAG2 (see "print" file page 13)
      character*1   x_mag2     (nr__) ! [B] Indication on mag2 (2)
      character*1   l_mag3     (nr__) ! Limit flag on mag3
      real*4        mag3       (nr__) ! (mag) ?=99.9 MAG3 (see "print" file page 13)
      character*1   x_mag3     (nr__) ! [B?:] Indication on mag3 (2)
      character*1   l_mag4     (nr__) ! [>] Limit flag on mag4
      real*4        mag4       (nr__) ! (mag) ?=99.9 MAG4 (see "print" file page 13)
      character*1   x_mag4     (nr__) ! [B:] Indication on mag4 (2)
      integer*4     T1         (nr__) ! (d) ? typical time interval between outbursts
      character*1   n_T1       (nr__) ! [-:] may be ":" or "-", when a maximum value
*                                    T1upper is available
      integer*4     T1upper    (nr__) ! (d) ? Maximum value of T1
      integer*4     T2         (nr__) ! (d) ? Time interval between superoutbursts
      character*1   u_T2       (nr__) ! [?:] Uncertainty flag on T2
      real*8        Per1       (nr__) ! (d) ? Orbital period, in days
      character*1   u_Per1     (nr__) ! [*:] ":" means uncertain value, and a
*                                       "*" means spectroscopic period
      real*8        Per2       (nr__) ! (d) ? Second period in days (see "print" file)
      character*1   u_Per2     (nr__) ! Uncertainty flag (:) on Per2
      real*8        Per3       (nr__) ! (s) ? Third Period (see "print" file) in seconds
      character*1   n_Per3     (nr__) ! [:QT] Transient note (3)
      real*8        Per4       (nr__) ! (s) ? Fourth Period (see "print" file) in seconds
      character*1   EBflag     (nr__) ! [12D] occurence of eclipses (see "print" file)
      integer*4     SBflag     (nr__) ! [1/2]? Type of spectroscopic binary
      character*8   Sp2        (nr__) ! Spectral type of the secondary (4)
      character*4   Sp1        (nr__) ! Spectral type of the primary (4)
      real*4        M1_M2      (nr__) ! ? Mass ratio M1/M2
      character*1   u_M1_M2    (nr__) ! Uncertainty flag (:) on M1/M2
      real*4        e_M1_M2    (nr__) ! ? error of M1/M2
      character*1   l_i        (nr__) ! [<] Limit flag on i
      real*4        i          (nr__) ! (deg) ? Orbital inclination
      character*1   u_i        (nr__) ! Uncertainty flag (:) on i
      real*4        e_i        (nr__) ! (deg) ? Mean error on i
      character*1   l_M1       (nr__) ! Limit flag on M1
      real*4        M1         (nr__) ! (solMass) ? Mass of the primary
      character*1   u_M1       (nr__) ! Uncertainty flag (:) on M1
      real*4        e_M1       (nr__) ! (solMass) ? Mean error on M1
      real*4        M2         (nr__) ! (solMass) ? Mass of the secondary
      character*1   u_M2       (nr__) ! Uncertainty flag (:) on M2
      real*4        e_M2       (nr__) ! (solMass) ? Mean error on M2
*Note (1): see "print" file, pages 12-13
*Note (2): a "B" means that the magnitude is blue (visual otherwise)
*          a "?" or ":" means that the value is uncertain
*Note (3): "Q" means occurence of transient quasi-periodic oscillations
*          "T" means transient
*          ":" means unaccurate
*Note (4): the rightmost number indicates the luminosity class, i.e.
*     1=I    2=II    3=III    4=IV    5=V    6=VI

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

C  Loading file 'catalog'	! *Cataclysmic binaries in machine-readable format

C  Format for file interpretation

    1 format(
     +  A12,1X,A12,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,A1,1X,
     +  A2,A1,A2,A1,1X,A2,1X,A2,1X,A1,F4.1,A1,1X,A1,F4.1,A1,1X,A1,
     +  F4.1,A1,1X,A1,F4.1,A1,1X,I3,A1,I2,1X,I5,A1,F9.6,A1,F9.6,A1,1X,
     +  F9.4,A1,1X,F11.4,1X,A1,1X,I1,1X,A8,2X,A4,1X,F5.2,A1,1X,F4.2,
     +  1X,A1,F4.1,A1,1X,F4.1,1X,A1,F4.2,A1,1X,F4.2,1X,F5.3,A1,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog')
      write(6,*) '....Loading file: catalog'
      do i__=1,168
        read(1,'(A214)')ar__
        read(ar__,1)
     +  Name(i__),Alias(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),Type1(i__),u_Type1(i__),
     +  Type2(i__),u_Type2(i__),Type3(i__),Type4(i__),l_mag1(i__),
     +  mag1(i__),x_mag1(i__),l_mag2(i__),mag2(i__),x_mag2(i__),
     +  l_mag3(i__),mag3(i__),x_mag3(i__),l_mag4(i__),mag4(i__),
     +  x_mag4(i__),T1(i__),n_T1(i__),T1upper(i__),T2(i__),u_T2(i__),
     +  Per1(i__),u_Per1(i__),Per2(i__),u_Per2(i__),Per3(i__),
     +  n_Per3(i__),Per4(i__),EBflag(i__),SBflag(i__),Sp2(i__),
     +  Sp1(i__),M1_M2(i__),u_M1_M2(i__),e_M1_M2(i__),l_i(i__),i(i__),
     +  u_i(i__),e_i(i__),l_M1(i__),M1(i__),u_M1(i__),e_M1(i__),
     +  M2(i__),u_M2(i__),e_M2(i__)
        if(ar__(33:36) .EQ. '') RAs(i__) = rNULL__
        if(ar__(45:46) .EQ. '') DEs(i__) = iNULL__
        if(ar__(91:93) .EQ. '') T1(i__) = iNULL__
        if(ar__(95:96) .EQ. '') T1upper(i__) = iNULL__
        if(ar__(98:102) .EQ. '') T2(i__) = iNULL__
        if(ar__(104:112) .EQ. '') Per1(i__) = rNULL__
        if(ar__(114:122) .EQ. '') Per2(i__) = rNULL__
        if(ar__(125:133) .EQ. '') Per3(i__) = rNULL__
        if(ar__(136:146) .EQ. '') Per4(i__) = rNULL__
        if(ar__(150:150) .EQ. '') SBflag(i__) = iNULL__
        if(ar__(167:171) .EQ. '') M1_M2(i__) = rNULL__
        if(ar__(174:177) .EQ. '') e_M1_M2(i__) = rNULL__
        if(ar__(180:183) .EQ. '') i(i__) = rNULL__
        if(ar__(186:189) .EQ. '') e_i(i__) = rNULL__
        if(ar__(192:195) .EQ. '') M1(i__) = rNULL__
        if(ar__(198:201) .EQ. '') e_M1(i__) = rNULL__
        if(ar__(203:207) .EQ. '') M2(i__) = rNULL__
        if(ar__(210:214) .EQ. '') e_M2(i__) = rNULL__
        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)
     +  Name(i__),Alias(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),Type1(i__),u_Type1(i__),
     +  Type2(i__),u_Type2(i__),Type3(i__),Type4(i__),l_mag1(i__),
     +  mag1(i__),x_mag1(i__),l_mag2(i__),mag2(i__),x_mag2(i__),
     +  l_mag3(i__),mag3(i__),x_mag3(i__),l_mag4(i__),mag4(i__),
     +  x_mag4(i__),T1(i__),n_T1(i__),T1upper(i__),T2(i__),u_T2(i__),
     +  Per1(i__),u_Per1(i__),Per2(i__),u_Per2(i__),Per3(i__),
     +  n_Per3(i__),Per4(i__),EBflag(i__),SBflag(i__),Sp2(i__),
     +  Sp1(i__),M1_M2(i__),u_M1_M2(i__),e_M1_M2(i__),l_i(i__),i(i__),
     +  u_i(i__),e_i(i__),l_M1(i__),M1(i__),u_M1(i__),e_M1(i__),
     +  M2(i__),u_M2(i__),e_M2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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