FORTRAN Generation
(/./ftp/cats/J/A_A/515/A100)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/515/A100 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-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/515/A100    VI light curves of NGC 1039 solar-type stars    (James+, 2010)
*================================================================================
*New rotation periods in the open cluster NGC 1039 (M 34), and a derivation of
*its gyrochronology age.
*    James D.J., Barnes S.A., Meibom S., Lockwood G.W., Levine S.E.,
*    Deliyannis C., Platais I., Steinhauer A, Hurley B.K.
*   <Astron. Astrophys. 515, A100 (2010)>
*   =2010A&A...515A.100J
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Astrometry, photometry and membership assignments
                           of M34 stars for which photometric periods could be
                           assigned in the Lowell campaign

      integer*4 nr__
      parameter (nr__=55)	! Number of records
      character*127 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*7   Name       (nr__) ! Name (FN_NNNN) (G1)
      character*1   n_B_V      (nr__) ! [f] (B-V) derived from V-I (1)
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000) (2)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000) (2)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000) (2)
      character*1   DE_        (nr__) ! Declination sign (J2000) (2)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000) (2)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000) (2)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000) (2)
      integer*4     JP96       (nr__) ! ? JP identifier from Jones & Prosser (1996, Cat.
*                               J/AJ/111/1193), Cl* NGC 1039 JP NNN in Simbad (3)
      real*4        Vmag       (nr__) ! (mag) ?=99.999 V magnitude (4)
      real*4        e_Vmag     (nr__) ! (mag) ?=9.999 rms uncertainty on Vmag (4)
      real*4        B_V        (nr__) ! (mag) ?=9.999 B-V colour index (4)
      real*4        e_B_V      (nr__) ! (mag) ?=9.999 rms uncertainty on B-V  (4)
      real*4        V_I        (nr__) ! (mag) ?=9.999 V-I colour index (4)
      real*4        e_V_I      (nr__) ! (mag) ?=9.999 rms uncertainty on V-I  (4)
      character*3   Mph        (nr__) ! [Yes No] Photometric membership (5)
      character*8   Mrv        (nr__) ! [Yes-sing Yes-bin No] Radial velocity
*                                membership (5)
      character*2   lI         (nr__) ! [lI] Available light curve derived from
*                                    long-I observations
      character*2   lV         (nr__) ! [lV] Available light curve derived from
*                                    long-V observations
      character*2   sI         (nr__) ! [sI] Available light curve derived from
*                                    short-I observations
      character*2   sV         (nr__) ! [sV] Available light curve derived from
*                                    short-V observations
      real*8        Per        (nr__) ! (d) Photometric period (6)
      real*4        e_Per      (nr__) ! (d) rms uncertainty on Per (6)
      real*4        v_B_V_0    (nr__) ! (mag) ?=- Deredenned B-V colour index (6) (7)
*Note (1): B-V colours are determined using a field star V-I to B-V
*     relationship (Caldwell et al., 1993SAAOC..15....1C), assuming
*     E(V-I)=1.25*E(B-V), and E(B-V)=0.07 (Canterna et al., 1979PASP...91..263C)
*Note (2): Astrometric data are derived from coordinate matches in the
*     SuperCosmos survey catalogs (Hambly et al., 2001MNRAS.326.1279H,
*     2001MNRAS.326.1315H, 2001MNRAS.326.1295H).
*Note (3): JP 96 identifiers are for photometric variables which are
*     correlated with Jones & Prosser (1996, Cat. J/AJ/111/1193) sources.
*Note (4): BVI photometric data are taken from the Indiana Group survey
*     (cf.  Sect. 3).
*Note (5): Membership assignments are based upon whether a target star lies
*     on (or close to) the V/B-V and/or V/V-I main sequence loci (see Fig.1)
*     or whether a target star has a radial velocity consistent with the
*     cluster's systemic velocity (Meibom et al., in prep.; see also
*     Sect.2.1 and Meibom et al., 2006ApJ...653..621M).
*Note (6): From table3 of the paper
*Note (7): E_B-V_=0.07 is adopted; Canterna et al. (1979PASP...91..263C).

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

C  Declarations for 'tablea1.dat'	! Cluster membership assessments for Jones & Prosser
                           (1996, Cat. J/AJ/111/1193) stars in our period sample

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

      character*7   Name_1     (nr__1) ! Name (FN_NNNN) (G1)
      integer*4     JP96_1     (nr__1) ! JP identifier from Jones & Prosser (1996, Cat.
*                                J/AJ/111/1193), Cl* NGC 1039 JP NNN in Simbad
      character*1   Mph_1      (nr__1) ! [Y/N] Membership based on photometric data (1)
      character*2   Mrv_1      (nr__1) ! [Ys Yb N] Membership based on radial
