FORTRAN Generation
(/./ftp/cats/J/A_A/462/123)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/462/123 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-20
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/462/123    VLT/Flames spectroscopic data of NGC 6530   (Prisinzano+, 2007)
*================================================================================
*VLT/Flames observations of the star forming region NGC 6530.
*    Prisinzano L., Damiani F., Micela G., Pillitteri I.
*   <Astron. Astrophys. 462, 123 (2007)>
*   =2007A&A...462..123P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Target positions and optical-IR magnitudes

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

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

      integer*4     RAh        (nr__) ! (h) Right ascension (J2000.0)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000.0)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000.0)
      character*1   DE_        (nr__) ! Declination sign (J2000.0)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000.0)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000.0)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000.0)
      integer*4     Sp         (nr__) ! Spectrum number
      integer*4     IDX        (nr__) ! ?=- Designation from Damiani et al.
*                                        (2006A&A...459..477D)
      integer*4     WFI        (nr__) ! Designation from Prisinzano et al. (2005,
*                                     Cat. <J/A+A/430/941>,
*                                     Cl* NGC 6530 WFI NNNNN in Simbad)
      real*4        Bmag       (nr__) ! (mag) Landolt B magnitude from <J/A+A/430/941>
      real*4        e_Bmag     (nr__) ! (mag) rms uncertainty on the Landolt B magnitude
      real*4        Vmag       (nr__) ! (mag) Landolt V magnitude from <J/A+A/430/941>
      real*4        e_Vmag     (nr__) ! (mag) rms uncertainty on the Landolt V magnitude
      real*4        Imag       (nr__) ! (mag) Cousins I magnitude from <J/A+A/430/941>
      real*4        e_Imag     (nr__) ! (mag) rms uncertainty on the Cousins I magnitude
      real*4        Jmag       (nr__) ! (mag) ?=- J magnitude from 2MASS <II/246>
      real*4        e_Jmag     (nr__) ! (mag) ?=- rms uncertainty on the J magnitude
      real*4        Hmag       (nr__) ! (mag) ?=- H magnitude from 2MASS <II/246>
      real*4        e_Hmag     (nr__) ! (mag) ?=- rms uncertainty on the H magnitude
      real*4        Kmag       (nr__) ! (mag) ?=- K magnitude from 2MASS <II/246>
      real*4        e_Kmag     (nr__) ! (mag) ?=- rms uncertainty on the K magnitude
      real*4        Age        (nr__) ! (Myr) Estimated age from <J/A+A/430/941>
      real*4        Mass       (nr__) ! (solMass) ?=-99.99 Estimated mass from <J/A+A/430/941>

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

C  Declarations for 'table3.dat'	! Spectroscopic results

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

      integer*4     Sp_1       (nr__1) ! Spectrum number
      character*1   SB2        (nr__1) ! [Y] Binarity flag
      real*8        RV         (nr__1) ! (km/s) ?=- Radial velocity
      real*4        e_RV       (nr__1) ! (km/s) ?=- rms uncertainty on RV
      real*4        vsini      (nr__1) ! (km/s) ?=- Rotational velocity
      real*4        e_vsini    (nr__1) ! (km/s) ?=- rms uncertainty on vsini
      integer*4     Teff       (nr__1) ! (K) Effective Temperature from V-I color index
*                                 (from <J/A+A/430/941>)
      real*4        EW_Li      (nr__1) ! (0.1nm) ?=- Equivalent width of the lithium line
      real*4        EW2_Li     (nr__1) ! (0.1nm) ?=- Equivalent width of the lithium line of
*                                    the second component
      real*4        FWZI_Ha    (nr__1) ! (0.1nm) ?=- Full Width Zero Intensity of H{alpha} line
      character*1   MembX      (nr__1) ! [YN] Membership flag based on X-ray detection
      character*1   MembRV     (nr__1) ! [YN] Membership flag based on radial velocity
      character*1   MembLi     (nr__1) ! [YN] Membership flag based on lithium
*                                     equivalent width
      character*2   QJHHK      (nr__1) ! [Y-N] IR excess flag based on the QJHHK index
      character*2   QVIJK      (nr__1) ! [Y-N] IR excess flag based on the QVIJK index
      character*2   QVIIJ      (nr__1) ! [Y-N] IR excess flag based on the QVIIJ index
      character*2   QBVJK      (nr__1) ! [Y-N] IR excess flag based on the QBVJK index
      character*2   Class      (nr__1) ! [CW ?-] CTT or WTT classification based on the
