FORTRAN Generation
(/./ftp/cats/J/MNRAS/446/3797)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/446/3797 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-Jun-10
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/MNRAS/446/3797    Westerlund 2 UBVIc photometry            (Hur+, 2015)
*================================================================================
*Reddening, distance, and stellar content of the young open cluster Westerlund 2.
*    Hur H., Park B.-G., Sung H., Bessell M.S., Lim B., Chun M.-Y., Sohn S.T.
*   <Mon. Not. R. Astron. Soc., 446, 3797-3819 (2015)>
*   =2015MNRAS.446.3797H    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! The combined photometric data obtained with the
                                 CTIO 4m and 1m telescopes

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

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

      integer*4     Seq         ! Sequential number
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*4        Vmag        ! (mag) ? Johnson V magnitude
      real*4        Imag        ! (mag) ? Cousins I magnitude
      real*4        U_B         ! (mag) ? Johnson U-B colour index
      real*4        B_V         ! (mag) ? Johnson B-V colour index
      real*4        V_I         ! (mag) ? Johnson-Cousins V-I colour index
      real*4        e_Vmag      ! (mag) ? rms uncertainty on Vmag
      real*4        e_Imag      ! (mag) ? rms uncertainty on Imag
      real*4        e_U_B       ! (mag) ? rms uncertainty on U-B
      real*4        e_B_V       ! (mag) ? rms uncertainty on B-V
      real*4        e_V_I       ! (mag) ? rms uncertainty on V-I
      integer*4     o_Vmag      ! Number of observations for Vmag
      integer*4     o_Imag      ! Number of observations for Imag
      integer*4     o_U_B       ! Number of observations for U-B
      integer*4     o_B_V       ! Number of observations for B-V
      integer*4     o_V_I       ! Number of observations for V-I
      character*5   Rem         ! [123DEUXe ] Remarks (1)
      integer*4     MSP         ! ? ID in Moffat et al. (1991,
*                                     Cat. J/AJ/102/642),
*                                     Cl* Westerlund 2 MSP NNN in Simbad
      integer*4     A07         ! ? ID in Ascenso et al. (2007,
*                                     Cat. J/A+A/466/137),
*                                     Cl* Westerlund 2 AAB NNNN in Simbad
      character*16  v2MASS      ! 2MASS designation (HHMMSSss+DDMMSSs)
      character*17  GLIMPSE     ! GLIMPSE designation (GLLL.llll+BB.bbbb)
*Note (1): Remarks as follows:
*           D = photometric doubles
*           X = X-ray emission stars
*           U = red leak affected by a close neighbour
*           E = the early-type members with E(B-V)>=1.45
*           e = the foreground early-type stars with E(B-V)<1.45
*           1 = class 0/I
*           2 - class II
*           3 = class III

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

C  Declarations for 'table6.dat'	! *V-NIR colours and the reddening-corrected
                                 magnitude and colours of the early-type stars

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

      integer*4     Seq_1       ! Sequential number
      real*4        V_J         ! (mag) ? V-J colour index
      real*4        V_H         ! (mag) ? V-H colour index
      real*4        V_Ks        ! (mag) ? V-Ks colour index
      real*4        e_V_J       ! (mag) ? rms uncertainty on V-J
      real*4        e_V_H       ! (mag) ? rms uncertainty on V-H
      real*4        e_V_Ks      ! (mag) ? rms uncertainty on V-Ks
      real*4        V0mag       ! (mag) Reddening-corrected V magnitude (1)
      real*4        v_U_B_0     ! (mag) Reddening-corrected U-B colour index
      real*4        v_B_V_0     ! (mag) Reddening-corrected B-V colour index
      real*4        v_V_I_0     ! (mag) ? Reddening-corrected V-I colour index
      real*4        v_V_J_0     ! (mag) ? Reddening-corrected V-J colour index
      real*4        v_V_H_0     ! (mag) ? Reddening-corrected V-H colour index
      real*4        v_V_Ks_0    ! (mag) ? Reddening-corrected V-Ks colour index
      character*2   Rem_1       ! [BDUb ] Remarks (2)
