FORTRAN Generation
(/./ftp/cats/J/A_A/536/A31)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/536/A31 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-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/A+A/536/A31       Cyg OB2 XMM observations                     (Rauw, 2011)
*================================================================================
*A multi-epoch XMM-Newton campaign on the core of the massive Cyg OB2
*association.
*    Rauw G.
*   <Astron. Astrophys. 536, A31 (2011)>
*   =2011A&A...536A..31R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Properties of the X-ray sources in Cyg OB2

      integer*4 nr__
      parameter (nr__=199)	! Number of records
      character*326 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)

      integer*4     IDX        (nr__) ! [1/199] ID number of X-ray source
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000)
      character*1   DE_        (nr__) ! Declination sign
      integer*4     DEd        (nr__) ! (deg) Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000)
      real*4        pnCRS      (nr__) ! (ct/s) EPIC-pn count rate in soft band
      real*4        pnPrS      (nr__) ! Probability that the source be constant in
*                                 EPIC-pn soft band
      integer*4     pnNrS      (nr__) ! Number of observations in EPIC-pn soft band
      real*4        pnCRM      (nr__) ! (ct/s) EPIC-pn count rate in medium band
      real*4        pnPrM      (nr__) ! Probability that the source be constant in
*                                 EPIC-pn medium band
      integer*4     pnNrM      (nr__) ! Number of observations in EPIC-pn medium band
      real*4        pnCRH      (nr__) ! (ct/s) EPIC-pn count rate in hard band
      real*4        pnPrH      (nr__) ! Probability that the source be constant in
*                                 EPIC-pn hard band
      integer*4     pnNrH      (nr__) ! Number of observations in EPIC-pn hard band
      real*4        m1CRS      (nr__) ! (ct/s) EPIC-MOS1 count rate in soft band
      real*4        m1PrS      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS1 soft band
      integer*4     m1NrS      (nr__) ! Number of observations in EPIC-MOS1 soft band
      real*4        m1CRM      (nr__) ! (ct/s) EPIC-MOS1 count rate in medium band
      real*4        m1PrM      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS1 medium band
      integer*4     m1NrM      (nr__) ! Number of observations in EPIC-MOS1 medium band
      real*4        m1CRH      (nr__) ! (ct/s) EPIC-MOS1 count rate in hard band
      real*4        m1PrH      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS1 hard band
      integer*4     m1NrH      (nr__) ! Number of observations in EPIC-MOS1 hard band
      real*4        m2CRS      (nr__) ! (ct/s) EPIC-MOS2 count rate in soft band
      real*4        m2PrS      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS2 soft band
      integer*4     m2NrS      (nr__) ! Number of observations in EPIC-MOS2 soft band
      real*4        m2CRM      (nr__) ! (ct/s) EPIC-MOS2 count rate in medium band
      real*4        m2PrM      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS2 medium band
      integer*4     m2NrM      (nr__) ! Number of observations in EPIC-MOS2 medium band
      real*4        m2CRH      (nr__) ! (ct/s) EPIC-MOS2 count rate in hard band
      real*4        m2PrH      (nr__) ! Probability that the source be constant in
*                                 EPIC-MOS2 hard band
      integer*4     m2NrH      (nr__) ! Number of observations in EPIC-MOS2 hard band
      real*4        UVM2       (nr__) ! (mag) ? Mean XMM-OT/UVM2 AB-magnitude of counterpart
      real*4        UVW1       (nr__) ! (mag) ? Mean XMM-OT/UVW1 AB-magnitude of counterpart
      integer*4     IDOM       (nr__) ! ? ID number of OM counterpart
      real*4        Jmag       (nr__) ! (mag) ? J magnitude of 2MASS counterpart
      real*4        Hmag       (nr__) ! (mag) ? H magnitude of 2MASS counterpart
      real*4        Ksmag      (nr__) ! (mag) ? Ks magnitude of 2MASS counterpart
      character*3   q2M        (nr__) ! Quality of the 2MASS counterpart (1)
      real*4        Vmag       (nr__) ! (mag) ? V magnitude of optical counterpart from
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      real*4        U_B        (nr__) ! (mag) ? U-B colour of optical counterpart from
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      real*4        B_V        (nr__) ! (mag) ? B-V colour of optical counterpart from
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      character*31  Com        (nr__) ! Comments on spectral type and commonly used
*                                 designation of the source
*Note (1): For single 2MASS counterparts, the flag contains the 2MASS
*  quality flag; otherwise:
*  ncp = no 2MASS counterpart in the 4 arcsec correlation radius
*  2cp = two 2MASS counterparts in the 4 arcsec correlation radius
*  3cp = three 2MASS counterparts in the 4 arcsec correlation radius

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

