FORTRAN Generation
(/./ftp/cats/J/PAZh/43/521)

Conversion of standardized ReadMe file for file /./ftp/cats/J/PAZh/43/521 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 2026-Oct-14
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/PAZh/43/521 3D map of reddening and interstellar extinction (Gontcharov, 2017)
*================================================================================
*3D stellar reddening map from 2MASS photometry: An improved version.
*    Gontcharov G.A.
*    <Pis'ma Astron. Zh. 43, 521 (2017)>
*    =2017AstL...43..472G
*    =2017PAZh...43..521G        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'xyzejk.dat'	! E(J-Ks), E(B-V), Rv and Av tabulated as a
                                 function of X, Y, Z coordinates

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

      integer*4     X           ! (pc) [-1200,1200] X rectangular galactic coordinate
      integer*4     Y           ! (pc) [-1200,1200] Y rectangular galactic coordinate
      integer*4     Z           ! (pc) [-600,600] Z rectangular galactic coordinate
      real*8        E_J_Ks      ! (mag) [-0.003,0.491] E(J-Ks) reddening
      real*8        E_B_V       ! (mag) [-0.005,0.813] E(B-V) reddening (1)
      real*4        Rv          ! [1.78,5.46] Rv total-to-selective extinction
*                                   ratio (2)
      real*4        Av          ! (mag) [-0.02,2.52] Av interstellar extinction (3)
*Note (1): The E(B-V) are calculated as 1.655*E(J-Ks) following the PARSEC
*           extinction law
*Note (2): The Rv are taken from the paper 2012AstL...38...12G and then
*           interpolated
*Note (3): The Av are the product of E(B-V) and Rv.

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

C  Declarations for 'rlbejk.dat'	! E(J-Ks) tabulated as a function of R, l, b
                                 coordinates

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

C  Position composed of: GLON GLAT
      integer*4     R           ! (pc) [0,1200] Heliocentric distance
      integer*4     GLON        ! (deg) [0,359] Galactic longitude
      integer*4     GLAT        ! (deg) [-90,90] Galactic latitude
      real*4        E_J_Ks_1    ! (mag) [-0.001,0.489] E(J-Ks) reddening

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

C  Loading file 'xyzejk.dat'	! E(J-Ks), E(B-V), Rv and Av tabulated as a
*                                 function of X, Y, Z coordinates

C  Format for file interpretation

    1 format(I5,I6,I5,F7.3,F7.3,F5.2,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'xyzejk.dat')
      write(6,*) '....Loading file: xyzejk.dat'
      do i__=1,630109
        read(1,'(A41)')ar__
        read(ar__,1)X,Y,Z,E_J_Ks,E_B_V,Rv,Av
c    ..............Just test output...........
        write(6,1)X,Y,Z,E_J_Ks,E_B_V,Rv,Av
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'rlbejk.dat'	! E(J-Ks) tabulated as a function of R, l, b
*                                 coordinates

C  Format for file interpretation

    2 format(I4,I4,I4,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'rlbejk.dat')
      write(6,*) '....Loading file: rlbejk.dat'
      do i__=1,2868450
        read(1,'(A17)')ar__1
        read(ar__1,2)R,GLON,GLAT,E_J_Ks_1
c    ..............Just test output...........
        write(6,2)R,GLON,GLAT,E_J_Ks_1
c    .......End.of.Just test output...........
      end do
      close(1)

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