FORTRAN Generation
(/./ftp/cats/J/AJ/137/1)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/137/1 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-19
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/137/1   Proper motions and astrometry of late-type dwarfs  (Faherty+, 2009)
*================================================================================
*The brown dwarf kinematics project.
*I. Proper motions and tangential velocities for a large sample of late-type M,
*L, and T dwarfs.
*    Faherty J.K., Burgasser A.J., Cruz K.L., Shara M.M., Walter F.M.,
*    Gelino C.R.
*   <Astron. J., 137, 1-18 (2009)>
*   =2009AJ....137....1F
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! New Proper Motion Measurements

      integer*4 nr__
      parameter (nr__=425)	! Number of records
      character*101 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)

      character*29  Name        ! Source name
      integer*4     RAh         ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm         ! (min) Minute of Right Ascension (J2000)
      real*4        RAs         ! (s) Second of Right Ascension (J2000)
      character*1   DE_         ! Sign of the Declination (J2000)
      integer*4     DEd         ! (deg) Degree of Declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs         ! (arcsec) Arcsecond of Declination (J2000)
      character*4   SpTo        ! Object optical spectral type
      character*4   SpTi        ! Object near-IR spectral type
      real*4        pmRA        ! (arcsec/yr) Proper motion in Right Ascension * cos(DE)
      real*4        e_pmRA      ! (arcsec/yr) Uncertainty in pmRA
      real*4        pmDE        ! (arcsec/yr) Proper motion in Declination
      real*4        e_pmDE      ! (arcsec/yr) Uncertainty in pmDE
      real*4        Base        ! (yr) Proper motion baseline
      character*6   Inst        ! Instrument

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

C  Declarations for 'table4.dat'	! Full Astrometric Database

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

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

      character*29  Name_1      ! Source name
      integer*4     r_Name      ! Discovery reference key
      integer*4     RAh_1       ! (h) Hour of Right Ascension (J2000) at Epoch
      integer*4     RAm_1       ! (min) Minute of Right Ascension (J2000) at Epoch
      real*4        RAs_1       ! (s) Second of Right Ascension (J2000) at Epoch
      character*1   DE__1       ! Sign of the Declination (J2000) at Epoch
      integer*4     DEd_1       ! (deg) Degree of Declination (J2000) at Epoch
      integer*4     DEm_1       ! (arcmin) Arcminute of Declination (J2000) at Epoch
      real*4        DEs_1       ! (arcsec) Arcsecond of Declination (J2000) at Epoch
      character*1   l_Jmag      ! Limit flag on Jmag
      real*4        Jmag        ! (mag) ? 2MASS J band magnitude
      real*4        e_Jmag      ! (mag) ? Uncertainty in Jmag
      character*1   n_Jmag      ! [a-d] Origin of Jmag
      character*1   l_Kmag      ! Limit flag on Kmag
      real*4        Kmag        ! (mag) 2MASS Ks band magnitude
      real*4        e_Kmag      ! (mag) ? Uncertainty in 2MASS Kmag
      character*1   n_Kmag      ! [a-d] Origin of Kmag
      real*8        pmRA_1      ! (arcsec/yr) Proper motion in Right Ascension,
*                                       pmRA*cos(DE)
      real*4        e_pmRA_1    ! (arcsec/yr) ? Uncertainty in pmRA
      real*8        pmDE_1      ! (arcsec/yr) Proper motion in Declination
      real*4        e_pmDE_1    ! (arcsec/yr) ? Uncertainty in pmDE
      integer*4     r_pmDE      ! Reference for the proper motion
      character*7   SpTo_1      ! Object optical spectral type
      character*4   SpTi_1      ! Object near-IR spectral type
      real*4        Dist        ! (pc) Heliocetrnic distance
      real*4        e_Dist      ! (pc) ? Uncertainty in Dist
      character*2   n_Dist      ! Origin of Dist (see file "notes.dat")
      real*4        Vtan        ! (km/s) Tangential velocity
      real*4        e_Vtan      ! (km/s) ? Uncertainty in Vtan
      character*24  Note        ! Additional notes (1)
      real*4        Epoch       ! (yr) ? Observation epoch