C  Declarations for 'table4.dat'	! Properties of the UV sources in Cyg OB2

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     IDOM_1     (nr__1) ! [1/254] ID number of the OM source
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (J2000)
      real*4        UVM2_1     (nr__1) ! (mag) ? Mean XMM-OT/UVM2 (232nm) AB-magnitude
      real*8        prM2       (nr__1) ! ? Probability that the source be constant in
*                                   UVM2 filter
      real*4        UVW1_1     (nr__1) ! (mag) ? Mean XMM-OT/UVW1 (299nm) AB-magnitude
      real*8        prW1       (nr__1) ! ? Probability that the source be constant in
*                                   UVW1 filter
      real*4        rc1        (nr__1) ! (arcsec) ? Angular distance from likely optical
*                                   counterpart
      integer*4     MT91       (nr__1) ! ? ID number of the optical counterpart in
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      real*4        Vmag_1     (nr__1) ! (mag) ? V magnitude of optical counterpart from
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      real*4        U_B_1      (nr__1) ! (mag) ? U-B colour of optical counterpart from
*                                   Massey & Thompson (1991, Cat. J/AJ/101/1408)
      real*4        B_V_1      (nr__1) ! (mag) ? B-V colour of optical counterpart from
      real*4        rc2        (nr__1) ! (arcsec) ? Angular distance from likely 2MASS
*                                   counterpart
      real*4        Jmag_1     (nr__1) ! (mag) ? J magnitude of 2MASS counterpart
      real*4        Hmag_1     (nr__1) ! (mag) ? H magnitude of 2MASS counterpart
      real*4        Ksmag_1    (nr__1) ! (mag) ? Ks magnitude of 2MASS counterpart
      character*24  Com_1      (nr__1) ! Comments on spectral type and commonly used
*                                  designation of the source

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

C  Loading file 'table2.dat'	! Properties of the X-ray sources in Cyg OB2

