FORTRAN Generation
(/./ftp/cats/J/MNRAS/413/2218)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/413/2218 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/MNRAS/413/2218    Stellar rotation in Hyades and Praesepe     (Delorme+, 2011)
*================================================================================
*Stellar rotation in the Hyades and Praesepe: gyrochronology and braking
*time-scale.
*    Delorme P., Cameron A.C., Hebb L., Rostron J., Lister T.A., Norton A.J.,
*    Pollacco D., West R.G.
*   <Mon. Not. R. Astron. Soc., 413, 2218-2234 (2011)>
*   =2011MNRAS.413.2218D
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Hyades SuperWASP fields used in this survey

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

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

      integer*4     RAh        (nr__) ! (h) Field centre right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Field centre right ascension (J2000)
      character*1   DE_        (nr__) ! Field centre declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) Field centre declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Field centre declination (J2000)
      integer*4     Nimg       (nr__) ! Number of images
      integer*4     Nnig       (nr__) ! Usable nights
      character*10  Date       (nr__) ! ("YYYY-MM-DD") First night date
      integer*4     Nb         (nr__) ! Baseline (nights)

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

C  Declarations for 'table2.dat'	! Hyades members with SuperWASP rotation periods

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

      character*19  SWASP      (nr__1) ! Swasp designation (JHHMMSS.ss+DDMMSS.s)
      character*12  USNO       (nr__1) ! USNO B-1.0 designation
      character*3   X          (nr__1) ! [Yes/No ] X-ray activity? (table2 only) (1)
      real*4        Per        (nr__1) ! (d) Rotation (spin) period (2)
      real*4        dPer       (nr__1) ! (d) ? Difference between the two period
*                                     determinations (2)
      real*4        J_Ks       (nr__1) ! (mag) 2MASS J-Ks colour index
      real*4        Ksmag      (nr__1) ! (mag) 2MASS Ks magnitude
      real*4        Vmag       (nr__1) ! (mag) ?=- V magnitude
      real*4        Dist       (nr__1) ! (deg) Distance to the cluster centre
      real*4        pmRA       (nr__1) ! (mas/yr) Proper motion along RA
      real*4        e_pmRA     (nr__1) ! (mas/yr) rms uncertainty on pmRA
      real*4        pmDE       (nr__1) ! (mas/yr) Proper motion along DE
      real*4        e_pmDE     (nr__1) ! (mas/yr) rms uncertainty on pmDE
      real*4        plx        (nr__1) ! (mas) ?=- Parallax (table2 only)
      real*4        Mmb        (nr__1) ! Membership probability
*Note (1): traces whether or not Stern, Schmitt & Kahabka (1995,
*          Cat. J/ApJ/448/683) reported X-ray activity.
*Note (2): if the object has been identified on two different seasons, the
*     period given is the average of the two periods whose difference is
*     indicated in dPer.

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

C  Declarations for 'table4.dat'	! Praesepe members with SuperWASP rotation periods

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

      character*19  SWASP_1    (nr__2) ! Swasp designation (JHHMMSS.ss+DDMMSS.s)
      character*12  USNO_1     (nr__2) ! USNO B-1.0 designation
      character*3   X_1        (nr__2) ! [Yes/No ] X-ray activity? (table2 only) (1)
      real*4        Per_1      (nr__2) ! (d) Rotation (spin) period (2)
      real*4        dPer_1     (nr__2) ! (d) ? Difference between the two period
*                                     determinations (2)
      real*4        J_Ks_1     (nr__2) ! (mag) 2MASS J-Ks colour index
      real*4        Ksmag_1    (nr__2) ! (mag) 2MASS Ks magnitude
      real*4        Vmag_1     (nr__2) ! (mag) ?=- V magnitude
      real*4        Dist_1     (nr__2) ! (deg) Distance to the cluster centre
      real*4        pmRA_1     (nr__2) ! (mas/yr) Proper motion along RA
      real*4        e_pmRA_1   (nr__2) ! (mas/yr) rms uncertainty on pmRA
      real*4        pmDE_1     (nr__2) ! (mas/yr) Proper motion along DE
      real*4        e_pmDE_1   (nr__2) ! (mas/yr) rms uncertainty on pmDE
      real*4        plx_1      (nr__2) ! (mas) ?=- Parallax (table2 only)
      real*4        Mmb_1      (nr__2) ! Membership probability
