FORTRAN Generation
(/./ftp/cats/J/ApJ/697/207)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/697/207 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-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/ApJ/697/207     Cold stellar stream orbit fit           (Willett+, 2009)
*================================================================================
*An orbit fit for the Grillmair Dionatos cold stellar stream.
*    Willett B.A., Newberg H.J., Zhang H., Yanny B., Beers T.C.
*   <Astrophys. J., 697, 207-223 (2009)>
*   =2009ApJ...697..207W
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Spectra of GD-1 stream candidates

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Plate      (nr__) ! SDSS plate number
      integer*4     MJD        (nr__) ! SDSS Modified Julian Date
      integer*4     Fiber      (nr__) ! SDSS fiber number
      integer*4     Reg        (nr__) ! Stream Detection Region Number
      real*8        RAdeg      (nr__) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      real*8        Glon       (nr__) ! (deg) Galactic longitude
      real*4        Glat       (nr__) ! (deg) Galactic latitude
      real*4        Vgsr       (nr__) ! (km/s) Galactic standard of rest velocity (1)
      real*4        e_Vgsr     (nr__) ! (km/s) Error in Vgsr
      real*4        RV         (nr__) ! (km/s) Heliocentric radial velocity
      real*4        gmag       (nr__) ! (mag) Dereddened g band magnitude
      real*4        u_g        (nr__) ! (mag) Dereddened (u-g) color index
      real*4        g_r        (nr__) ! (mag) Dereddened (g-r) color index
      real*4        v_Fe_H_    (nr__) ! ([Sun]) Metallicity
      real*4        e__Fe_H_   (nr__) ! ([Sun]) Error in [Fe/H]
      real*4        log_g      (nr__) ! ([cm/s2]) Log of the surface gravity
      real*4        e_log_g    (nr__) ! ([cm/s2]) Error in log(g)
      real*4        pmGlon     (nr__) ! (mas/yr) Proper motion along galactic longitude
      real*4        pmGlat     (nr__) ! (mas/yr) Proper motion along galactic latitude
*Note (1): Vgsr is computed from RV with the formula:
*     Vgsr = RV + 10.1 cos(b)cos(l) + 224 cos(b)sin(l)+ 6.7 sin(b),

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

C  Loading file 'table2.dat'	! Spectra of GD-1 stream candidates

C  Format for file interpretation

    1 format(
     +  I4,1X,I5,1X,I3,1X,I1,1X,F10.6,1X,F9.6,1X,F7.3,1X,F6.3,1X,F6.1,
     +  1X,F4.1,1X,F6.1,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.2,1X,F4.2,1X,
     +  F4.2,1X,F4.2,1X,F4.1,1X,F5.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,48
        read(1,'(A123)')ar__
        read(ar__,1)
     +  Plate(i__),MJD(i__),Fiber(i__),Reg(i__),RAdeg(i__),DEdeg(i__),
     +  Glon(i__),Glat(i__),Vgsr(i__),e_Vgsr(i__),RV(i__),gmag(i__),
     +  u_g(i__),g_r(i__),v_Fe_H_(i__),e__Fe_H_(i__),log_g(i__),
     +  e_log_g(i__),pmGlon(i__),pmGlat(i__)
c    ..............Just test output...........
        write(6,1)
     +  Plate(i__),MJD(i__),Fiber(i__),Reg(i__),RAdeg(i__),DEdeg(i__),
     +  Glon(i__),Glat(i__),Vgsr(i__),e_Vgsr(i__),RV(i__),gmag(i__),
     +  u_g(i__),g_r(i__),v_Fe_H_(i__),e__Fe_H_(i__),log_g(i__),
     +  e_log_g(i__),pmGlon(i__),pmGlat(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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