C  Format for file interpretation

    1 format(
     +  I3,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,E10.5,4X,
     +  F6.4,1X,I1,1X,E10.5,4X,F6.4,1X,I1,1X,E10.5,4X,F6.4,1X,I1,1X,
     +  E10.5,4X,F6.4,1X,I1,1X,E10.5,4X,F6.4,1X,I1,1X,E10.5,4X,F6.4,
     +  1X,I1,1X,E10.5,4X,F6.4,1X,I1,1X,E10.5,4X,F6.4,1X,I1,1X,E10.5,
     +  4X,F6.4,1X,I1,1X,F6.3,1X,F6.3,1X,I3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,A3,1X,F5.2,1X,F5.2,2X,F4.2,1X,A31)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,199
        read(1,'(A326)')ar__
        read(ar__,1)
     +  IDX(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),pnCRS(i__),pnPrS(i__),pnNrS(i__),pnCRM(i__),
     +  pnPrM(i__),pnNrM(i__),pnCRH(i__),pnPrH(i__),pnNrH(i__),
     +  m1CRS(i__),m1PrS(i__),m1NrS(i__),m1CRM(i__),m1PrM(i__),
     +  m1NrM(i__),m1CRH(i__),m1PrH(i__),m1NrH(i__),m2CRS(i__),
     +  m2PrS(i__),m2NrS(i__),m2CRM(i__),m2PrM(i__),m2NrM(i__),
     +  m2CRH(i__),m2PrH(i__),m2NrH(i__),UVM2(i__),UVW1(i__),
     +  IDOM(i__),Jmag(i__),Hmag(i__),Ksmag(i__),q2M(i__),Vmag(i__),
     +  U_B(i__),B_V(i__),Com(i__)
        if(ar__(235:240) .EQ. '') UVM2(i__) = rNULL__
        if(ar__(242:247) .EQ. '') UVW1(i__) = rNULL__
        if(ar__(249:251) .EQ. '') IDOM(i__) = iNULL__
        if(ar__(253:258) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(260:265) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(267:272) .EQ. '') Ksmag(i__) = rNULL__
        if(ar__(278:282) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(284:288) .EQ. '') U_B(i__) = rNULL__
        if(ar__(291:294) .EQ. '') B_V(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)
     +  IDX(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),pnCRS(i__),pnPrS(i__),pnNrS(i__),pnCRM(i__),
     +  pnPrM(i__),pnNrM(i__),pnCRH(i__),pnPrH(i__),pnNrH(i__),
     +  m1CRS(i__),m1PrS(i__),m1NrS(i__),m1CRM(i__),m1PrM(i__),
     +  m1NrM(i__),m1CRH(i__),m1PrH(i__),m1NrH(i__),m2CRS(i__),
     +  m2PrS(i__),m2NrS(i__),m2CRM(i__),m2PrM(i__),m2NrM(i__),
     +  m2CRH(i__),m2PrH(i__),m2NrH(i__),UVM2(i__),UVW1(i__),
     +  IDOM(i__),Jmag(i__),Hmag(i__),Ksmag(i__),q2M(i__),Vmag(i__),
     +  U_B(i__),B_V(i__),Com(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Properties of the UV sources in Cyg OB2

C  Format for file interpretation

    2 format(
     +  I3,1X,F10.6,1X,F9.6,2X,F6.3,1X,F7.5,2X,F6.3,1X,F7.5,1X,F4.2,
     +  1X,I3,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,A24)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,254
        read(1,'(A132)')ar__1
        read(ar__1,2)
     +  IDOM_1(i__),RAdeg_1(i__),DEdeg_1(i__),UVM2_1(i__),prM2(i__),
     +  UVW1_1(i__),prW1(i__),rc1(i__),MT91(i__),Vmag_1(i__),
     +  U_B_1(i__),B_V_1(i__),rc2(i__),Jmag_1(i__),Hmag_1(i__),
     +  Ksmag_1(i__),Com_1(i__)
        if(ar__1(27:32) .EQ. '') UVM2_1(i__) = rNULL__
        if(ar__1(34:40) .EQ. '') prM2(i__) = rNULL__
        if(ar__1(43:48) .EQ. '') UVW1_1(i__) = rNULL__
        if(ar__1(50:56) .EQ. '') prW1(i__) = rNULL__
        if(ar__1(58:61) .EQ. '') rc1(i__) = rNULL__
        if(ar__1(63:65) .EQ. '') MT91(i__) = iNULL__
        if(ar__1(67:71) .EQ. '') Vmag_1(i__) = rNULL__
        if(ar__1(73:76) .EQ. '') U_B_1(i__) = rNULL__
        if(ar__1(78:81) .EQ. '') B_V_1(i__) = rNULL__
        if(ar__1(83:86) .EQ. '') rc2(i__) = rNULL__
        if(ar__1(88:93) .EQ. '') Jmag_1(i__) = rNULL__
        if(ar__1(95:100) .EQ. '') Hmag_1(i__) = rNULL__
        if(ar__1(102:107) .EQ. '') Ksmag_1(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  IDOM_1(i__),RAdeg_1(i__),DEdeg_1(i__),UVM2_1(i__),prM2(i__),
     +  UVW1_1(i__),prW1(i__),rc1(i__),MT91(i__),Vmag_1(i__),
     +  U_B_1(i__),B_V_1(i__),rc2(i__),Jmag_1(i__),Hmag_1(i__),
     +  Ksmag_1(i__),Com_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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