FORTRAN Generation
(/./ftp/cats/J/A_A/530/A108)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/530/A108 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 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/530/A108      VLT-FLAMES Tarantula Survey              (Evans+, 2011)
*================================================================================
*The VLT-FLAMES Tarantula Survey. I. Introduction and observational overview.
*    Evans C.J., Taylor W.D., Henault-Brunet V., Sana H., De Koter A.,
*    Simon-diaz S., Carraro G., Bagnoli T., Bastian N., Bestenlehner J.M.,
*    Bonanos A.Z., Bressert E., Brott I., Campbell M.A., Cantiello M.,
*    Clark J.S., Costa E., Crowther P.A., De Mink S.E., Doran E., Dufton P.L.,
*    Dunstall P.R., Friedrich K., Garcia M., Gieles M., Graefener G.,
*    Herrero A., Howarth I.D., Izzard R.G., Langer N., Lennon D.J.,
*    Maiz Apellaniz J., Markova N., Najarro F., Puls J., Ramirez O.H.,
*    Sabin-Sanjulian C., Smartt S.J., Stroud V.E., van Loon J.T., Vink J.S.,
*    Walborn N.R.
*   <Astron. Astrophys., 530, A108 (2011)>
*   =2011A&A...530A.108E
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table5.dat'	! Observational information for the VLT-FLAMES Tarantula
                           Survey (VFTS) targets

      integer*4 nr__
      parameter (nr__=930)	! Number of records
      character*154 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     VFTS        ! [1/1037] Star sequential number
      character*6   Field       ! Field designation (1)
      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        rd1         ! (arcmin) Radial distance (in arcmin) to the core of
*                                  R136 (2)
      real*4        rd2         ! (pc) Radial distance (in pc) to the core of R136 (2)
      real*4        Vmag        ! (mag) ?=- V magnitude
      real*4        B_V         ! (mag) ?=- B-V colour index
      character*1   Ref         ! Reference of photometry (3)
      character*89  Com         ! Aliases and comments (4)
*Note (1): The FLAMES-Medusa configuration ("A" to "I") or FLAMES-ARGUS
*     pointing ("A1" to "A5") used to observe each target. 
*     "U" indicates those observed with the fibre-feed to UVES.
*Note (2): Radial distances to the core of R136 (specifically, R136-a1:
*          05:38:42.39-69:06:02.91, J2000.0).
*Note (3): Sources of photometry are as follows:
*    C = CTIO data, current study
*    P = Parker, 1993, Cat. II/187
*    S = Selman et al., 1999, Cat. J/A+A/341/98
*    W = WFI data, current study
*    Z = Zaritsky et al., 2004AJ....128.1606Z
*Note (4): Aliases/previous identifications of the targets.
*    Sources of identifications are:
*    R = Feast et al. 1960MNRAS.121..337F, <RMC NNN>
*    Sk = Sanduleak 1970, Cat. III/113, <Sk -DD NNNA>
*    BI = Brunet et al. 1975A&AS...21..109B, <BI NNN>
*    Brey = Breysacher 1981A&AS...43..203B, <Brey NNN>
*    Mk = Melnick 1985A&A...153..235M, <Cl* NGC 2070 Mel NNW>
*    M87 = Moffat et al. 1987ApJ...312..612M
*    T88 = Testor et al., 1988Msngr..54...43T, <[TLD88] NN>
*    ST92 = Schild & Testor 1992A&AS...92..729S, <[ST92] N-NNN>
*    P93 = Parker, 1993, Cat. II/187, <[P93] NNNN>
*    WB97 = Walborn & Blades 1997ApJS..112..457W, <[WB97] NN>
*    BAT99 = Breysacher et al., 1999A&AS..137..117B, <BAT99 NNN>
*    S99 = Selman et al. 1999, Cat. J/A+A/341/98, <Cl* NGC 2070 SMB NNNN>
*    GC00 = Grebel & Chu 2000AJ....119..787G, <[GC2000] BeNN>
*    2MASS = Skrutskie et al. 2006, Cat. VII/233
*     A total of 22 stars have some degree of cross-contamination from
*     adjacent spectra on the detector, see Sect. 2.2.4 for details.

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

C  Declarations for 'table6.dat'	! Near-IR photometry from the InfraRed Survey Facility
                          (IRSF) Magellanic Clouds catalogue (Kato et al., 2007,
                          Cat. II/288) for targets observed by the VLT-FLAMES
                          Tarantula Survey (VFTS)

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

      integer*4     VFTS_1      ! [1/1037] Star sequential number
      character*16  IRSF        ! IRSF identification, HHMMSSss+DDMMSSs (5)
      real*4        Jmag        ! (mag) ?=- IRSF J magnitude
      real*4        e_Jmag      ! (mag) ?=- rms uncertainty on Jmag
      real*4        Hmag        ! (mag) ?=- IRSF H magnitude
      real*4        e_Hmag      ! (mag) ?=- rms uncertainty on Hmag
      real*4        Ksmag       ! (mag) ?=- IRSF Ks magnitude
      real*4        e_Ksmag     ! (mag) ?=- rms uncertainty on Ksmag
      integer*4     Qual        ! Quality flag for JHKs (6)
*Note (5): IRSF photometry (Cat. II/288) is not available for six Medusa
*  targets: VFTS 151, 503, 275, 620, 823, and 828; 
*  nor for six ARGUS sources: VFTS 1012, 1014, 1015, 1019, 1024, and 1025.
*Note (6): for each of the 3 bands, the flags are:
*  1=point-like; 2=extended source; 3=saturated; 4=faint; 
*  5=odd shaped (e.g. double sources); 0=no detection.

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

C  Loading file 'table5.dat'	! Observational information for the VLT-FLAMES Tarantula
*                           Survey (VFTS) targets

C  Format for file interpretation

    1 format(
     +  I4,1X,A6,2X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,F5.2,
     +  1X,F5.1,1X,F5.2,1X,F5.2,1X,A1,1X,A89)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,930
        read(1,'(A154)')ar__
        read(ar__,1)
     +  VFTS,Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,rd1,rd2,Vmag,B_V,Ref,
     +  Com
        if (idig(ar__(52:56)).EQ.0) Vmag =  rNULL__
        if (idig(ar__(58:62)).EQ.0) B_V =  rNULL__
        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)
     +  VFTS,Field,RAh,RAm,RAs,DE_,DEd,DEm,DEs,rd1,rd2,Vmag,B_V,Ref,
     +  Com
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Near-IR photometry from the InfraRed Survey Facility
*                          (IRSF) Magellanic Clouds catalogue (Kato et al., 2007,
*                          Cat. II/288) for targets observed by the VLT-FLAMES
*                          Tarantula Survey (VFTS)

C  Format for file interpretation

    2 format(
     +  I4,1X,A16,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,
     +  I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,918
        read(1,'(A58)')ar__1
        read(ar__1,2)
     +  VFTS_1,IRSF,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,Qual
        if (idig(ar__1(23:27)).EQ.0) Jmag =  rNULL__
        if (idig(ar__1(29:32)).EQ.0) e_Jmag =  rNULL__
        if (idig(ar__1(34:38)).EQ.0) Hmag =  rNULL__
        if (idig(ar__1(40:43)).EQ.0) e_Hmag =  rNULL__
        if (idig(ar__1(45:49)).EQ.0) Ksmag =  rNULL__
        if (idig(ar__1(51:54)).EQ.0) e_Ksmag =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  VFTS_1,IRSF,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,Qual
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