==========================================================================================
                          OUTPUT FILES PRODUCED BY THE PDR CODE
==========================================================================================

This directory contains output files produced by the PDR code.
Each run produces several files identified by their MIME type. Some of these files must 
be read with specific python tools provided with the PDR code. Those tools are
* extractor          : extract in ASCII format all quantities computed by the PDR code
* chemistry analyzer : analyze the chemical network at a given position in the cloud

Below, XX corresponds to the main iteration index. Usually, the Meudon PDR code writes
output files for the last and last but one iterations. It is recommended to compare 
results of these two last iterations to check the convergence of physical quantities.

==========================================================================================
Main output files:
==========================================================================================

------------------------------------------------------------------------------------------
.def:        Log file
             -----------------------------------------------------------------------------
             This ASCII file contains a summary of input parameters, 
             chemical network, various flags and runtime of the model
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
_s_XX.hdf5:  Standard output file. 
             -----------------------------------------------------------------------------
             This is the main output file of the code. It contains nearly all quantities 
             computed by the code as density profiles, gas and grain temperature profiles,
             level excitation as well as column densities and line intensities.
             
             This file can be read with the "extractor" python program provided with the
             code.
             The extractor allows to extract quantities in ASCII format.
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
_c_XX.hdf5:  Chemistry output file - Chemistry analysis
             -----------------------------------------------------------------------------
             This file can be used to study the chemical network at any position in the 
             cloud.
             It must be read with the chemistry analyzer python tool. 
------------------------------------------------------------------------------------------

==========================================================================================
Other output files:
==========================================================================================
These output files may not be produced by the code, depending on some internal options.
Most of these files are useful only for debugging purposes, other ones for specific studies.

------------------------------------------------------------------------------------------
.binXX:    Output files in binary format
           -------------------------------------------------------------------------------
           This file is no more produced by default. To generate it, set the flag
           F_W_BINARY to 1 in PXDR_CONSTANTES.f90.
           It contains the same data as the .hdf5 files, written in binary format and 
           can only be read on the computer that produced it, with the same compiler.
           It is superseded by the .hdf5 files for normal use.
           
           * To read it and produce output files in ASCII format, use the prep fortran 
           program located in the src directory.
           * To read it to analyze chemical networks, use the CHEM_ANALYSER fortran 
           program located in the src directory.
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
.rf_alb:   Radiation field and albedo
           -------------------------------------------------------------------------------
           This file contains the radiation field, the full albedo (gas + dust contributions)
           and the full absorption coefficient (gas + dust) at each position in the 
           cloud and at each wavelength. This a voluminous file that is produced only by
           setting flag F_W_RF_ALB to 1 in PXDR_CONSTANTES.f90.
           
           It can be used to extract the spectrum at a given depth in the cloud, or to 
           get the radiative energy density at a specific wavelength as a function of AV. 
           
           Data are written in a binary format that can only be read on the computer that
           produced the file.
           
           To read this file, use the read_rf_alb_abs.f90 program located in the src/OTHER_PROG
           directory of the PDR code. 
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
.uv:       Cloud transmission
           -------------------------------------------------------------------------------
           This file provides the normalized absorption through the cloud at each wavelength. 
           It can be used to multiply a given background source emission (star or external galaxy) 
           to evaluate the spectrum after absorption

           First column:  wavelength
           Second column: light attenuation (exp(-tau(lambda))
           Third column:  optical depth (tau(lambda))
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
.flin:     External field
           -------------------------------------------------------------------------------
           This file is mainly useful for debugging purposes, and should not be used in standard
           exploitation. It provides *some* informations on the external radiation field 
           impinging the cloud.

           By default the incoming radiation field is isotropic, but it may include an additionnal
           normal component. This radiation field is coming from either side of the cloud, 
           but most of the time from both (singled side, although possible, is frowned about).

           Columns are as follow:
             1   : Wavelength (Angstrom)
             2   : Perpendicular contribution to left side (specific intensity)
             3   : Isotropic contribution to left side (specific intensity)
             4   : Perpendicular contribution to right side (specific intensity)
             5   : Isotropic contribution to right side (specific intensity)
             6-9 : Internal usage (do not use)
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
.Iesc:     Emission spectra
           -------------------------------------------------------------------------------
           This file gives the specific intensity radiated by the cloud as a function of
           direction. The radiation field is in erg cm-2 s-1 sr-1 Ang-1, and is given 
           at all directions used for the boundary conditions of the radiative transfer 
           part of the code.
           These are 0 of a Legendre polynomial of degree L+1, where L is the order of
           the approximation used.

           The relevant angles (in degrees) are given in the header. The first column gives
           the wavelength in Angstrom, followed by 2 * (L+1) values of the specific intensities
           at both surfaces of the cloud:
             1                           : Wavelength (Angstrom)
             2-(L+1)/2+1                 : Outward going I on left side
             (L+1)/2+2 - (L+2)           : Incoming radiation field (boundary condition) on the left
             (L+3) - 3*(L+1)/2+1         : Incoming radiation field (boundary condition) on the right
             3*(L+1)/2 + 2 - 2*(L+1) + 1 : Outward going I on the right

           The boundary conditions are built from the data written in the previous file (.flin)
           through a rather complex condition insuring integrated energy conservation.
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
.extinct   Extinction curve
           -------------------------------------------------------------------------------
           This file provides the extinction curves used in the code to solve for radiative
           transfer and to convert from AV to size (in cm).

           It is computed from the internal values of the absorption and scattering coefficients
           at all wavelengths. These may be derived from 3 different sources:
             * From a "Fitzpatrick & Massa" fit to an observed curve, via the use of an ad
               hoc prescribed albedo
             * From the grain model of Draine
             * From data computed by the DUSTEM model of interstellar grain, directly coupled
               to the PDR code.

           Columns are:
             1 : 1 / lambda (micron^-1)
             2 : (k(lambda) - k(V)) / (k(B) - k(V), where k = kappa + sigma, and B and V are
                 standard photometric bands
             3 : Extinction curve
------------------------------------------------------------------------------------------