*Note (1): M_V_=V_0_-13.9mag (the distance modulus).
*Note (2): Remarks as follows:
*    D = photometric doubles
*    U = red leak affected by a close neighbour
*    B = known binaries
*    b = binary candidates from table 1 of Rauw et al. (2011A&A...535A..40R)

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

C  Loading file 'table2.dat'	! The combined photometric data obtained with the
*                                 CTIO 4m and 1m telescopes

C  Format for file interpretation

    1 format(
     +  I5,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,2X,F5.3,2X,
     +  F5.3,2X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,A5,2X,I3,1X,I4,1X,A16,
     +  1X,A17)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,17679
        read(1,'(A158)')ar__
        read(ar__,1)
     +  Seq,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,Imag,U_B,B_V,V_I,e_Vmag,
     +  e_Imag,e_U_B,e_B_V,e_V_I,o_Vmag,o_Imag,o_U_B,o_B_V,o_V_I,Rem,
     +  MSP,A07,v2MASS,GLIMPSE
        if(ar__(31:36) .EQ. '') Vmag = rNULL__
        if(ar__(38:43) .EQ. '') Imag = rNULL__
        if(ar__(45:50) .EQ. '') U_B = rNULL__
        if(ar__(52:57) .EQ. '') B_V = rNULL__
        if(ar__(59:64) .EQ. '') V_I = rNULL__
        if(ar__(66:70) .EQ. '') e_Vmag = rNULL__
        if(ar__(72:76) .EQ. '') e_Imag = rNULL__
        if(ar__(78:82) .EQ. '') e_U_B = rNULL__
        if(ar__(85:89) .EQ. '') e_B_V = rNULL__
        if(ar__(92:96) .EQ. '') e_V_I = rNULL__
        if(ar__(116:118) .EQ. '') MSP = iNULL__
        if(ar__(120:123) .EQ. '') A07 = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  Seq,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,Imag,U_B,B_V,V_I,e_Vmag,
     +  e_Imag,e_U_B,e_B_V,e_V_I,o_Vmag,o_Imag,o_U_B,o_B_V,o_V_I,Rem,
     +  MSP,A07,v2MASS,GLIMPSE
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! *V-NIR colours and the reddening-corrected
*                                 magnitude and colours of the early-type stars

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,144
        read(1,'(A96)')ar__1
        read(ar__1,2)
     +  Seq_1,V_J,V_H,V_Ks,e_V_J,e_V_H,e_V_Ks,V0mag,v_U_B_0,v_B_V_0,
     +  v_V_I_0,v_V_J_0,v_V_H_0,v_V_Ks_0,Rem_1
        if(ar__1(7:11) .EQ. '') V_J = rNULL__
        if(ar__1(13:17) .EQ. '') V_H = rNULL__
        if(ar__1(19:23) .EQ. '') V_Ks = rNULL__
        if(ar__1(25:29) .EQ. '') e_V_J = rNULL__
        if(ar__1(32:36) .EQ. '') e_V_H = rNULL__
        if(ar__1(39:43) .EQ. '') e_V_Ks = rNULL__
        if(ar__1(67:72) .EQ. '') v_V_I_0 = rNULL__
        if(ar__1(74:79) .EQ. '') v_V_J_0 = rNULL__
        if(ar__1(81:86) .EQ. '') v_V_H_0 = rNULL__
        if(ar__1(88:93) .EQ. '') v_V_Ks_0 = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Seq_1,V_J,V_H,V_Ks,e_V_J,e_V_H,e_V_Ks,V0mag,v_U_B_0,v_B_V_0,
     +  v_V_I_0,v_V_J_0,v_V_H_0,v_V_Ks_0,Rem_1
c    .......End.of.Just test output...........
      end do
      close(1)

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