*Note (1): traces whether or not Stern, Schmitt & Kahabka (1995,
*          Cat. J/ApJ/448/683) reported X-ray activity.
*Note (2): if the object has been identified on two different seasons, the
*     period given is the average of the two periods whose difference is
*     indicated in dPer.

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

C  Declarations for 'tablea1.dat'	! Cross-identifications and B, V photometry from
                             the literature of rotational variables with
                             Hyades membership probabilities greater than 0.5

      integer*4 nr__3
      parameter (nr__3=62)	! Number of records
      character*77 ar__3  	! Full-size record

      character*19  SWASP_2    (nr__3) ! Swasp designation (JHHMMSS.ss+DDMMSS.s)
      character*12  USNO_2     (nr__3) ! USNO B-1.0 designation
      character*18  OName      (nr__3) ! Cluster member ID
      character*4   SpType     (nr__3) ! MK spectral type
      real*4        Vmagl      (nr__3) ! (mag) ? Literature V magnitude
      real*4        B_Vl       (nr__3) ! (mag) ? Literature B-V colour index
      integer*4     Ref        (nr__3) ! ? Reference for photometry (1)
*Note (1): References as follows:
*   1 = Upgren, Weis & Deluca (1979AJ.....84.1586U)
*   2 = Weis (1983PASP...95...29W)
*   3 = Upgren, Weis & Hanson (1985AJ.....90.2039U)
*   4 = Weis & Hanson (1988AJ.....96..148W)
*   5 = Stauffer (1982AJ.....87..899S)
*  11 = Klein Wassink (1927PGro...41....1K)
*  12 = Jones & Stauffer (1991AJ....102.1080J)
*  13 = Johnson (1952ApJ...116..640J)
*  14 = Upgren et al. (1979AJ.....84.1586U)
*  15 = Weis (1981PASP...93..437W)
*  16 = Mermilliod et al. (1990A&A...235..114M)

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

C  Declarations for 'tablea2.dat'	! Cross-identifications and B, V photometry from
                             the literature of rotational variables with
                             Praesepe membership probabilities greater than 0.5

      integer*4 nr__4
      parameter (nr__4=52)	! Number of records
      character*77 ar__4  	! Full-size record

      character*19  SWASP_3    (nr__4) ! Swasp designation (JHHMMSS.ss+DDMMSS.s)
      character*12  USNO_3     (nr__4) ! USNO B-1.0 designation
      character*18  OName_1    (nr__4) ! Cluster member ID
      character*4   SpType_1   (nr__4) ! MK spectral type
      real*4        Vmagl_1    (nr__4) ! (mag) ? Literature V magnitude
      real*4        B_Vl_1     (nr__4) ! (mag) ? Literature B-V colour index
      integer*4     Ref_1      (nr__4) ! ? Reference for photometry (1)
*Note (1): References as follows:
*   1 = Upgren, Weis & Deluca (1979AJ.....84.1586U)
*   2 = Weis (1983PASP...95...29W)
*   3 = Upgren, Weis & Hanson (1985AJ.....90.2039U)
*   4 = Weis & Hanson (1988AJ.....96..148W)
*   5 = Stauffer (1982AJ.....87..899S)
*  11 = Klein Wassink (1927PGro...41....1K)
*  12 = Jones & Stauffer (1991AJ....102.1080J)
*  13 = Johnson (1952ApJ...116..640J)
*  14 = Upgren et al. (1979AJ.....84.1586U)
*  15 = Weis (1981PASP...93..437W)
*  16 = Mermilliod et al. (1990A&A...235..114M)

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

C  Loading file 'table1.dat'	! Hyades SuperWASP fields used in this survey