*                                        H{alpha} line  (1)
      character*5   PT         (nr__1) ! Profile type of the H{alpha} line (2)
      character*2   Memb       (nr__1) ! [M NM?] Membership (M=member, NM=non member)
*Note (1): Classification as follows:
*     C  = CTTS (Classical T Tau star)
*     C? = possible CTTS
*     W  = WTT (Weak-lined T Tauri stars)
*Note (2): Profile type of the H{alpha} line as follows:
*     AE = broad absorption H{alpha} line, with the core filled of the
*          narrow nebular emission H{alpha}
*     EG = quite symmetric and "narrow" line profile, likely originated
*          only from the nebular emission
*     YY = YY Ori profile (inverse P Cygni profile)
*    CE? = slight broad wings which can be due to "normal" chromospheric
*          emission or to low accretion
*    PCI = Type I P Cygny profile
*  PCIII = Type III P Cygny profile

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

C  Loading file 'table1.dat'	! Target positions and optical-IR magnitudes

C  Format for file interpretation

    1 format(
     +  I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F5.2,1X,I4,1X,I3,1X,I5,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,
     +  1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.2,1X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,332
        read(1,'(A130)')ar__
        read(ar__,1)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),Sp(i__),IDX(i__),WFI(i__),Bmag(i__),e_Bmag(i__),
     +  Vmag(i__),e_Vmag(i__),Imag(i__),e_Imag(i__),Jmag(i__),
     +  e_Jmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),e_Kmag(i__),
     +  Age(i__),Mass(i__)
        if (IDX(i__) .EQ. 45) IDX(i__) =  iNULL__
        if (idig(ar__(80:85)).EQ.0) Jmag(i__) =  rNULL__
        if (idig(ar__(87:91)).EQ.0) e_Jmag(i__) =  rNULL__
        if (idig(ar__(93:98)).EQ.0) Hmag(i__) =  rNULL__
        if (idig(ar__(100:104)).EQ.0) e_Hmag(i__) =  rNULL__
        if (idig(ar__(106:111)).EQ.0) Kmag(i__) =  rNULL__
        if (idig(ar__(113:117)).EQ.0) e_Kmag(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)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),Sp(i__),IDX(i__),WFI(i__),Bmag(i__),e_Bmag(i__),
     +  Vmag(i__),e_Vmag(i__),Imag(i__),e_Imag(i__),Jmag(i__),
     +  e_Jmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),e_Kmag(i__),
     +  Age(i__),Mass(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 'table3.dat'	! Spectroscopic results

C  Format for file interpretation

    2 format(
     +  I4,1X,A1,1X,F7.2,1X,F5.2,1X,F6.2,1X,F5.2,1X,I4,1X,F5.1,1X,
     +  F5.1,1X,F4.1,1X,A1,1X,A1,1X,A1,1X,A2,1X,A2,1X,A2,1X,A2,1X,A2,
     +  1X,A5,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,332
        read(1,'(A85)')ar__1
        read(ar__1,2)
     +  Sp_1(i__),SB2(i__),RV(i__),e_RV(i__),vsini(i__),e_vsini(i__),
     +  Teff(i__),EW_Li(i__),EW2_Li(i__),FWZI_Ha(i__),MembX(i__),
     +  MembRV(i__),MembLi(i__),QJHHK(i__),QVIJK(i__),QVIIJ(i__),
     +  QBVJK(i__),Class(i__),PT(i__),Memb(i__)
        if (idig(ar__1(8:14)).EQ.0) RV(i__) =  rNULL__
        if (idig(ar__1(16:20)).EQ.0) e_RV(i__) =  rNULL__
        if (idig(ar__1(22:27)).EQ.0) vsini(i__) =  rNULL__
        if (idig(ar__1(29:33)).EQ.0) e_vsini(i__) =  rNULL__
        if (idig(ar__1(40:44)).EQ.0) EW_Li(i__) =  rNULL__
        if (idig(ar__1(46:50)).EQ.0) EW2_Li(i__) =  rNULL__
        if (idig(ar__1(52:55)).EQ.0) FWZI_Ha(i__) =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Sp_1(i__),SB2(i__),RV(i__),e_RV(i__),vsini(i__),e_vsini(i__),
     +  Teff(i__),EW_Li(i__),EW2_Li(i__),FWZI_Ha(i__),MembX(i__),
     +  MembRV(i__),MembLi(i__),QJHHK(i__),QVIJK(i__),QVIIJ(i__),
     +  QBVJK(i__),Class(i__),PT(i__),Memb(i__)
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