meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

htrdr.md.in (16025B)


      1 # `htrdr`
      2 
      3 `htrdr` evaluates the intensity at any position (probe) of the scene, in
      4 any direction, in the presence of *surfaces* and an *absorbing and
      5 diffusing semi-transparent medium*, for both *internal* (longwave) or
      6 *external* (shortwave) *radiation sources*.
      7 The intensity is
      8 calculated using the *Monte-Carlo* method: a number of optical paths are
      9 simulated backward, from the probe position and into the medium.
     10 Various algorithms are used, depending on the specificities of the
     11 nature and shape of the radiation source.
     12 
     13 <video style="width:100%; text-align:center" controls poster="images/R8tr3.1.ARMCu.OUT.218.jpg">
     14   <source src="downloads/teapot_city_clouds.mp4" type="video/mp4">
     15 </video>
     16 
     17 > This film demonstrates the capacity of Monte-Carlo path-tracing
     18 > methods to handle large scale ratios from large cloud fields to cities
     19 > to buildings to trees and down to a teapot.
     20 > The 4D cloud field has been produced by the
     21 > Meso-NH
     22 > ([Lafore et al. 1998](https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html),
     23 >  [Lac et al. 2018](https://www.geosci-model-dev.net/11/1929/2018/))
     24 > Large Eddy model.
     25 > Spectral materials are defined in particular from data from the
     26 > Spectral Library of impervious Urban Materials
     27 > ([Kotthaus et al. 2013](https://zenodo.org/record/4263842)).
     28 > Each frame was rendered with
     29 > [htrdr-atmosphere](man/man1/htrdr-atmosphere.1.html)
     30 > using 8192 samples per pixel component.
     31 > The resulting images are then
     32 > post-processed with the [htpp](man/man1/htpp.1.html) program.
     33 > Refer to the video for a complete description of how it was produced.
     34 
     35 Applications are theoretically possible to any configuration.
     36 However, it all eventually comes down to the possibility of using the
     37 physical data of interest, in their most common formats, in each
     38 scientific community.
     39 `htrdr` is currently suitable for three main application fields:
     40 
     41 1. [Atmospheric radiative transfer](man/man1/htrdr-atmosphere.1.html): a
     42    clear-sky atmosphere is vertically stratified, neglecting Earth
     43    sphericity, and described in terms of absorption coefficients as a
     44    function of height and spectral quadrature point as per a
     45    correlated-k model.
     46    Cloud physical properties are provided on a 3D rectangular grid.
     47    Surface geometrical and optical properties can be provided for an
     48    arbitrary number of geometries.
     49    Internal radiation and solar radiation are taken into account.
     50 
     51 2. [Combustion processes](man/man1/htrdr-combustion.1.html):
     52    thermodynamic data is provided at the nodes of an unstructured
     53    tetrahedral mesh, while surface properties can still be provided for
     54    various materials.
     55    The radiation source is only external: a monochromatic laser sheet
     56    illuminates the inside of the combustion chamber for diagnostic
     57    purposes.
     58 
     59 3. [Planetary science](man/man1/htrdr-planets.1.html): takes into
     60    account the geometry of a "ground" of arbitrary shape, described by a
     61    triangular mesh, with the possibility of using an arbitrary number of
     62    materials.
     63    The radiative properties of a gas mixture must be provided on a
     64    tetrahedral mesh, using the k-distribution spectral model.
     65    The radiative properties of an arbitrary number of aerosol and
     66    hydrometeores can also be provided on their individual tetrahedral
     67    mesh.
     68    Calculations can be made for both internal and external radiation
     69    sources.
     70    In the case of an external source, a sphere of arbitrary size and
     71    position is used.
     72    This sphere can radiate as a Planck source at a specified brightness
     73    temperature, or be associated with a high-resolution radiance
     74    spectrum.
     75 
     76 [![Titan](thumbs/titan_1280x960x4096.jpg)](images/titan_1280x960x4096.jpg)
     77 
     78 > Images of Titan rendered with
     79 > [htrdr-planets](man/man1/htrdr-planets.1.html).
     80 > Its 3D atmosphere is composed of a gas mixture and two aerosol modes
     81 > for haze and clouds.
     82 
     83 [![Titan transit](thumbs/titan_transit.jpg)](images/titan_transit.jpg)
     84 
     85 > Rendering of Titan in transit situation, i.e. the source is
     86 > positioned behind Titan to simulate a solar eclipse by Titan.
     87 
     88 Since any radiative transfer observable is expressed as an integral of
     89 the radiance, and since there is a strict equivalence between the
     90 integral to be solved and the underlying Monte-Carlo algorithm (each
     91 integral is associated with the sampling of a random variable), the
     92 algorithms that calculate the radiance are used for computing various
     93 quantities:
     94 
     95 - *Images* on a camera sensor, in a given field of view.
     96   For combustion applications, only monochromatic images are supported.
     97   In atmospheres and in planetary science, spectral integration is also
     98   possible, both for solar and thermal images: CIE colorimetry is used
     99   for solar images, while thermal images are in fact brightness
    100   temperature maps, obtained from the incoming radiative flux over a
    101   specified spectral interval.
    102 
    103 - *Flux density maps*, on a grid of sensors, integrated over an entire
    104   hemisphere.
    105   In the case of combustion chambers, flux density maps can be
    106   calculated, while spectrally integrated flux density maps are also
    107   possible for atmospheric application, both for solar and thermal
    108   radiation.
    109 
    110 [![Clouds](thumbs/CLEMENT.jpg)](images/CLEMENT.jpg)
    111 
    112 [![Clouds infrared](thumbs/CLEMENT_lw_9000_10000.jpg)](images/CLEMENT_lw_9000_10000.jpg)
    113 
    114 > Images rendered with
    115 > [htrdr-atmosphere](man/man1/htrdr-atmosphere.1.html)
    116 > of a 1000³ cloud field produced by the Meso-NH
    117 > ([Lafore et al. 1998](https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html),
    118 >  [Lac et al. 2018](https://www.geosci-model-dev.net/11/1929/2018/))
    119 > Large Eddy Model.
    120 > The initial conditions and model set-up for the simulation are
    121 > described in
    122 > [Strauss et al. 2019](https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3614).
    123 > The infrared rendering is calculated in [9, 10]&nbsp;µm spectral range;
    124 > the color map displays the brightness temperature in Kelvin.
    125 
    126 ## Related articles
    127 
    128 - [He et al. 2026](https://doi.org/10.1016/j.jqsrt.2025.109722),
    129   "Simultaneous estimation of radiance and its sensitivities to
    130   radiative properties in a spherical-heterogeneous atmospheric
    131   radiative transfer model by Monte Carlo method: Application to Titan",
    132   Journal of Quantitative Spectroscopy and Radiative Transfer
    133 
    134 - [El Hafi et al. 2025](https://doi.org/10.1016/j.jqsrt.2025.109661),
    135   "Application of null-collision backward Monte Carlo algorithm to
    136   digital image rendering of sooting flames in the visible range",
    137   Journal of Quantitative Spectroscopy and Radiative Transfer
    138   ([open access](https://www.sciencedirect.com/science/article/pii/S0022407325003231))
    139 
    140 - [Caliot et al. 2022](https://doi.org/10.1007/s10546-022-00750-5),
    141   "Model of Spectral and Directional Radiative Transfer in Complex Urban
    142   Canopies with Participating Atmospheres", Boundary-Layer Meteorology
    143   ([open access](https://hal.science/hal-03813906/))
    144 
    145 - [Villefranque et al. 2022](https://doi.org/10.1126/sciadv.abp8934),
    146   "The “teapot in a city”: A paradigm shift in urban climate modeling",
    147   Science Advances
    148   ([open access](https://arxiv.org/abs/2204.14227))
    149 
    150 - [Sans et al. 2021](https://doi.org/10.1016/j.jqsrt.2021.107725)
    151   "Null-collision meshless Monte Carlo - A new reverse Monte Carlo
    152   algorithm designed for laser-source emission in absorbing/scattering
    153   inhomogeneous media", Journal of Quantitative Spectroscopy and
    154   Radiative Transfer
    155   ([open access](https://imt-mines-albi.hal.science/hal-03224186v1))
    156 
    157 - [Villefranque et al. 2019](https://doi.org/10.1029/2018MS001602)
    158   "A Path-Tracing Monte Carlo Library for 3-D Radiative Transfer in
    159   Highly Resolved Cloudy Atmospheres", Journal of Advances in Modeling
    160   Earth Systems
    161   ([open access](https://arxiv.org/abs/1902.01137))
    162 
    163 
    164 <span id="rel_projects"/>
    165 
    166 ## Related projects
    167 
    168 `htrdr` has been used, developped and extended in the following
    169 research projects:
    170 
    171 - The development of `htrdr` began with the
    172   [High-Tune](https://anr.fr/Projet-ANR-16-CE01-0010) project.
    173   Originally, it simulated the radiative transfer of an *external source*
    174   (solar) in a scene composed of a triangulated ground and an
    175   *atmosphere*, neglecting Earth sphericity, in the presence of a *cloud
    176   field* provided over a structured grid.
    177   It was later extended in order to take into account a *non-gray
    178   surface*, and the possibility to perform radiative transfer
    179   computations for a *internal source* (ground and atmosphere).
    180 
    181 - In project
    182   [ModRadUrb](https://www.umr-cnrm.fr/spip.php?article1204) the
    183   emphasis was put on taking into account the representation of *complex
    184   geometries* (detailled city scenes) using *spectral properties of an
    185   arbitrary number of materials*.
    186   The solver was extended to solve upward and downward *hemispherical
    187   atmospheric fluxes* on a plane positioned anywhere in the scene, both
    188   in the visible and the infrared spectral ranges.
    189 
    190   Note that the
    191   [`htrdr` Urban](https://gitlab.com/edstar/htrdr/-/tree/main_urban) fork adds
    192   the calculation of the radiative flux density incident on or absorbed
    193   by a group of triangles to the geometry of the ground and humans.
    194 
    195 - In project
    196   [MCG-RaD](https://anr.fr/Projet-ANR-18-CE46-0012)
    197   the `htrdr` codebase was used to explore a whole new class of
    198   radiative transfer algorithms: instead of relying on the full
    199   atmospheric radiative properties data set (prerequisite for current
    200   algorithms), the so-called *line sampling* algorithms will *not*
    201   require *nor* compute the absorption coefficient of the atmosphere.
    202   Instead, it will sample energetic transitions and use a Line-by-Line
    203   parameters database (such as [HITRAN](https://hitran.org/)) in order
    204   to perform a *rigorous spectral integration*, both in the visible and
    205   the infrared spectral ranges.
    206 
    207 - In project
    208   [Astoria](https://anr.fr/Project-ANR-18-CE05-0015).
    209   `htrdr` was used to produce images in the visible, in the presence
    210   of *combustion chambers* where radiation scattering is performed by soot
    211   aggregates.
    212   One of the main difficulty resides in the fact that the chamber is
    213   *illuminated by a laser*: the classical solar radiative transfer
    214   algorithm then fails to converge because of the collimated radiation
    215   source, and a
    216   [new algorithm](https://doi.org/10.1016/j.jqsrt.2021.107725)
    217   was thus designed in order to ensure numerical convergence.
    218 
    219 - In project
    220   [Rad-Net](https://anr.fr/Projet-ANR-21-CE49-0020)
    221   `htrdr` was adapted for applications in *planetary science* and
    222   *astrophysics*.
    223   The application is now a scene composed of an *arbitrary number of
    224   solid surfaces* (a planet, satellites) represented by triangular
    225   meshes and materials which describe their *spectral
    226   reflectivity/emissivity* properties.
    227   The *3D atmopshere* is defined by a number of participating
    228   semi-transparent media (a gas mixture and an arbitrary number of
    229   aerosol modes) whose radiative properties are provided at the nodes of
    230   a *unstructured tetrahedral volumetric grid*, independant for ach
    231   medium.
    232 
    233 [![Gulder horizontal slides](thumbs/gulder_horizontal_slides.jpg)](images/gulder_horizontal_slides.jpg)
    234 
    235 > Renderings in the visible range calculated by
    236 > [htrdr-combustion](man/man1/htrdr-combustion.1.html) of a laminar
    237 > sooting flame seen from above and illuminated by a laser sheet.
    238 > The images display radiation that is emitted by the laser, scattered
    239 > and transmitted by the combustion medium.
    240 > The laser sheet is horizontal, and intersects the medium at various
    241 > heights.
    242 > One can see the difference in the scattered signal between the left
    243 > and right parts of the image; since the laser propagates from the left
    244 > to the right, it is progressively attenuated while traveling the
    245 > medium.
    246 > The intensity of radiation subject to scattering therefore decreases.
    247 > In addition to these trapping effect these images provide some insight
    248 > about the scattering cross-section of the medium as a function of
    249 > height.
    250 > Scattering properties of soot gradually increase from the injection
    251 > position to a height of approximately 35 mm.
    252 > A steep decrease follows:
    253 > the image for a height of 40 mm is very similar to the image obtained
    254 > at 10 mm.
    255 
    256 ## Installation
    257 
    258 No pre-compiled version of `htrdr` is provided;
    259 it must be compiled directly from its source tree. A simple way is to
    260 rely on [star-build](https://gitlab.com/meso-star/star-build/), which
    261 automates the build and installation of `htrdr` and its dependencies
    262 from source code.
    263 
    264 ### Prerequisites
    265 
    266 To build `htrdr` with `star-build`, first make sure your system has the
    267 following prerequisites:
    268 
    269 - POSIX shell
    270 - POSIX make
    271 - curl
    272 - git
    273 - mandoc
    274 - pkg-config
    275 - sha512sum
    276 - GNU Compiler Collection in version 8.3 or higher
    277 - netCDF4 library and headers
    278 - OpenMPI library and headers in version 2 or higher
    279 
    280 ### Build
    281 
    282 Assuming that the aforementioned prerequisites are available, the build
    283 procedure is summed up to:
    284 
    285     git clone https://gitlab.com/meso-star/star-build.git
    286     cd star-build
    287     make \
    288       PREFIX=~/htrdr_@VERSION@ \
    289       BUILD=src/rad-apps/htrdr_@VERSION@.sh
    290 
    291 With `PREFIX` defining the path where `htrdr` will be installed and
    292 `BUILD` defining the installation script to be run.
    293 
    294 By default, the whole `htrdr` project is built but you may prefer to
    295 deploy `htrdr` only for a specific application, i.e. only for
    296 atmospheric radiative transfer, combustion processes or planetary
    297 science.
    298 For example, to install only the atmospheric part of `htrdr`:
    299 
    300     make \
    301         PREFIX=~/htrdr_@VERSION@ \
    302         BUILD=src/rad-apps/htrdr_@VERSION@.sh \
    303         ATMOSPHERE=ENABLE \
    304         COMBUSTION=DISABLE \
    305         PLANETS=DISABLE
    306 
    307 ### Run
    308 
    309 Evaluate the installed `htrdr.profile` file in the current
    310 shell to register `htrdr` against it. You can then run
    311 `htrdr` and consult its manual pages:
    312 
    313     . ~/htrdr_@VERSION@/etc/profile
    314     htrdr -h
    315     man htrdr
    316 
    317 Refer to the Starter Packs
    318 ([atmosphere](htrdr-atmosphere-spk.html),
    319 [combustion](htrdr-combustion-spk.html) or
    320 [planets](htrdr-planets-spk.html))
    321 to quickly run a `htrdr` calculation; these archives provide input data
    322 and scripts that are good starting points to use `htrdr`.
    323 
    324 [![Downward ShortWave flux](thumbs/downward_flux_500x500x2048_sw_380_4000_879.349.jpg)](
    325 images/downward_flux_500x500x2048_sw_380_4000_879.349.jpg)
    326 
    327 > Shortwave downward flux density maps in W/m² computed by
    328 > [htrdr-atmosphere](man/man1/htrdr-atmosphere.1.html)
    329 > at 1 meter height with the [DZVAR](htrdr-atmosphere-spk.html) cloud
    330 > field.
    331 > The sun is located at the zenith.
    332 > The spectral integration range is [0.38, 4] µm .
    333 > Its spatially-avaraged flux is 879.349 W/m² .
    334 > One can observe the contrast between the shadows of the clouds and
    335 > fully illuminated areas.
    336 
    337 [![Downward LongWave flux](thumbs/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg)](
    338 images/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg)
    339 
    340 > Longwave downward flux density maps in W/m² computed on the same scene
    341 > of the previous image.
    342 > The spectral integration ranges is [4, 100] µm.
    343 > Its spatially-avaraged is 425.159 W/m².
    344 > Note the effect of clouds (higher values, due to the emission by the
    345 > base of the cloud at higher temperatures than for a clear-sky zone)
    346 > and also a "ripple" effect that is due to the spatial variations of
    347 > water vapor concentration, as provided by the LES simulation.
    348 
    349 ## History
    350 
    351 `htrdr` has been funded by the
    352 [ANR Rad-Net](https://anr.fr/Projet-ANR-21-CE49-0020) since 2021.
    353 |Méso|Star> is subcontractor of the project.
    354 
    355 `htrdr` was funded by the
    356 [ANR Astoria](https://anr.fr/Project-ANR-18-CE05-0015)
    357 from 2018 to 2022.
    358 |Méso|Star> was sub-contractor of the project.
    359 
    360 `htrdr` was funded by the
    361 [ADEME](https://www.ademe.fr/) (MODEVAL-URBA-2019) from 2019 to 2022.
    362 |Méso|Star> was partner of the project with
    363 [CNRM](https://www.umr-cnrm.fr/).
    364 
    365 `htrdr` was funded by the
    366 [ANR High-Tune](https://anr.fr/Project-ANR-16-CE01-0010) from
    367 2016 to 2019.
    368 |Méso|Star> was sub-contractor of the project.
    369 Visit the
    370 [High-Tune project web site](http://www.umr-cnrm.fr/high-tune/?lang=en)