FORTRAN Generation
(/./ftp/cats/J/ApJ/834/142)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/834/142 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/834/142 Gould's Belt Distances Survey (GOBELINS). II. OMC (Kounkel+, 2017)
*================================================================================
*The Gould's Belt Distances Survey (GOBELINS)
*II. Distances and structure toward the Orion Molecular Clouds.
*    Kounkel M., Hartmann L., Loinard L., Ortiz-Leon G.N., Mioduszewski A.J.,
*    Rodriguez L.F., Dzib S.A., Torres R.M., Pech G., Galli P.A.B., Rivera J.L.,
*    Boden A.F., Evans II N.J., Briceno C., Tobin J.J.
*   <Astrophys. J., 834, 142-142 (2017)>
*   =2017ApJ...834..142K    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table4.dat'	! Positions of sources identified in at least two
                               epochs or with a single >5{sigma} detection

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

      integer*4     VLBA       (nr__) ! [1/165] VLBA index number
      character*1   YSO_       (nr__) ! [ny-] A YSO source? (- = unconfirmed)
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*8        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      real*4        e_RAs      (nr__) ! (mas) [0/1] Uncertainty in RAS
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*8        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        e_DEs      (nr__) ! (mas) [0.002/1.3] Uncertainty in DEs
      integer*4     JD         (nr__) ! (d) Julian Date of the observation
      real*8        Flux       (nr__) ! (mJy) [0.09/337.7] VLBA flux density at 5GHz
      real*4        e_Flux     (nr__) ! (mJy) [0.03/1.8] Uncertainty in Flux
      real*4        rms        (nr__) ! (mJy) [0.004/0.8] Field rms

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

C  Declarations for 'table5.dat'	! Distance and proper motion solutions

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

      integer*4     VLBA_1     (nr__1) ! [4/148] VLBA index number
      integer*4     VLBA2      (nr__1) ! ? 2nd VLBA number
      character*3   f_VLBA     (nr__1) ! Flag(s) on VLBA (1)
      character*16  Name       (nr__1) ! Common name
      character*7   SpT        (nr__1) ! MK spectral type
      character*3   r_SpT      (nr__1) ! Reference for SpT (2)
      character*9   Reg        (nr__1) ! Region
      real*4        Plx        (nr__1) ! (mas) [1.8/3.4] Parallax
      real*4        e_Plx      (nr__1) ! (mas) [0.02/0.6] Plx uncertainty
      integer*4     Dist       (nr__1) ! (pc) [302/536] Distance
      integer*4     e_Dist     (nr__1) ! (pc) [4/113] Dist uncertainty
      real*4        pmRA       (nr__1) ! (mas/yr) [-7.3/4.9] Proper motion along RA
      real*4        e_pmRA     (nr__1) ! (mas/yr) [0.03/0.7] pmRA uncertainty
      real*4        pmDE       (nr__1) ! (mas/yr) [-3.8/7] Proper motion along DEC
      real*4        e_pmDE     (nr__1) ! (mas/yr) [0.07/1.4] pmDE uncertainty
*Note (1): Flag as follows:
*     a = Spectroscopic binary.
*     b = Detected only in three epochs. Uncertainties could be underestimated.
*     c = Astrometric binary.
*     d = Probable binary.
*Note (2): Reference as follows:
*   H97 = Hillenbrand (1997, J/AJ/113/1733),
*   M12 = Morales-Calderon et al. (2012, J/ApJ/753/149),
*   S09 = Strassmeier (2009, J/other/A+ARV/17.251),
*   M88 = Marschall & Mathieu (1988AJ.....96.1956M),
*   H99 = Houk & Swift (1999MSS...C05....0H)
*   H13 = Hsu et al. (2013, J/ApJ/764/114),
*   A00 = Alcala et al. (2000A&A...353..186A),
*   S75 = Strom et al. (1975ApJ...196..489S).

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

C  Loading file 'table4.dat'	! Positions of sources identified in at least two
*                               epochs or with a single >5{sigma} detection

C  Format for file interpretation

    1 format(
     +  I3,1X,A1,1X,I1,1X,I2,1X,F9.6,1X,F5.3,1X,A1,I2,1X,I2,1X,F9.6,
     +  1X,F5.3,1X,I7,1X,F7.3,1X,F5.3,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,355
        read(1,'(A77)')ar__
        read(ar__,1)
     +  VLBA(i__),YSO_(i__),RAh(i__),RAm(i__),RAs(i__),e_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),JD(i__),
     +  Flux(i__),e_Flux(i__),rms(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(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)
     +  VLBA(i__),YSO_(i__),RAh(i__),RAm(i__),RAs(i__),e_RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_DEs(i__),JD(i__),
     +  Flux(i__),e_Flux(i__),rms(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 'table5.dat'	! Distance and proper motion solutions

C  Format for file interpretation

    2 format(
     +  I3,1X,I3,1X,A3,1X,A16,1X,A7,1X,A3,1X,A9,1X,F5.3,1X,F5.3,1X,I3,
     +  1X,I3,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,26
        read(1,'(A92)')ar__1
        read(ar__1,2)
     +  VLBA_1(i__),VLBA2(i__),f_VLBA(i__),Name(i__),SpT(i__),
     +  r_SpT(i__),Reg(i__),Plx(i__),e_Plx(i__),Dist(i__),e_Dist(i__),
     +  pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__)
        if(ar__1(5:7) .EQ. '') VLBA2(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  VLBA_1(i__),VLBA2(i__),f_VLBA(i__),Name(i__),SpT(i__),
     +  r_SpT(i__),Reg(i__),Plx(i__),e_Plx(i__),Dist(i__),e_Dist(i__),
     +  pmRA(i__),e_pmRA(i__),pmDE(i__),e_pmDE(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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