*                                          velocity (1)
      character*1   MLi        (nr__1) ! [Y/N] Membership based on radial velocity and
*                                  lithium 6708{AA} equivalent width, from
*                                  Jones et al. (1997AJ....114..352J)
      real*4        RV         (nr__1) ! (km/s) ? Jones et al. (1997AJ....114..352J)
*                                  radial velocity
      character*1   Mrv2       (nr__1) ! [Y/N] Membership based on radial velocity (2)
      integer*4     Prv2       (nr__1) ! (%) ? Membership probability based on radial
*                                  velocity (2)
      real*4        Vmag_1     (nr__1) ! (mag) V magnitude (1)
      integer*4     Ppm        (nr__1) ! (%) Proper motion membership probabilities are
*                                 taken from Jones & Prosser (1996, Cat.
*                                 J/AJ/111/1193)
*Note (1): Data taken from Tables 2 & 3.
*Note (2): Radial velocity membership assessments are based on a Gaussian
*     fit to the entire Jones et al. (1997AJ....114..352J) radial velocity
*     sample (see also Fig. A1).

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

C  Declarations for 'lc/*'	! *Individual light curves

      integer*4 nr__2
      parameter (nr__2=150)	! Number of records
      character*20 ar__2  	! Full-size record

      real*8        Phase      (nr__2) ! [0/2] Phase
      real*8        mag        (nr__2) ! (mag) Instrumental i or v magnitude

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

C  Loading file 'table2.dat'	! Astrometry, photometry and membership assignments
*                           of M34 stars for which photometric periods could be
*                           assigned in the Lowell campaign

C  Format for file interpretation

    1 format(
     +  A7,A1,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F6.3,4X,I3,1X,
     +  F6.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,A3,1X,A8,1X,
     +  A2,1X,A2,1X,A2,1X,A2,1X,F7.4,1X,F6.4,3X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,55
        read(1,'(A127)')ar__
        read(ar__,1)
     +  Name(i__),n_B_V(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),JP96(i__),Vmag(i__),e_Vmag(i__),
     +  B_V(i__),e_B_V(i__),V_I(i__),e_V_I(i__),Mph(i__),Mrv(i__),
     +  lI(i__),lV(i__),sI(i__),sV(i__),Per(i__),e_Per(i__),
     +  v_B_V_0(i__)
        if(ar__(40:42) .EQ. '') JP96(i__) = iNULL__
        if (idig(ar__(123:127)).EQ.0) v_B_V_0(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__),n_B_V(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),JP96(i__),Vmag(i__),e_Vmag(i__),
     +  B_V(i__),e_B_V(i__),V_I(i__),e_V_I(i__),Mph(i__),Mrv(i__),
     +  lI(i__),lV(i__),sI(i__),sV(i__),Per(i__),e_Per(i__),
     +  v_B_V_0(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 'tablea1.dat'	! Cluster membership assessments for Jones & Prosser
*                           (1996, Cat. J/AJ/111/1193) stars in our period sample

C  Format for file interpretation

    2 format(
     +  A7,4X,I3,1X,A1,1X,A2,1X,A1,1X,F5.1,1X,A1,1X,I2,1X,F6.3,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,27
        read(1,'(A42)')ar__1
        read(ar__1,2)
     +  Name_1(i__),JP96_1(i__),Mph_1(i__),Mrv_1(i__),MLi(i__),
     +  RV(i__),Mrv2(i__),Prv2(i__),Vmag_1(i__),Ppm(i__)
        if(ar__1(23:27) .EQ. '') RV(i__) = rNULL__
        if(ar__1(31:32) .EQ. '') Prv2(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1(i__),JP96_1(i__),Mph_1(i__),Mrv_1(i__),MLi(i__),
     +  RV(i__),Mrv2(i__),Prv2(i__),Vmag_1(i__),Ppm(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'lc/*'	! *Individual light curves

C  Format for file interpretation

    3 format(1X,F8.6,3X,F8.5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'lc/*')
      write(6,*) '....Loading file: lc/*'
      do i__=1,150
        read(1,'(A20)')ar__2
        read(ar__2,3)Phase(i__),mag(i__)
c    ..............Just test output...........
        write(6,3)Phase(i__),mag(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