CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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-23
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/AJ/129/2428      M dwarf-white dwarf binary systems         (Silvestri+, 2005)
*================================================================================
*The chromospheric activity and ages of M dwarf stars in wide binary systems.
*    Silvestri N.M., Hawley S.L., Oswalt T.D.
*   <Astron. J., 129, 2428-2450 (2005)>
*   =2005AJ....129.2428S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Complete M dwarf-white dwarf wide binary target list

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

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

      character*11  ID1        (nr__) ! Identifier of the binary system primary
*                                    component
      character*11  ID2        (nr__) ! Identifier of the binary system secondary
*                                    component
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (B1950.0)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (B1950.0)
      integer*4     RAs        (nr__) ! (s) Second of Right Ascension (B1950.0)
      character*1   DE_        (nr__) ! Sign of the Declination (B1950.0)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (B1950.0)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (B1950.0)
      integer*4     DEs        (nr__) ! (arcsec) Arcsecond of Declination (B1950.0)
      real*4        Vmag1      (nr__) ! (mag) ? Primary V band magnitude (1)
      character*6   SpType1    (nr__) ! Primary MK spectral type (2)
      real*4        Vmag2      (nr__) ! (mag) ? Secondary V band magnitude (1)
      character*6   SpType2    (nr__) ! Secondary MK spectral type (2)
      character*8   Site       (nr__) ! Telecope observatory (see table2)
      character*14  Dates      (nr__) ! The U.T. dates of the observation (mm/yy)
      integer*4     ExpTime    (nr__) ! (s) ? Exposure time
      real*4        pm         (nr__) ! (arcsec/yr) Total proper motion
      real*4        pmPA       (nr__) ! (deg) Direction of proper motion (3)
      integer*4     PA         (nr__) ! (deg) ? Position angle centered on the primary (3)
      integer*4     Sep        (nr__) ! (arcsec) Component separation
*Note (1): Single-precision V magnitude values are m_pg_ magnitudes from
*          Luyten's original survey, all others are V magnitudes from
*          Smith (1997, Ph.D. thesis, Florida Inst. Technol.).
*Note (2): Spectral types for the WD and dM stars were determined from
*          low-resolution (~7-15{AA}) spectra (Oswalt, Hintzen, & Luyten
*          1998ApJS...66..391O; Oswalt et al. 1991, in White Dwarfs, ed.
*          G. Vauclair & E.M. Sion (NATO ASI Ser. C, 336; Dordrecht: Kluwer),
*          379 and 1993, in White Dwarfs: Advances in Observation and Theory,
*          ed. M.A. Barstow (NATO ASI Ser. C, 403; Dordrecht: Kluwer), 419).
*          Improved dM spectral types are given in Table 3.  We have made no
*          attempt to improve upon the WD spectral types in this study.
*Note (3): Measured east of north.

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

C  Declarations for 'table2.dat'	! Journal of the observations

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

      character*11  ObsDate    (nr__1) ! ("YYYY/MMM/DD") Date of observation (UT)
      character*4   Site_1     (nr__1) ! [APO CTIO] Site of observation
      character*1   l_Seeing   (nr__1) ! [~] Limit flag on Seeing
      real*4        Seeing     (nr__1) ! (arcsec) ? Seeing
      character*62  Notes      (nr__1) ! Notes

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

C  Declarations for 'table3.dat'	! Equivalent widths and band-head flux ratios

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

C  B1950 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg_1    (nr__2) ! (deg) Right Ascension B1950
      real*8        DEdeg_1    (nr__2) ! (deg)     Declination B1950
C  ---------------------------------- ! (position vector(s) in degrees)

      character*10  ID         (nr__2) ! The dM identifier
      character*1   n_ID       (nr__2) ! Note about the components (G1)
      integer*4     RAh_1      (nr__2) ! (h) Hour of Right Ascension (B1950)
      integer*4     RAm_1      (nr__2) ! (min) Minute of Right Ascension (B1950)
      integer*4     RAs_1      (nr__2) ! (s) Second of Right Ascension (B1950)
      character*1   DE__1      (nr__2) ! Sign of the Declination (B1950)
      integer*4     DEd_1      (nr__2) ! (deg) Degree of Declination (B1950)
      integer*4     DEm_1      (nr__2) ! (arcmin) Arcminute of Declination (B1950)
      integer*4     DEs_1      (nr__2) ! (arcsec) Arcsecond of Declination (B1950)
      real*4        EW_Ha      (nr__2) ! (0.1nm) H{alpha} (65630.1nm) equivalent width (1)
      real*4        E_EW_Ha    (nr__2) ! (0.1nm) Upper limit error on EW(Ha)
      real*4        e_EW_Ha_1  (nr__2) ! (0.1nm) Lower limit error on EW(Ha)
      real*4        CaH1       (nr__2) ! CaH1 (63850.1nm) flux ratio
      real*4        CaH2       (nr__2) ! CaH2 (68300.1nm) flux ratio
      real*4        CaH3       (nr__2) ! CaH3 (69750.1nm) flux ratio
      real*4        TiO1       (nr__2) ! TiO1 (67200.1nm) flux ratio
      real*4        TiO2       (nr__2) ! TiO2 (70590.1nm) flux ratio
      real*4        TiO3       (nr__2) ! TiO3 (70940.1nm) flux ratio
      real*4        TiO4       (nr__2) ! TiO4 (71320.1nm) flux ratio
      real*4        TiO5       (nr__2) ! TiO5 (70500.1nm) flux ratio
      character*5   SpType     (nr__2) ! The dM spectral type (2)
      integer*4     Note       (nr__2) ! Note (G2)