C  Format for file interpretation

    1 format(I2,1X,I2,1X,A1,I2,1X,I2,1X,I4,1X,I2,1X,A10,1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,21
        read(1,'(A35)')ar__
        read(ar__,1)
     +  RAh(i__),RAm(i__),DE_(i__),DEd(i__),DEm(i__),Nimg(i__),
     +  Nnig(i__),Date(i__),Nb(i__)
        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(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  RAh(i__),RAm(i__),DE_(i__),DEd(i__),DEm(i__),Nimg(i__),
     +  Nnig(i__),Date(i__),Nb(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 'table2.dat'	! Hyades members with SuperWASP rotation periods

C  Format for file interpretation

    2 format(
     +  6X,A19,1X,A12,1X,A3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.2,2X,F5.2,
     +  1X,F4.1,1X,F5.1,1X,F4.1,1X,F5.1,1X,F4.1,1X,F5.2,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,62
        read(1,'(A113)')ar__1
        read(ar__1,2)
     +  SWASP(i__),USNO(i__),X(i__),Per(i__),dPer(i__),J_Ks(i__),
     +  Ksmag(i__),Vmag(i__),Dist(i__),pmRA(i__),e_pmRA(i__),
     +  pmDE(i__),e_pmDE(i__),plx(i__),Mmb(i__)
        if(ar__1(51:55) .EQ. '') dPer(i__) = rNULL__
        if (idig(ar__1(70:74)).EQ.0) Vmag(i__) =  rNULL__
        if (idig(ar__1(103:107)).EQ.0) plx(i__) =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  SWASP(i__),USNO(i__),X(i__),Per(i__),dPer(i__),J_Ks(i__),
     +  Ksmag(i__),Vmag(i__),Dist(i__),pmRA(i__),e_pmRA(i__),
     +  pmDE(i__),e_pmDE(i__),plx(i__),Mmb(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Praesepe members with SuperWASP rotation periods

C  Format for file interpretation

    3 format(
     +  6X,A19,1X,A12,1X,A3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.2,2X,F5.2,
     +  1X,F4.1,1X,F5.1,1X,F4.1,1X,F5.1,1X,F4.1,1X,F5.2,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,52
        read(1,'(A113)')ar__2
        read(ar__2,3)
     +  SWASP_1(i__),USNO_1(i__),X_1(i__),Per_1(i__),dPer_1(i__),
     +  J_Ks_1(i__),Ksmag_1(i__),Vmag_1(i__),Dist_1(i__),pmRA_1(i__),
     +  e_pmRA_1(i__),pmDE_1(i__),e_pmDE_1(i__),plx_1(i__),Mmb_1(i__)
        if(ar__2(51:55) .EQ. '') dPer_1(i__) = rNULL__
        if (idig(ar__2(70:74)).EQ.0) Vmag_1(i__) =  rNULL__
        if (idig(ar__2(103:107)).EQ.0) plx_1(i__) =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  SWASP_1(i__),USNO_1(i__),X_1(i__),Per_1(i__),dPer_1(i__),
     +  J_Ks_1(i__),Ksmag_1(i__),Vmag_1(i__),Dist_1(i__),pmRA_1(i__),
     +  e_pmRA_1(i__),pmDE_1(i__),e_pmDE_1(i__),plx_1(i__),Mmb_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea1.dat'	! Cross-identifications and B, V photometry from
*                             the literature of rotational variables with
*                             Hyades membership probabilities greater than 0.5

C  Format for file interpretation

    4 format(6X,A19,1X,A12,1X,A18,1X,A4,2X,F5.2,1X,F4.2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,62
        read(1,'(A77)')ar__3
        read(ar__3,4)
     +  SWASP_2(i__),USNO_2(i__),OName(i__),SpType(i__),Vmagl(i__),
     +  B_Vl(i__),Ref(i__)
        if(ar__3(65:69) .EQ. '') Vmagl(i__) = rNULL__
        if(ar__3(71:74) .EQ. '') B_Vl(i__) = rNULL__
        if(ar__3(76:77) .EQ. '') Ref(i__) = iNULL__
c    ..............Just test output...........
        write(6,4)
     +  SWASP_2(i__),USNO_2(i__),OName(i__),SpType(i__),Vmagl(i__),
     +  B_Vl(i__),Ref(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! Cross-identifications and B, V photometry from
*                             the literature of rotational variables with
*                             Praesepe membership probabilities greater than 0.5

C  Format for file interpretation

    5 format(6X,A19,1X,A12,1X,A18,1X,A4,2X,F5.2,1X,F4.2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,52
        read(1,'(A77)')ar__4
        read(ar__4,5)
     +  SWASP_3(i__),USNO_3(i__),OName_1(i__),SpType_1(i__),
     +  Vmagl_1(i__),B_Vl_1(i__),Ref_1(i__)
        if(ar__4(65:69) .EQ. '') Vmagl_1(i__) = rNULL__
        if(ar__4(71:74) .EQ. '') B_Vl_1(i__) = rNULL__
        if(ar__4(76:77) .EQ. '') Ref_1(i__) = iNULL__
c    ..............Just test output...........
        write(6,5)
     +  SWASP_3(i__),USNO_3(i__),OName_1(i__),SpType_1(i__),
     +  Vmagl_1(i__),B_Vl_1(i__),Ref_1(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