*Note (1): Additional notes, defined as follows:
*    VLMC = wide, very low mass companion;
*     UBL = Unusually Blue L dwarf;
*      LG = low surface-gravity dwarf;
*      YC = dwarf linked to a young cluster;
*      CB = close binary unresolved in 2MASS.

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref         ! Reference number
      character*1   f_Ref       ! [B] Flag on Ref
      character*19  Bibcode     ! Bibcode
      character*29  Aut         ! Author's name
      character*129 Com         ! Comment

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

C  Declarations for 'notes.dat'	! Notes

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

      character*2   Code        ! Note code
      character*141 Note_1      ! Text of the note

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

C  Loading file 'table3.dat'	! New Proper Motion Measurements

C  Format for file interpretation

    1 format(
     +  A29,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A4,1X,A4,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F4.1,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,425
        read(1,'(A101)')ar__
        read(ar__,1)
     +  Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpTo,SpTi,pmRA,e_pmRA,pmDE,
     +  e_pmDE,Base,Inst
        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)
     +  Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpTo,SpTi,pmRA,e_pmRA,pmDE,
     +  e_pmDE,Base,Inst
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Full Astrometric Database

C  Format for file interpretation

    2 format(
     +  A29,1X,I3,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A1,
     +  F5.2,1X,F4.2,1X,A1,1X,A1,F6.3,F6.3,1X,A1,1X,F7.4,1X,F6.4,1X,
     +  F7.4,1X,F6.4,1X,I3,1X,A7,1X,A4,1X,F6.2,1X,F4.2,1X,A2,2X,F5.1,
     +  1X,F4.1,1X,A24,1X,F6.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,853
        read(1,'(A193)')ar__1
        read(ar__1,2)
     +  Name_1,r_Name,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,
     +  l_Jmag,Jmag,e_Jmag,n_Jmag,l_Kmag,Kmag,e_Kmag,n_Kmag,pmRA_1,
     +  e_pmRA_1,pmDE_1,e_pmDE_1,r_pmDE,SpTo_1,SpTi_1,Dist,e_Dist,
     +  n_Dist,Vtan,e_Vtan,Note,Epoch
        if(ar__1(60:64) .EQ. '') Jmag = rNULL__
        if(ar__1(66:69) .EQ. '') e_Jmag = rNULL__
        if(ar__1(80:85) .EQ. '') e_Kmag = rNULL__
        if(ar__1(97:102) .EQ. '') e_pmRA_1 = rNULL__
        if(ar__1(112:117) .EQ. '') e_pmDE_1 = rNULL__
        if(ar__1(143:146) .EQ. '') e_Dist = rNULL__
        if(ar__1(158:161) .EQ. '') e_Vtan = rNULL__
        if(ar__1(188:193) .EQ. '') Epoch = rNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = 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 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  Name_1,r_Name,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,
     +  l_Jmag,Jmag,e_Jmag,n_Jmag,l_Kmag,Kmag,e_Kmag,n_Kmag,pmRA_1,
     +  e_pmRA_1,pmDE_1,e_pmDE_1,r_pmDE,SpTo_1,SpTi_1,Dist,e_Dist,
     +  n_Dist,Vtan,e_Vtan,Note,Epoch
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    3 format(I3,A1,A19,1X,A29,1X,A129)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,157
        read(1,'(A183)')ar__2
        read(ar__2,3)Ref,f_Ref,Bibcode,Aut,Com
c    ..............Just test output...........
        write(6,3)Ref,f_Ref,Bibcode,Aut,Com
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Notes

C  Format for file interpretation

    4 format(A2,1X,A141)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,34
        read(1,'(A144)')ar__3
        read(ar__3,4)Code,Note_1
c    ..............Just test output...........
        write(6,4)Code,Note_1
c    .......End.of.Just test output...........
      end do
      close(1)

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