*Note (1): In units of Angstroms.
*Note (2): Improved dM spectral types based on TiO5 band-head ratios.

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

C  Declarations for 'table4.dat'	! Parameters for the dMe and dM(e) stars

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

C  B1950.0 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg_2    (nr__3) ! (deg) Right Ascension B1950.0
      real*8        DEdeg_2    (nr__3) ! (deg)     Declination B1950.0
C  ---------------------------------- ! (position vector(s) in degrees)

      character*5   Type       (nr__3) ! Star type (dMe or dM(e) stars)
      character*10  ID_1       (nr__3) ! The dM identifier
      integer*4     RAh_2      (nr__3) ! (h) Hour of Right Ascension (B1950.0)
      integer*4     RAm_2      (nr__3) ! (min) Minute of Right Ascension (B1950.0)
      integer*4     RAs_2      (nr__3) ! (s) Second of Right Ascension (B1950.0)
      character*1   DE__2      (nr__3) ! Sign of the Declination (B1950.0)
      integer*4     DEd_2      (nr__3) ! (deg) Degree of the Declination (B1950.0)
      integer*4     DEm_2      (nr__3) ! (arcmin) Arcminute of the Declination (B1950.0)
      integer*4     DEs_2      (nr__3) ! (arcsec) Arcsecond of the Declination (B1950.0)
      real*4        V_I        (nr__3) ! (mag) V-I color index
      real*4        vmag       (nr__3) ! (mag) Visual magnitude
      real*4        Mass       (nr__3) ! (solMass) Mass

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

C  Declarations for 'table5.dat'	! Complete space motions for 161 M dwarf stars

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

C  B1950 position composed of: RAhour DEdeg
      character*10  ID_2       (nr__4) ! The dM identifier
      character*1   n_ID_1     (nr__4) ! Note about the components (G1)
      real*8        RAhour     (nr__4) ! (h) Hour of right Ascension (B1950)
      real*8        DEdeg_3    (nr__4) ! (deg) Degree of Declination (B1950)
      real*4        pm_1       (nr__4) ! (arcsec/yr) Proper motion
      integer*4     pmPA_1     (nr__4) ! (deg) Direction of proper motion
      real*4        RV         (nr__4) ! (km/s) Radial velocity
      real*4        e_RV       (nr__4) ! (km/s) ? Uncertainty in RV
      real*4        Uvel       (nr__4) ! (km/s) Velocity towards the Galactic anticenter
*                                       relative to the LSR
      real*4        e_Uvel     (nr__4) ! (km/s) ? Uncertainty in Uvel
      real*4        Vvel       (nr__4) ! (km/s) Velocity in the direction of galactic
*                                       rotation relative to the LSR
      real*4        e_Vvel     (nr__4) ! (km/s) ? Uncertainty in Vvel
      real*4        Wvel       (nr__4) ! (km/s) Velocity toward the North Galactic Pole
*                                       relative to the LSR
      real*4        e_Wvel     (nr__4) ! (km/s) ? Uncertainty in Wvel
      real*4        SpVel      (nr__4) ! (km/s) Full space velocity
      real*4        e_SpVel    (nr__4) ! (km/s) ? Uncertainty in SpVel
      character*3   Note_1     (nr__4) ! Comma separated notes (G2)

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

C  Loading file 'table1.dat'	! Complete M dwarf-white dwarf wide binary target list

C  Format for file interpretation

    1 format(
     +  A11,3X,A11,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,F5.2,1X,
     +  A6,1X,F5.2,1X,A6,1X,A8,1X,A14,1X,I4,1X,F4.2,1X,F5.1,1X,I3,1X,
     +  I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,203
        read(1,'(A118)')ar__
        read(ar__,1)
     +  ID1(i__),ID2(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag1(i__),SpType1(i__),Vmag2(i__),
     +  SpType2(i__),Site(i__),Dates(i__),ExpTime(i__),pm(i__),
     +  pmPA(i__),PA(i__),Sep(i__)
        if(ar__(46:50) .EQ. '') Vmag1(i__) = rNULL__
        if(ar__(59:63) .EQ. '') Vmag2(i__) = rNULL__
        if(ar__(96:99) .EQ. '') ExpTime(i__) = iNULL__
        if(ar__(112:114) .EQ. '') PA(i__) = iNULL__
        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)
     +  ID1(i__),ID2(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag1(i__),SpType1(i__),Vmag2(i__),
     +  SpType2(i__),Site(i__),Dates(i__),ExpTime(i__),pm(i__),
     +  pmPA(i__),PA(i__),Sep(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'	! Journal of the observations

C  Format for file interpretation

    2 format(A11,1X,A4,1X,A1,F4.1,1X,A62)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,24
        read(1,'(A85)')ar__1
        read(ar__1,2)
     +  ObsDate(i__),Site_1(i__),l_Seeing(i__),Seeing(i__),Notes(i__)
        if(ar__1(19:22) .EQ. '') Seeing(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  ObsDate(i__),Site_1(i__),l_Seeing(i__),Seeing(i__),Notes(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Equivalent widths and band-head flux ratios

C  Format for file interpretation

    3 format(
     +  A10,1X,A1,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,F5.2,1X,
     +  F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,
     +  1X,F4.2,1X,F4.2,1X,A5,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,140
        read(1,'(A95)')ar__2
        read(ar__2,3)
     +  ID(i__),n_ID(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),EW_Ha(i__),E_EW_Ha(i__),
     +  e_EW_Ha_1(i__),CaH1(i__),CaH2(i__),CaH3(i__),TiO1(i__),
     +  TiO2(i__),TiO3(i__),TiO4(i__),TiO5(i__),SpType(i__),Note(i__)
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  ID(i__),n_ID(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),EW_Ha(i__),E_EW_Ha(i__),
     +  e_EW_Ha_1(i__),CaH1(i__),CaH2(i__),CaH3(i__),TiO1(i__),
     +  TiO2(i__),TiO3(i__),TiO4(i__),TiO5(i__),SpType(i__),Note(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Parameters for the dMe and dM(e) stars

C  Format for file interpretation

    4 format(
     +  A5,1X,A10,1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,F4.2,1X,
     +  F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,37
        read(1,'(A51)')ar__3
        read(ar__3,4)
     +  Type(i__),ID_1(i__),RAh_2(i__),RAm_2(i__),RAs_2(i__),
     +  DE__2(i__),DEd_2(i__),DEm_2(i__),DEs_2(i__),V_I(i__),
     +  vmag(i__),Mass(i__)
        RAdeg_2(i__) = rNULL__
        DEdeg_2(i__) = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2(i__) .GT. -180) RAdeg_2(i__)=RAh_2(i__)*15.
        if(RAm_2(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAm_2(i__)/4.
        if(RAs_2(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAs_2(i__)/240.
        if(DEd_2(i__) .GE. 0) DEdeg_2(i__)=DEd_2(i__)
        if(DEm_2(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEm_2(i__)/60.
        if(DEs_2(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEs_2(i__)/3600.
        if(DE__2(i__).EQ.'-'.AND.DEdeg_2(i__).GE.0) DEdeg_2(i__)=-DEdeg_2(i__)
c    ..............Just test output...........
        write(6,4)
     +  Type(i__),ID_1(i__),RAh_2(i__),RAm_2(i__),RAs_2(i__),
     +  DE__2(i__),DEd_2(i__),DEm_2(i__),DEs_2(i__),V_I(i__),
     +  vmag(i__),Mass(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_2(i__),DEdeg_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Complete space motions for 161 M dwarf stars

C  Format for file interpretation

    5 format(
     +  A10,1X,A1,1X,F7.4,1X,F8.4,1X,F4.2,1X,I3,1X,F5.1,1X,F4.1,1X,
     +  F6.1,1X,F4.1,1X,F6.1,1X,F4.1,1X,F6.1,1X,F4.1,1X,F5.1,1X,F3.1,
     +  1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,161
        read(1,'(A99)')ar__4
        read(ar__4,5)
     +  ID_2(i__),n_ID_1(i__),RAhour(i__),DEdeg_3(i__),pm_1(i__),
     +  pmPA_1(i__),RV(i__),e_RV(i__),Uvel(i__),e_Uvel(i__),Vvel(i__),
     +  e_Vvel(i__),Wvel(i__),e_Wvel(i__),SpVel(i__),e_SpVel(i__),
     +  Note_1(i__)
        if(ar__4(46:49) .EQ. '') e_RV(i__) = rNULL__
        if(ar__4(58:61) .EQ. '') e_Uvel(i__) = rNULL__
        if(ar__4(70:73) .EQ. '') e_Vvel(i__) = rNULL__
        if(ar__4(82:85) .EQ. '') e_Wvel(i__) = rNULL__
        if(ar__4(93:95) .EQ. '') e_SpVel(i__) = rNULL__
c    ..............Just test output...........
        write(6,5)
     +  ID_2(i__),n_ID_1(i__),RAhour(i__),DEdeg_3(i__),pm_1(i__),
     +  pmPA_1(i__),RV(i__),e_RV(i__),Uvel(i__),e_Uvel(i__),Vvel(i__),
     +  e_Vvel(i__),Wvel(i__),e_Wvel(i__),SpVel(i__),e_SpVel(i__),
     +  Note_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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