commit e10289d230aa0cc241269c3ded6d0e71c7f0f18e parent b3c3e91460afe24d5bcc57461eb98aa1e356ce9d Author: Vincent Forest <vincent.forest@meso-star.com> Date: Fri, 9 Jul 2021 17:17:54 +0200 Begin the update of the High-Tune section in htrdr Diffstat:
52 files changed, 795 insertions(+), 609 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -13,7 +13,8 @@ about-en.html about-fr.html legal-en.html legal-fr.html -high-tune.html +htrdr.html +htrdr-docs.html starter-pack.html pgp_signatures.html solstice.html diff --git a/Makefile b/Makefile @@ -15,21 +15,21 @@ REMOTE=OVH:www/projects REMOTE_DIR=/$(shell basename ${REMOTE}) -SUBDIRS=art schiff solstice star-engine stardis misc high-tune +SUBDIRS=art schiff solstice star-engine stardis misc htrdr .PHONY: default all publish default: all all: @for subdir in ${SUBDIRS}; do make -C $$subdir; echo ""; done - @echo "Options -Indexes" > .htaccess - @echo "Redirect ${REMOTE_DIR}/index.html ${REMOTE_DIR}/misc/about-fr.html" \ - >> .htaccess +.htaccess: build_htaccess.sh + @bash build_htaccess.sh ${REMOTE_DIR} + clean: @for subdir in ${SUBDIRS}; do make -C $$subdir clean; done @rm .htaccess -publish: +publish: .htaccess @for subdir in ${SUBDIRS}; do REMOTE=${REMOTE} make -C $$subdir publish; done rsync -avz solstice.html .htaccess fonts meso.css ${REMOTE} diff --git a/build_htaccess.sh b/build_htaccess.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Copyright (C) 2019-2021 |Meso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +if [ $# -lt 1 ]; then + echo "Usage: $0 REMOTE_DIR" + exit 1 +fi + +redirections=( + "high_tune/high-tune.html htrdr/htrdr.html" + "high_tune/starter-pack.html htrdr/starter-pack.html" + "high_tune/man/man1/htpp.1.html htrdr/man/man1/htpp.1.html" + "high_tune/man/man1/htrdr.1.html htrdr/man/man1/htrdr.1.html" + "high_tune/man/man1/htrdr-atmosphere.1.html htrdr/man/man1/htrdr-atmosphere.1.html" + "high_tune/man/man1/htrdr-combustion.1.html htrdr/man/man1/htrdr-combustion.1.html" + "high_tune/man/man1/les2htcp.1.html htrdr/man/man1/les2htcp.1.html" + "high_tune/man/man5/atrri.5.html htrdr/man/man5/atrri.5.html" + "high_tune/man/man5/atrtp.5.html htrdr/man/man5/atrtp.5.html" + "high_tune/man/man5/htcp.5.html htrdr/man/man5/htcp.5.html" + "high_tune/man/man5/htmie.5.html htrdr/man/man5/htmie.5.html" + "high_tune/man/man5/htrdr-image.5.html htrdr/man/man5/htrdr-image.5.html" + "high_tune/man/man5/htrdr-materials.5.html htrdr/man/man5/htrdr-materials.5.html" + "high_tune/man/man5/htrdr-obj.5.html htrdr/man/man5/htrdr-obj.5.html" + "high_tune/man/man5/mrumtl.5.html htrdr/man/man5/mrumtl.5.html" + "high_tune/man/man5/sth.5.html htrdr/man/man5/sth.5.html" + "index.html misc/about-fr.html" +) + +REMOTE_DIR=$1 + +echo "Options -Indexes" > .htaccess + +tput bold; echo ">>> build the .htaccess file"; tput sgr0 +for((i=0; i<${#redirections[@]}; ++i)); do + entry=(${redirections[$i]}) + from=${entry[0]} + to=${entry[1]} + echo "Redirect ${REMOTE_DIR}/${from} ${REMOTE_DIR}/${to}" >> .htaccess +done +echo "" diff --git a/high-tune/Makefile b/high-tune/Makefile @@ -1,43 +0,0 @@ -# Copyright (C) 2019-2021 |Meso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -HTRDR-VERSION=0.6.1 -HTRDR-STARTER-PACK-VERSION=0.6.0 - -SRC = high-tune.html.in high-tune.sh -IMG = \ - city.jpg \ - CLEMENT.jpg \ - CLEMENT_lw_9000_10000.jpg \ - downward_flux_500x500x2048_lw_4000_100000_425.156.jpg \ - downward_flux_500x500x2048_sw_380_4000_879.349.jpg \ - DZVAR2.jpg \ - DZVAR.jpg \ - HRES_ARMCu.jpg \ - L12km_BOMEX.jpg \ - L25_Fire.jpg - -.PHONY: all clean default publish -default: all - -all: ${SRC} - @bash high-tune.sh ${HTRDR-VERSION} ${HTRDR-STARTER-PACK-VERSION} - -publish: - rsync -avzr high-tune.html starter-pack.html ${IMG} downloads man ${REMOTE}/high-tune/ - -clean: - rm -rf high-tune.html downloads/*.sig man - diff --git a/high-tune/high-tune.html.in b/high-tune/high-tune.html.in @@ -1,302 +0,0 @@ -<script> -// When the user clicks on <div>, open the popup -function poptext(Id) { - var popup = document.getElementById(Id); - popup.classList.toggle("show"); -} -</script> - - -<header> - <h1>High-Tune: RenDeRer - <span class=subtitle> - Image renderer of cloudy atmospheres - </span> - </h1> -</header> - -<div class="news"> - <p><b>HTRDR ${VERSION} is available</b></p> - <ul> - <li>Build from sources: - <a href=https://gitlab.com/meso-star/star-engine/tree/High-Tune-${VERSION}> - git</a> - </li> - </ul> -</div> - -<p>High Tune: RenDeRer (<code>htrdr</code>) was originally developed as a part -of the <a href="http://www.umr-cnrm.fr/high-tune/?lang=en">High-Tune</a> -project to illustrate the implementation of <b>radiative transfer</b> -algorithms in <b>inhomogeneous media</b>. It was then extended in the <a -href="https://www.umr-cnrm.fr/spip.php?article1204&lang=en">ModRadUrb</a> -project to handle longwave spectral integration and to add support of -<b>spectral reflectivities</b> to the geometries. <code>htrdr</code> is -actually an <b>image renderer</b> in the <b>visible</b> or <b>infrared</b> part -of the spectrum, for scenes composed of an atmospheric gas mixture, clouds and -a ground. It uses volumetric spectral data that should be provided for the -pressure and temperature atmospheric vertical profile, the liquid water content -in suspension within the clouds that is a result of Large Eddy Simulation -computations, and the optical properties of water droplets that have been -obtained from a Mie code. It also relies on the reflectivity of the ground -geometry that can vary spatially and spectrally.</p> - -<div class="news"> - <p><b>Related article</b></p> - <ul> - <li> - <a href="https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018MS001602"> - Villefranque et al. (2019)</a></li> - </ul> -</div> - -<p><code>htrdr</code> evaluates the intensity incoming on each pixel of the -sensor array. The underlying algorithm is based on a <b>Monte-Carlo</b> method: -it consists in simulating a given number of optical paths originating from a -camera, directed to the atmosphere, taking into account light absorption and -scattering phenomena. - -<p>By default the spectral integration is performed for the visible part of the -spectrum in [380, 780] nanometers, for the three components of the <b>CIE 1931 -XYZ colorimetric space</b> that are subsequently recombined in order to obtain -the final color for each pixel. As an alternative, one can explicitly define -the longwave or shortwave spectral range into which the wavelength are going to -be continuously sampled.</p> - -<p>During the simulation, <code>htrdr</code> <b>dynamically loads/unloads</b> -cloud properties and thus it can handle clouds whose data do not feat in main -memory. Furthermore, in addition of a <b>shared memory parallelism</b>, -<code>htrdr</code> relies on the <a href="https://www.mpi-forum.org/">Message -Passing Interface</a> specification to parallelise its computations in a -<b>distribute memory</b> environment; the <code>htrdr</code> binary can thus be -run either directly or through a MPI process launcher like <code>mpirun</code>. - -<div class="video"> - <video style="width:100%; text-align:center" controls poster=HRES_ARMCu.jpg> - <source src="downloads/HRES_ARMCu.mp4" type="video/mp4"> - Your browser does not support the video tag. - </video> - <div class="caption"> - Rendering of a 4D cloud field produced by the Meso-NH (<a - href="https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html">Lafore - et al 1998</a>, <a href="https://www.geosci-model-dev.net/11/1929/2018/">Lac - et al 2018</a>) Large Eddy model. Each frame was rendered with - <code>htrdr</code> using 4096 samples per pixel component. The resulting - images are then postprocessed with the <a - href="man/man1/htpp.1.html">htpp</a> program. Refer to the video for a - complete description of how it was produced. - </div> -</div> - -<h2 id="rel_projects">Related projects</h2> - -<div class="img" style="width: 20em"> - <a href="CLEMENT.jpg"> - <img src="CLEMENT.jpg" alt="CLEMENT"> - </a> - <div class="caption"> - Image rendered with htrdr of a 1000<sup>3</sup> cloud field produced by the - Meso-NH (<a - href="https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html">Lafore et - al 1998</a>, <a href="https://www.geosci-model-dev.net/11/1929/2018/">Lac et - al 2018</a>) Large Eddy Model. The initial conditions and model set-up for - the simulation are described in <a - href="https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3614">Strauss - et al. (2019)</a>. - </div> -</div> - -<p>High-Tune: RenDeRer is currently used, developped and extended in the -following research projects.</p> - -<ul> - <li>In project <a - href="https://www.umr-cnrm.fr/spip.php?article1204&lang=en">ModRadUrb</a> the - emphasis is put on taking into account the representation of <b>complex - geometries</b> (detailled city scenes) using <b>spectral properties of a - arbitrary number of materials</b>. The solver is going to be extended to - solve upward and downward <b>atmospheric fluxes</b> at any level in the - scene, both in the visible and the infrared spectral ranges.</li> - - <li>In project <a href="https://mcg-rad.ipsl.fr/en/">MCG-Rad</A> the - <code>htrdr</code> codebase is used to explore a whole new class of radiative - transfer algorithms: instead of relying on the full atmospheric radiative - properties data set (prerequisite for current algorithms), the so-called - <b>line sampling</b> algorithms will not require nor compute the absorption - coefficient of the atmosphere. Instead, it will sample energetic transitions - and use a Line-by-Line parameters database (such as <a - href="https://hitran.org/">HITRAN</a>) in order to perform a <b>rigorous - spectral integration</b>, both in the visible and the infrared spectral - ranges.</li> - - <li>In project <a - href="https://anr.fr/en/funded-projects-and-impact/funded-projects/project/funded/project/b2d9d3668f92a3b9fbbf7866072501ef-62de701ce7/?tx_anrprojects_funded%5Bcontroller%5D=Funded&cHash=d684bb545d6cd7afb9ec8b755c2d9df8">Astoria</a>, - <code>htrdr</code> will be used to produce both radiative transfer - computations in the infrared and images in the visible, in the presence of - <b>combustion chambers</b> where radiation scattering is performed by soot - aggregates. The main difficulty resides in the fact that the chamber is - <b>illuminated by a laser</b>: the classical solar radiative transfer - algorithm then fails to converge because of the collimated radiation source, - and a new algorithm has to be designed in order to ensure numerical - convergence.</li> -</ul> - -<h2>A straight interface</h2> - -<div class="img" style="width: 20em"> - <a href="CLEMENT_lw_9000_10000.jpg"> - <img src="CLEMENT_lw_9000_10000.jpg" alt="CLEMENT_lw"> - </a> - <div class="caption"> - Infrared rendering in [9, 10] micrometers of the 500<sup>3</sup> cloud - field of <a - href="https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3614">Strauss - et al. (2019)</a>. The color map displays the brightness temperature in - Kelvin. </div> -</div> - -<p><code>htrdr</code> is a <b>command-line tool</b> that performs computations -on input data, writes the rendered image and nothing more. No assumption is -made on how input data are created excepted that they have to follow the -expected file formats. In the same spirit, the output image is written in plain -text, as a list of raw pixel estimations, making easier the processing of its -data. - -<p>This thin interface is, by nature, particularly well suited to be -<b>extended</b> and <b>integrated</b> into a any workflow. For instance, one -can save the cloud properties directly in the "High-Tune: cloud properties" -format (<a href=man/man5/htcp.5.html>htcp</a>) or use the <a -href=man/man1/les2htcp.1.html>les2htcp</a> tool to convert cloud properties -from <a href="https://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> to -<code>htcp</code>. In the same way, the output image can be post-treated -through <a href="http://www.gnuplot.info">gnuplot</a> or converted in a regular -PPM image by the <a href="man/man1/htpp.1.html">htpp</a> program, and then -visualised in an image viewer as for instance <a -href="https://feh.finalrewind.org/">feh</a> or <a -href="https://imagemagick.org/script/display.php">display</a>. - -<h2>Quick start</h2> - -<div class="img" style="width: 20em"> - <div style="width: 49.5%; float: left; padding-right: 1%" > - <a href="downward_flux_500x500x2048_sw_380_4000_879.349.jpg"> - <img src="downward_flux_500x500x2048_sw_380_4000_879.349.jpg" alt="downward_flux_sw"> - </a> - </div> - <div style="width: 49.5%; float: left; padding-right: 0%"> - <a href="downward_flux_500x500x2048_lw_4000_100000_425.156.jpg"> - <img src="downward_flux_500x500x2048_lw_4000_100000_425.156.jpg" alt="downward_flux_lw"> - </a> - </div> - <div class="caption"> - Shortwave (left) and longwave (right) downward flux density maps in - W/m<sup>2</sup> computed at 1 meter height with the <a - href=starter-pack.html>DZVAR</a> cloud field. The shortwave and longwave - spectral integration ranges are [0.38, 4] micrometers and [4, 100] - micrometers, respectively. Their spatially-avaraged flux is - 879.349 W/m<sup>2</sup> in shortwave and 425.159 W/m<sup>2</sup> in - longwave. In both cases, the spatial position is the sub-solar point, meaning - that the sun is located at the zenith. In the shortwave map we observe the - contrast between the shadows of the clouds and fully illuminated areas. In - longwave, we can see the effect of clouds (higher values, due to the emission - by the base of the cloud at higher temperatures than for a clear-sky zone) - and also a "ripple" effect that is due to the spatial variations of water - vapor concentration, as provided by the LES simulation. - </div> -</div> - -<p>No pre-compiled version of <code>htrdr</code> is provided; it must be -compiled directly from its source tree. A simple way is to rely on the -<code>high_tune</code> branch of the <a -href="https://gitlab.com/meso-star/star-engine/tree/high_tune">Star-Engine</a> -project: it provides CMake scripts that automate the download, the compilation -and the installation of <code>htrdr</code> and its dependencies. This build -procedure assumes the following prerequisites: - -<ul> - <li><a href=https://git-scm.com>git</a> source control as well its <a - href=https://git-lfs.github.com>Large File System</a> extension.</li> - <li><a href=https://gcc.gnu.org>GNU Compiler Collection</a> in version 4.8 or - higher.</li> - <li><a href="https://cmake.org">CMake</a> in version 3 or higher.</li> - <li><a href=https://www.unidata.ucar.edu/software/netcdf/>NetCDF</a> library - and headers in version 4 or higher.</li> - <li><a href=https://www.open-mpi.org/>OpenMPI</a> library and headers.</li> - <li>Optionally, the <a href=https://asciidoc.org/>AsciiDoc</a> - tool suite to generate the man pages of the reference documentation.</li> -</ul> - -<h3>Build</h3> - -<p>Assuming that the aforementioned prerequisites are available, the build -procedure is summed up to: - -<pre class="code"> -~ $ git clone -b High-Tune-${VERSION} \ - https://gitlab.com/meso-star/star-engine.git \ - High-Tune-${VERSION} -~ $ mkdir High-Tune-${VERSION}/build -~ $ cd High-Tune-${VERSION}/build -~/High-Tune-${VERSION}/build $ cmake ../cmake -~/High-Tune-${VERSION}/build $ make -</pre> - -<h3>Run</h3> - -By default <code>htrdr</code> is installed in the <code>local</code> -subdirectory of <code>High-Tune-${VERSION}</code>. Source the provided -<code>high_tune.profile</code> file to register <code>htrdr</code> against the -current shell. - -<pre class="code"> -~ $ source ~/High-Tune-${VERSION}/local/etc/high_tune.profile -~ $ htrdr -h -</pre> - -<p>If the AsciiDoc tool suite was installed on <code>make</code> -invocation, the <b>reference documentation</b> of the <code>htrdr</code> -program and its associated file formats should be available through man pages. -Use the <code>man</code> command-line to consult them.</p> - -<pre class="code"> -~ $ man htrdr -~ $ man htrdr-image -~ $ man htrdr-materials -~ $ man htrdr-obj -~ $ man htcp -~ $ man htmie -~ $ man mrumtl -</pre> - -<p>Refer to the <a href=starter-pack.html>High-Tune: Starter Pack</a> to -quickly run a <code>htrdr</code> rendering; this archive provides input data -and scripts that are good starting points to use <code>htrdr</code>. - -<h3>Package</h3> - -<p>Once built, the <code>htrdr</code> installation can be packaged in an -archive that can then be deployed on compatible systems, <i>i.e.</i> systems -whose C library, NetCDF library and MPI implementation are compatibles with the -ones available on the system used to build <code>htrdr</code>. - -<pre class="code"> -~/High-Tune-${VERSION}/build $ make pkg -~/High-Tune-${VERSION}/build $ ls package/High-Tune-${VERSION}* # list packages -</pre> - -${RELEASE_NOTES} - -<h2>License</h2> - -<p>Copyright © 2018, 2019, 2020 <a -href="mailto:contact@meso-star.com">|Méso|Star></a>.<br> -Copyright © 2018, -2019 Centre National de la Recherche Scientifique (CNRS), Université Paul -Sabatier.</p> - -<p><code>htrdr</code> is free software released under the GPLv3+ -license: GNU GPL version 3 or later. You can freely study, modify or extend -it. You are also welcome to redistribute it under certain conditions; refer to -the <a href="https://www.gnu.org/licenses/gpl.html">license</a> for -details.</p> - diff --git a/high-tune/high-tune.sh b/high-tune/high-tune.sh @@ -1,231 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2021 |Meso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -set -e - -source ../meso-menu.sh - -if [ $# -lt 2 ]; then - echo "Usage: $0 VERSION VERSION_PACK" - exit 1 -fi - -if [ ! -f "./downloads/High-Tune-$1-GNU-Linux64.tar.gz" ]; then - echo "Cannot find ./downloads/High-Tune-$1-GNU-Linux64.tar.gz" - exit 1 -fi - -dir_curr=$(pwd) # Current directory -dir_temp=$(mktemp -d) # Working directory - -################################################################################ -# Sign the package -################################################################################ -tput bold; echo ">>> High-Tune packages"; tput sgr0 -archs=$(find "./downloads" -regex "^.*/High-Tune-.*[0-9]+\.[0-9]+\.[0-9]+.*tar.gz") - -sign_something=0 -for arch in $archs; do - if [ ! -f $arch.sig ]; then - echo "Sign $arch" - gpg -a -o $arch.sig --detach-sign $arch - sign_something=1 - fi -done - -if [ $sign_something == 0 ]; then - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Extract the current archive -################################################################################ -cd $dir_temp -arch=High-Tune-$1-GNU-Linux64 -cp "$dir_curr/downloads/$arch.tar.gz" . -tar xzf $arch.tar.gz -htspk=High-Tune-Starter-Pack-$2 -tar xzf $dir_curr/downloads/$htspk.tar.gz $htspk/README.md -cd $dir_curr - -################################################################################ -# Generate the release note -################################################################################ -cd $dir_temp -release_notes=$($markdown $arch/share/doc/htrdr/README.md \ - | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed '/^<h2>License<\/h2>/,$d' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-materials\.5\.txt/man\/man5\/htrdr-materials.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-obj\.5\.txt/man\/man5\/htrdr-obj.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/mrumtl\/-\/blob\/master\/doc\/mrumtl\.5\.txt/man\/man5\/mrumtl.5.html/g' \ - | sed 's/^<h2>Release notes/<h2 id=release_notes>Release notes/' \ - | sed 's/scracth/scratch/') # Misspelling -cd $dir_curr - -################################################################################ -# Generate the overview page -################################################################################ -tput bold; echo ">>> High-Tune web pages"; tput sgr0 -echo "Write high-tune.html" -{ - print_header High-Tune Overview - VERSION=$1 RELEASE_NOTES="$release_notes" envsubst < high-tune.html.in; - print_footer -} > high-tune.html - -################################################################################ -# Generate the starter pack -################################################################################ -echo "Write starter-pack.html" - -$markdown $dir_temp/$htspk/README.md \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htgop.git/downloads\/gas_opt_prop_en.pdf/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htcp.git/man\/man5\/htcp.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htmie.git/man\/man5\/htmie.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htpp.git/man\/man1\/htpp.1.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr.git/man\/man1\/htrdr.1.html/g' \ - > $dir_temp/$htspk/README.html - -intro=$(cat $dir_temp/$htspk/README.html \ - | sed 1d \ - | sed '/^<h2>Content<\/h2>/,$d') - -content=$(cat $dir_temp/$htspk/README.html \ - | sed '/^<h2>Content<\/h2>/,$!d' \ - | sed 1d \ - | sed '/^<h2>Quick start<\/h2>/,$d') - -release_notes=$(cat $dir_temp/$htspk/README.html \ - | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed 1d \ - | sed 's/ gemetry / geometry /' \ - | sed '/^<h2>Copyright notice<\/h2>/,$d') - -copying=$(cat $dir_temp/$htspk/README.html \ - | sed '/^<h2>Copyright notice<\/h2>/,$!d' \ - | sed 's/from/from the/' \ - | sed 's/opyright (C)/opyright \©/g') - -{ - print_header High-Tune Starter-Pack - - echo "<header>" - echo " <h1>High-Tune: Starter Pack</h1>" - echo "</header>" - echo "<div class="news">" - echo " <p><b>High-Tune: Starter Pack $2</b></p>" - echo " <ul>" - echo " <li><a href=\"downloads/High-Tune-Starter-Pack-$2.tar.gz\">tarball</a> /" - echo " <a href=\"downloads/High-Tune-Starter-Pack-$2.tar.gz.sig\">pgp</a></li>" - echo " </ul>" - echo "</div>" - - echo $intro - - echo "<h2>Content</h2>" - echo "<div class=\"img\" style=\"padding-top:3em; width: 17em\">" - echo " <a href=\"DZVAR.jpg\"><img src=\"DZVAR.jpg\" alt=\"DZVAR\"></a>" - echo " <a href=\"DZVAR2.jpg\"><img src=\"DZVAR2.jpg\" alt=\"DZVAR2\"></a>" - echo " <a href=\"L12km_BOMEX.jpg\"><img src=\"L12km_BOMEX.jpg\" alt=\"L12_BOMEX\"></a>" - echo " <a href=\"L25_Fire.jpg\"><img src=\"L25_Fire.jpg\" alt=\"L25_Fire\"></a>" - echo " <a href=\"city.jpg\"><img src=\"city.jpg\" alt=\"city\"></a>" - echo " <div class=\"caption\">" - echo " Images of the DZVAR, DZVAR2, L12km_BOMEX, L25_Fire and city scenes" - echo " rendered with <code>htrdr</code>." - echo " </div>" - echo "</div>" - - echo $content - - echo "<h2>Install and run</h2>" - echo "" - echo "<p>Download the High-Tune: Starter-Pack archive and verify its integrity" - echo "against its <a href=\"../misc/pgp_signatures.html\">PGP signature</a>. Then" - echo "extract it. Assuming that <code>htrdr</code> is installed and registered in the" - echo "current shell, one can invoke a <code>htrdr</code> rendering as bellow:" - echo "" - echo "<pre class=\"code\">" - echo "$ cd ~/High-Tune-Starter-Pack-$2" - echo "~/High-Tune-Starter-Pack-$2 $ bash ht-run.sh scenes/DZVAR2" - echo "</pre>" - echo "" - echo "<p>With <code>~/High-Tune-Starter-Pack-$2</code> the directory" - echo "where the Starter Pack is installed. The resulting image" - echo "<code>DZVAR2_1280x720x256.txt</code> is stored in the <a" - echo "href=\"man/man5/htrdr-image.5.html\">htrdr-image</a> file format. Use the <a" - echo "href=\"man/man1/htpp.1.html\">htpp</a> program to convert it in a regular PPM" - echo "file that can be then displayed with a regular image viewer." - echo "" - echo "<pre class=\"code\">" - echo "~/High-Tune-Starter-Pack-$2 $ htpp -o DZVAR2.ppm DZVAR2_1280x720x256.txt" - echo "</pre>" - - echo "<h2>Donwloads</h2>" - - archs=$(find downloads -regex ".*/High-Tune-Starter-Pack.*\.tar.gz" | sort -r ) - echo "<table>" - echo " <tr>" - echo " <th>Version</th>" - echo " <th>Archive</th>" - echo " </tr>" - for i in $archs; do - version=$(echo $i | sed "s/.*High-Tune-Starter-Pack-\(.*\)\.tar.gz/\1/g") - echo " <tr>" - echo " <td>${version}</td>" - echo " <td>" - echo " [<a href='${i}'>tarball</a>]" - if [ -f $i.sig ]; then - echo " [<a href='$i.sig'>pgp</a>]" - fi - echo " </td>" - echo " </tr>" - done - echo "</table>" - - echo $release_notes - echo $copying - - print_footer - -} > starter-pack.html - -################################################################################ -# Generate the reference documentation -################################################################################ -cd $dir_temp -cp "$dir_curr/downloads/$arch.tar.gz" . -tar xzf $arch.tar.gz -cd $dir_curr - -for((i=0; i<${#high_tune_man_pages[@]}; ++i)); do - entry=(${high_tune_man_pages[$i]}) - man_name=${entry[0]} - man_num=${entry[1]} - man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num" - output="man/man${entry[1]}/$man_name.$man_num.html" - convert_man_page High-Tune "$man_path" "$output" $1 - - if [ "$man_name" == "les2htcp" ]; then - # Add spaces missing after the man2html conversion - sed -i 's/liquid vapor/liquid water/g' $output - sed -i 's/<\/I><B>or<\/B><I>/<\/I> <B>or<\/B> <I>/g' $output - sed -i 's/<\/I><B>and<\/B><I>/<\/I> <B>and<\/B> <I>/g' $output - fi -done - diff --git a/high-tune/CLEMENT.jpg b/htrdr/CLEMENT.jpg diff --git a/high-tune/CLEMENT_lw_9000_10000.jpg b/htrdr/CLEMENT_lw_9000_10000.jpg diff --git a/high-tune/DZVAR.jpg b/htrdr/DZVAR.jpg diff --git a/high-tune/DZVAR2.jpg b/htrdr/DZVAR2.jpg diff --git a/high-tune/HRES_ARMCu.jpg b/htrdr/HRES_ARMCu.jpg diff --git a/high-tune/L12km_BOMEX.jpg b/htrdr/L12km_BOMEX.jpg diff --git a/high-tune/L25_Fire.jpg b/htrdr/L25_Fire.jpg diff --git a/htrdr/Makefile b/htrdr/Makefile @@ -0,0 +1,43 @@ +# Copyright (C) 2019-2021 |Meso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +HTRDR-VERSION=0.7.0 +HTRDR-STARTER-PACK-VERSION=0.6.0 + +SRC = htrdr.html.in htrdr-docs.html.in htrdr.sh +IMG = \ + city.jpg \ + CLEMENT.jpg \ + CLEMENT_lw_9000_10000.jpg \ + downward_flux_500x500x2048_lw_4000_100000_425.156.jpg \ + downward_flux_500x500x2048_sw_380_4000_879.349.jpg \ + DZVAR2.jpg \ + DZVAR.jpg \ + HRES_ARMCu.jpg \ + L12km_BOMEX.jpg \ + L25_Fire.jpg + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @bash htrdr.sh ${HTRDR-VERSION} ${HTRDR-STARTER-PACK-VERSION} + +publish: + rsync -avzr htrdr.html starter-pack.html ${IMG} downloads man ${REMOTE}/htrdr/ + +clean: + rm -rf htrdr.html htrdr-docs.html starter-pack.html downloads/*.sig man + diff --git a/high-tune/city.jpg b/htrdr/city.jpg diff --git a/high-tune/downloads/HRES_ARMCu.mp4 b/htrdr/downloads/HRES_ARMCu.mp4 diff --git a/high-tune/downloads/High-Tune-0.0.0-r3-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.0.0-r3-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.0.0-r3-Sources.tar.gz b/htrdr/downloads/High-Tune-0.0.0-r3-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.0.3-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.0.3-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.0.3-Sources.tar.gz b/htrdr/downloads/High-Tune-0.0.3-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.0.4-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.0.4-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.0.4-Sources.tar.gz b/htrdr/downloads/High-Tune-0.0.4-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.1.0-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.1.0-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.1.0-Sources.tar.gz b/htrdr/downloads/High-Tune-0.1.0-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.1.0-r1-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.1.0-r1-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.1.0-r1-Sources.tar.gz b/htrdr/downloads/High-Tune-0.1.0-r1-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.2.0-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.2.0-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.2.0-Sources.tar.gz b/htrdr/downloads/High-Tune-0.2.0-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.3.0-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.3.0-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.3.0-Sources.tar.gz b/htrdr/downloads/High-Tune-0.3.0-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.5.0-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.5.0-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.5.1-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.5.1-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.6.0-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.6.0-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.6.0-Sources.tar.gz b/htrdr/downloads/High-Tune-0.6.0-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-0.6.1-GNU-Linux64.tar.gz b/htrdr/downloads/High-Tune-0.6.1-GNU-Linux64.tar.gz diff --git a/high-tune/downloads/High-Tune-0.6.1-Sources.tar.gz b/htrdr/downloads/High-Tune-0.6.1-Sources.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.1.1.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.1.1.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.2.0.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.2.0.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.3.0.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.3.0.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.4.0.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.4.0.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.5.0.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.5.0.tar.gz diff --git a/high-tune/downloads/High-Tune-Starter-Pack-0.6.0.tar.gz b/htrdr/downloads/High-Tune-Starter-Pack-0.6.0.tar.gz diff --git a/high-tune/downloads/gas_opt_prop_en.pdf b/htrdr/downloads/gas_opt_prop_en.pdf diff --git a/htrdr/downloads/htrdr-0.7.0-GNU-Linux64.tar.gz b/htrdr/downloads/htrdr-0.7.0-GNU-Linux64.tar.gz @@ -0,0 +1 @@ +#$# git-wad 0dafaf516237455673324ad8bb05b1e723a89021932e3cb3776576ff87a16d80 21999622 +\ No newline at end of file diff --git a/htrdr/downloads/htrdr-0.7.0-Sources.tar.gz b/htrdr/downloads/htrdr-0.7.0-Sources.tar.gz @@ -0,0 +1 @@ +#$# git-wad 3a6668d18ebd8e43ed50d30049361c7da10f7a1dada6d9840e01bc3945121fe4 2840016 +\ No newline at end of file diff --git a/high-tune/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg b/htrdr/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg diff --git a/high-tune/downward_flux_500x500x2048_sw_380_4000_879.349.jpg b/htrdr/downward_flux_500x500x2048_sw_380_4000_879.349.jpg diff --git a/htrdr/htrdr-docs.html.in b/htrdr/htrdr-docs.html.in @@ -0,0 +1,50 @@ +<header> + <h1><code style="color: #000000">htrdr</code> + <span class=subtitle> + Reference documentation + </span> + </h1> +</header> + +<div class=row> + <div class=column> + <h3>Main commands</h3> + <ul> + <li><a href=man/man1/htrdr.1.html>htrdr</a></li> + <li><a href=man/man1/htrdr-atmosphere.1.html>htrdr-atmosphere</a></li> + <li><a href=man/man1/htrdr-combustion.1.html>htrdr-combustion</a></li> + </ul> + + <h3>Additionnal tools</h3> + <ul> + <li><a href=man/man1/htpp.1.html>htpp</a></li> + <li><a href=man/man1/les2htcp.1.html>les2htcp</a></li> + </ul> + + <h3>Common file formats</h3> + <ul> + <li><a href=man/man5/htrdr-image.5.html>htrdr-image</a></li> + <li><a href=man/man5/htrdr-materials.5.html>htrdr-materials</a></li> + <li><a href=man/man5/htrdr-obj.5.html>htrdr-obj</a></li> + <li><a href=man/man5/mrumtl.5.html>mrumtl</a></li> + </ul> + + </div> + + <div class=column> + <h3>Describe an atmosphere</h3> + <ul> + <li><a href=man/man5/htmie.5.html>htmie</a></li> + <li><a href=man/man5/htcp.5.html>htcp</a></li> + <li><a href="downloads/gas_opt_prop_en.pdf">htgop</a> [PDF]</li> + </ul> + + <h3>Describe a combustion medium</h3> + <ul> + <li><a href=man/man5/atrri.5.html>atrri</a></li> + <li><a href=man/man5/atrtp.5.html>atrtp</a></li> + <li><a href=man/man5/sth.5.html>sth</a></li> + </ul> + </div> +</div> + diff --git a/htrdr/htrdr.html.in b/htrdr/htrdr.html.in @@ -0,0 +1,334 @@ +<script> +// When the user clicks on <div>, open the popup +function poptext(Id) { + var popup = document.getElementById(Id); + popup.classList.toggle("show"); +} +</script> + + +<header> + <h1><code style="color: #000000">htrdr</code> + <span class=subtitle> + the Monte-Carlo radiative transfert simulator + </span> + </h1> +</header> + +<div class="news"> + <p><b><code>htrdr</code> ${VERSION} is available</b></p> + <ul> + <li>Build from sources: + <a href=https://gitlab.com/meso-star/star-engine/tree/htrdr-${VERSION}> + git</a> + </li> + </ul> +</div> + +<p><code>htrdr</code> evaluates the intensity at any position (probe) of the +scene, in any direction, in the presence of <b>surfaces</b> and an <b>absorbing +and diffusing semi-transparent medium</b>, for both <b>longwave</b> radiation +sources (external to the medium) than for <b>shortwave</b> radiation sources +(internal to the medium). The intensity is calculated using the +<b>Monte-Carlo</b> method: a number of optical paths are simulated backward, +from the probe position and into the medium. Various algorithms are used, +depending on the specificities of the nature and shape of the radiation +source.</p> + +<div class="news"> + <p><b>Related articles</b></p> + <ul> + <li> + <a href="https://doi.org/10.1016/j.jqsrt.2021.107725">Sans et al. + (2021)</a> + </li> + <li> + <a href="https://doi.org/10.1029/2018MS001602"> + Villefranque et al. (2019)</a> + </li> + </ul> +</div> + +<p>Applications are theoretically possible to any configuration. However, it +all eventually comes down to the possibility of using the physical data of +interest, in their most common formats, in each scientific community. +<code>htrdr</code> is currently suitable for two main application fields:</p> + +<ol> +<li> + <p><a href="man/man1/htrdr-atmosphere.1.html">Atmospheric radiative + transfer</a>: the clear-sky atmosphere is vertically stratified, cloud + thermodynamic data is provided on a regular 3D rectangular grid, and surface + optical properties can be provided for an arbitrary number of materials. + Internal radiation and solar radiation are taken into account.</p> +</li> +<li> + <p><a href="man/man1/htrdr-combustion.1.html">Combustion processes</a>: + thermodynamic data is provided at the nodes of an unstructured tetrahedral + mesh, while surface properties can still be provided for various materials. + The radiation source is only external: a monochromatic laser sheet + illuminates the inside of the combustion chamber for diagnostic purposes.</p> +</li> +</ol> + +<p>Since any observable radiative transfer is expressed as an integral of the +intensity, and since there is a strict equivalence between the integral to be +solved and the underlying Monte-Carlo algorithm (each integral results in the +sampling of a random variable), the algorithms that calculate the radiance are +used for computing various quantities:</p> + +<ul> +<li> +<p><b>Images</b> on a camera sensor, in a given field of view. For combustion + applications, only monochromatic images are supported. In atmospheres, both + visible and infrared images are possible: CIE colorimetry is used for visible + images, while an infrared image is in fact a temperature map of luminosity, + over the required spectral interval.</p> +</li> +<li> +<p><b>Flux density maps</b>, on a grid of sensors, integrated over an entire + hemisphere. In the case of combustion chambers, only monochromatic flux maps + can be calculated, while spectrally integrated flux density maps (both on the + visible part of the spectrum and on the infrared) are possible for + atmospheric applications.</p> +</li> +</ul> + +<div class="video"> + <video style="width:100%; text-align:center" controls poster=HRES_ARMCu.jpg> + <source src="downloads/HRES_ARMCu.mp4" type="video/mp4"> + Your browser does not support the video tag. + </video> + <div class="caption"> + Rendering of a 4D cloud field produced by the Meso-NH (<a + href="https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html">Lafore et + al 1998</a>, <a href="https://www.geosci-model-dev.net/11/1929/2018/">Lac et + al 2018</a>) Large Eddy model. Each frame was rendered with <a + href="man/man1/htrdr-atmosphere.1.html">htrdr-atmosphere</a> using 4096 + samples per pixel component. The resulting images are then postprocessed with + the <a href="man/man1/htpp.1.html">htpp</a> program. Refer to the video for a + complete description of how it was produced. + </div> +</div> + +<h2 id="rel_projects">Related projects</h2> + +<div class="img" style="width: 20em"> + <a href="CLEMENT.jpg"> + <img src="CLEMENT.jpg" alt="CLEMENT"> + </a> + <div class="caption"> + Image rendered with <a + href="man/man1/htrdr-atmosphere.1.html">htrdr-atmosphere</a> of a + 1000<sup>3</sup> cloud field produced by the Meso-NH (<a + href="https://www.ann-geophys.net/16/90/1998/angeo-16-90-1998.html">Lafore et + al 1998</a>, <a href="https://www.geosci-model-dev.net/11/1929/2018/">Lac et + al 2018</a>) Large Eddy Model. The initial conditions and model set-up for + the simulation are described in <a + href="https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3614">Strauss + et al. (2019)</a>. + </div> +</div> + +<p><code>htrdr</code> is currently used, developped and extended in the +following research projects.</p> + +<ul> + <li>In project <a + href="https://www.umr-cnrm.fr/spip.php?article1204&lang=en">ModRadUrb</a> the + emphasis is put on taking into account the representation of <b>complex + geometries</b> (detailled city scenes) using <b>spectral properties of a + arbitrary number of materials</b>. The solver was extended to solve upward + and downward <b>atmospheric fluxes</b> at any level in the scene, both in the + visible and the infrared spectral ranges.</li> + + <li>In project <a href="https://mcg-rad.ipsl.fr/en/">MCG-Rad</A> the + <code>htrdr</code> codebase is used to explore a whole new class of radiative + transfer algorithms: instead of relying on the full atmospheric radiative + properties data set (prerequisite for current algorithms), the so-called + <b>line sampling</b> algorithms will not require nor compute the absorption + coefficient of the atmosphere. Instead, it will sample energetic transitions + and use a Line-by-Line parameters database (such as <a + href="https://hitran.org/">HITRAN</a>) in order to perform a <b>rigorous + spectral integration</b>, both in the visible and the infrared spectral + ranges.</li> + + <li>In project <a href=https://anr.fr/Project-ANR-18-CE05-0015>Astoria</a>, + <code>htrdr</code> is used to produce images in the visible, in the presence + of <b>combustion chambers</b> where radiation scattering is performed by soot + aggregates. One of the main difficulty resides in the fact that the chamber is + <b>illuminated by a laser</b>: the classical solar radiative transfer + algorithm then fails to converge because of the collimated radiation source, + and a <a href="https://doi.org/10.1016/j.jqsrt.2021.107725">new algorithm</a> + was thus designed in order to ensure numerical convergence.</li> +</ul> + +<h2>A straight interface</h2> + +<div class="img" style="width: 20em"> + <a href="CLEMENT_lw_9000_10000.jpg"> + <img src="CLEMENT_lw_9000_10000.jpg" alt="CLEMENT_lw"> + </a> + <div class="caption"> + Infrared rendering in [9, 10] micrometers of the 500<sup>3</sup> cloud + field of <a + href="https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3614">Strauss + et al. (2019)</a>. The color map displays the brightness temperature in + Kelvin. </div> +</div> + +<p><code>htrdr</code> is a <b>command-line tool</b> that performs computations +on input data, writes the rendered image and nothing more. No assumption is +made on how input data are created excepted that they have to follow the +expected file formats. In the same spirit, the output image is written in plain +text, as a list of raw pixel estimations, making easier the processing of its +data. + +<p>This thin interface is, by nature, particularly well suited to be +<b>extended</b> and <b>integrated</b> into a any workflow. For instance, one +can save the cloud properties used by <a +href="man/man1/htrdr-atmosphere.1.html">htrdr-atmosphere</a> directly in the + +<a href=man/man5/htcp.5.html>htcp</a> file format or use the <a +href=man/man1/les2htcp.1.html>les2htcp</a> tool to convert cloud properties +from <a href="https://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> to +<code>htcp</code>. In the same way, the output image can be post-treated +through <a href="http://www.gnuplot.info">gnuplot</a> or converted in a regular +PPM image by the <a href="man/man1/htpp.1.html">htpp</a> program, and then +visualised in an image viewer as for instance <a +href="https://feh.finalrewind.org/">feh</a> or <a +href="https://imagemagick.org/script/display.php">display</a>. + +<h2>Quick start</h2> + +<div class="img" style="width: 20em"> + <div style="width: 49.5%; float: left; padding-right: 1%" > + <a href="downward_flux_500x500x2048_sw_380_4000_879.349.jpg"> + <img src="downward_flux_500x500x2048_sw_380_4000_879.349.jpg" alt="downward_flux_sw"> + </a> + </div> + <div style="width: 49.5%; float: left; padding-right: 0%"> + <a href="downward_flux_500x500x2048_lw_4000_100000_425.156.jpg"> + <img src="downward_flux_500x500x2048_lw_4000_100000_425.156.jpg" alt="downward_flux_lw"> + </a> + </div> + <div class="caption"> + Shortwave (left) and longwave (right) downward flux density maps in + W/m<sup>2</sup> computed by <a + href="man/man1/htrdr-atmosphere.1.html">htrdr-atmosphere</a> at 1 meter + height with the <a href=starter-pack.html>DZVAR</a> cloud field. The + shortwave and longwave spectral integration ranges are [0.38, 4] micrometers + and [4, 100] micrometers, respectively. Their spatially-avaraged flux is + 879.349 W/m<sup>2</sup> in shortwave and 425.159 W/m<sup>2</sup> in + longwave. In both cases, the spatial position is the sub-solar point, meaning + that the sun is located at the zenith. In the shortwave map we observe the + contrast between the shadows of the clouds and fully illuminated areas. In + longwave, we can see the effect of clouds (higher values, due to the emission + by the base of the cloud at higher temperatures than for a clear-sky zone) + and also a "ripple" effect that is due to the spatial variations of water + vapor concentration, as provided by the LES simulation. + </div> +</div> + +<p>No pre-compiled version of <code>htrdr</code> is provided; it must be +compiled directly from its source tree. A simple way is to rely on the +<code>htrdr</code> branch of the <a +href="https://gitlab.com/meso-star/star-engine/tree/htrdr">Star-Engine</a> +project: it provides CMake scripts that automate the download, the compilation +and the installation of <code>htrdr</code> and its dependencies. This build +procedure assumes the following prerequisites: + +<ul> + <li><a href="https://cmake.org">CMake</a> in version 3.5 or higher.</li> + <li><a href=https://git-scm.com>git</a> source control.</li> + <li><a href=https://gcc.gnu.org>GNU Compiler Collection</a> in version 4.8 or + higher.</li> + <li><a href=https://www.unidata.ucar.edu/software/netcdf/>NetCDF</a> library + and headers in version 4 or higher.</li> + <li><a href=https://www.open-mpi.org/>OpenMPI</a> library and headers in + version 2 or higher.</li> + <li>Optionally, the <a href=https://asciidoc.org/>AsciiDoc</a> + tool suite to generate the man pages of the reference documentation.</li> +</ul> + +<h3>Build</h3> + +<p>Assuming that the aforementioned prerequisites are available, the build +procedure is summed up to: + +<pre class="code"> +~ $ git clone -b htrdr-${VERSION} \ + https://gitlab.com/meso-star/star-engine.git \ + htrdr-${VERSION} +~ $ mkdir htrdr-${VERSION}/build +~ $ cd htrdr-${VERSION}/build +~/htrdr-${VERSION}/build $ cmake ../cmake +~/htrdr-${VERSION}/build $ make +</pre> + +<h4>Tune the build</h4> + +<p>By default, the whole <code>htrdr</code> project is built but you may prefer +to deploy <code>htrdr</code> only for a specific application, i.e. only for +atmospheric radiative transfer or combustion processes. In this case, only +activate the desired application during the CMake configuration step. For +example, to install only the atmospheric part of <code>htrdr</code>:</p> + +<pre class="code"> +~ $ git clone -b htrdr-${VERSION} \ + https://gitlab.com/meso-star/star-engine.git htrdr-${VERSION} +~ $ mkdir htrdr-${VERSION}/build +~ $ cd htrdr-${VERSION}/build +~/htrdr-${VERSION}/build $ cmake ../cmake \ + -DHTRDR_BUILD_ATMOSPHERE=On \ + -DHTRDR_BUILD_COMBUSTION=Off +~/htrdr-${VERSION}/build $ make +</pre> + +<p>Visit the Star-Engine <a +href="https://gitlab.com/meso-star/star-engine/-/tree/htrdr"> git +repository</a> of <code>htrdr</code> for a complete description of the build +process and available options.</p> + +<h3>Run</h3> + +<p>By default <code>htrdr</code> is installed in the <code>local</code> +subdirectory of <code>htrdr-${VERSION}</code>. Source the provided +<code>htrdr.profile</code> file to register <code>htrdr</code> against the +current shell.</p> + +<pre class="code"> +~ $ source ~/htrdr-${VERSION}/local/etc/htrdr.profile +~ $ htrdr -h +</pre> + +<p>If the AsciiDoc tool suite was installed on <code>make</code> +invocation, the <b>reference documentation</b> of the <code>htrdr</code> +program and its associated file formats should be available through man pages. +Use the <code>man</code> command-line to consult them. For example:</p> + +<pre class="code"> +~ $ man htrdr +~ $ man htrdr-atmosphere +~ $ man htrdr-combustion +</pre> + +<p>Refer to the <a href=starter-pack.html>Starter Packs</a> to quickly run a +<code>htrdr</code> rendering; these archives provide input data and scripts +that are good starting points to use <code>htrdr</code>. + +<h3>Package</h3> + +<p>Once built, the <code>htrdr</code> installation can be packaged in an +archive that can then be deployed on compatible systems, <i>i.e.</i> systems +whose C library, NetCDF library and MPI implementation are compatibles with the +ones available on the system used to build <code>htrdr</code>. + +<pre class="code"> +~/htrdr-${VERSION}/build $ make pkg +~/htrdr-${VERSION}/build $ ls package/htrdr-${VERSION}* # list packages +</pre> + +${RELEASE_NOTES} + +${COPYING} diff --git a/htrdr/htrdr.sh b/htrdr/htrdr.sh @@ -0,0 +1,257 @@ +#!/bin/bash + +# Copyright (C) 2017-2021 |Meso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +source ../meso-menu.sh + +if [ $# -lt 2 ]; then + echo "Usage: $0 VERSION VERSION_PACK" + exit 1 +fi + +if [ ! -f "./downloads/htrdr-$1-GNU-Linux64.tar.gz" ]; then + echo "Cannot find ./downloads/htrdr-$1-GNU-Linux64.tar.gz" + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory + +################################################################################ +# Sign the package +################################################################################ +tput bold; echo ">>> htrdr packages"; tput sgr0 +archs=$(find "./downloads" -regex "^.*/High-Tune-.*[0-9]+\.[0-9]+\.[0-9]+.*tar.gz") + +sign_something=0 +for arch in $archs; do + if [ ! -f $arch.sig ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch + sign_something=1 + fi +done + +if [ $sign_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Extract the current archive +################################################################################ +cd $dir_temp +arch=htrdr-$1-GNU-Linux64 +cp "$dir_curr/downloads/$arch.tar.gz" . +tar xzf $arch.tar.gz +#htspk=High-Tune-Starter-Pack-$2 +#tar xzf $dir_curr/downloads/$htspk.tar.gz $htspk/README.md +cd $dir_curr + +################################################################################ +# Generate the release note +################################################################################ +cd $dir_temp +release_notes=$($markdown $arch/share/doc/htrdr/README.md \ + | sed '/^<h2>Release notes<\/h2>/,$!d' \ + | sed '/^<h2>Copyright notice<\/h2>/,$d' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-materials\.5\.txt/man\/man5\/htrdr-materials.5.html/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-obj\.5\.txt/man\/man5\/htrdr-obj.5.html/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/mrumtl\/-\/blob\/master\/doc\/mrumtl\.5\.txt/man\/man5\/mrumtl.5.html/g' \ + | sed 's/^<h2>Release notes/<h2 id=release_notes>Release notes/' \ + | sed 's/scracth/scratch/') # Misspelling +cd $dir_curr + +################################################################################ +# Generate the release note +################################################################################ +cd $dir_temp +copying=$($markdown $arch/share/doc/htrdr/README.md \ + | sed '/^<h2>Copyright notice<\/h2>/,$!d') +cd $dir_curr + +################################################################################ +# Generate the overview page +################################################################################ +tput bold; echo ">>> htrdr web pages"; tput sgr0 +echo "Write htrdr.html" +{ + print_header htrdr Overview + VERSION=$1 \ + RELEASE_NOTES="$release_notes" \ + COPYING=$copying \ + envsubst < htrdr.html.in; + print_footer +} > htrdr.html + +################################################################################ +# Generate the reference documentation page +################################################################################ +echo "Write htrdr-docs.html" +{ + print_header htrdr Documentations + cat htrdr-docs.html.in; + print_footer +} > htrdr-docs.html + + +################################################################################ +# Generate the starter pack +################################################################################ +echo "Write starter-pack.html" + +$markdown $dir_temp/$htspk/README.md \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htgop.git/downloads\/gas_opt_prop_en.pdf/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htcp.git/man\/man5\/htcp.5.html/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htmie.git/man\/man5\/htmie.5.html/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htpp.git/man\/man1\/htpp.1.html/g' \ + | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr.git/man\/man1\/htrdr.1.html/g' \ + > $dir_temp/$htspk/README.html + +intro=$(cat $dir_temp/$htspk/README.html \ + | sed 1d \ + | sed '/^<h2>Content<\/h2>/,$d') + +content=$(cat $dir_temp/$htspk/README.html \ + | sed '/^<h2>Content<\/h2>/,$!d' \ + | sed 1d \ + | sed '/^<h2>Quick start<\/h2>/,$d') + +release_notes=$(cat $dir_temp/$htspk/README.html \ + | sed '/^<h2>Release notes<\/h2>/,$!d' \ + | sed 1d \ + | sed 's/ gemetry / geometry /' \ + | sed '/^<h2>Copyright notice<\/h2>/,$d') + +copying=$(cat $dir_temp/$htspk/README.html \ + | sed '/^<h2>Copyright notice<\/h2>/,$!d' \ + | sed 's/from/from the/' \ + | sed 's/opyright (C)/opyright \©/g') + +{ + print_header htrdr Starter-Pack + + echo "<header>" + echo " <h1>High-Tune: Starter Pack</h1>" + echo "</header>" + echo "<div class="news">" + echo " <p><b>High-Tune: Starter Pack $2</b></p>" + echo " <ul>" + echo " <li><a href=\"downloads/High-Tune-Starter-Pack-$2.tar.gz\">tarball</a> /" + echo " <a href=\"downloads/High-Tune-Starter-Pack-$2.tar.gz.sig\">pgp</a></li>" + echo " </ul>" + echo "</div>" + + echo $intro + + echo "<h2>Content</h2>" + echo "<div class=\"img\" style=\"padding-top:3em; width: 17em\">" + echo " <a href=\"DZVAR.jpg\"><img src=\"DZVAR.jpg\" alt=\"DZVAR\"></a>" + echo " <a href=\"DZVAR2.jpg\"><img src=\"DZVAR2.jpg\" alt=\"DZVAR2\"></a>" + echo " <a href=\"L12km_BOMEX.jpg\"><img src=\"L12km_BOMEX.jpg\" alt=\"L12_BOMEX\"></a>" + echo " <a href=\"L25_Fire.jpg\"><img src=\"L25_Fire.jpg\" alt=\"L25_Fire\"></a>" + echo " <a href=\"city.jpg\"><img src=\"city.jpg\" alt=\"city\"></a>" + echo " <div class=\"caption\">" + echo " Images of the DZVAR, DZVAR2, L12km_BOMEX, L25_Fire and city scenes" + echo " rendered with <code>htrdr</code>." + echo " </div>" + echo "</div>" + + echo $content + + echo "<h2>Install and run</h2>" + echo "" + echo "<p>Download the High-Tune: Starter-Pack archive and verify its integrity" + echo "against its <a href=\"../misc/pgp_signatures.html\">PGP signature</a>. Then" + echo "extract it. Assuming that <code>htrdr</code> is installed and registered in the" + echo "current shell, one can invoke a <code>htrdr</code> rendering as bellow:" + echo "" + echo "<pre class=\"code\">" + echo "$ cd ~/High-Tune-Starter-Pack-$2" + echo "~/High-Tune-Starter-Pack-$2 $ bash ht-run.sh scenes/DZVAR2" + echo "</pre>" + echo "" + echo "<p>With <code>~/High-Tune-Starter-Pack-$2</code> the directory" + echo "where the Starter Pack is installed. The resulting image" + echo "<code>DZVAR2_1280x720x256.txt</code> is stored in the <a" + echo "href=\"man/man5/htrdr-image.5.html\">htrdr-image</a> file format. Use the <a" + echo "href=\"man/man1/htpp.1.html\">htpp</a> program to convert it in a regular PPM" + echo "file that can be then displayed with a regular image viewer." + echo "" + echo "<pre class=\"code\">" + echo "~/High-Tune-Starter-Pack-$2 $ htpp -o DZVAR2.ppm DZVAR2_1280x720x256.txt" + echo "</pre>" + + echo "<h2>Donwloads</h2>" + + archs=$(find downloads -regex ".*/High-Tune-Starter-Pack.*\.tar.gz" | sort -r ) + echo "<table>" + echo " <tr>" + echo " <th>Version</th>" + echo " <th>Archive</th>" + echo " </tr>" + for i in $archs; do + version=$(echo $i | sed "s/.*High-Tune-Starter-Pack-\(.*\)\.tar.gz/\1/g") + echo " <tr>" + echo " <td>${version}</td>" + echo " <td>" + echo " [<a href='${i}'>tarball</a>]" + if [ -f $i.sig ]; then + echo " [<a href='$i.sig'>pgp</a>]" + fi + echo " </td>" + echo " </tr>" + done + echo "</table>" + + echo $release_notes + echo $copying + + print_footer + +} > starter-pack.html + +################################################################################ +# Generate the reference documentation +################################################################################ +cd $dir_temp +cp "$dir_curr/downloads/$arch.tar.gz" . +tar xzf $arch.tar.gz +cd $dir_curr + +for((i=0; i<${#htrdr_man_pages[@]}; ++i)); do + entry=(${htrdr_man_pages[$i]}) + man_name=${entry[0]} + man_num=${entry[1]} + man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num" + output="man/man${entry[1]}/$man_name.$man_num.html" + + if [ $man_name == "htgop" ]; then + continue + fi + convert_man_page htrdr "$man_path" "$output" $1 + + if [ "$man_name" == "les2htcp" ]; then + # Add spaces missing after the man2html conversion + sed -i 's/liquid vapor/liquid water/g' $output + sed -i 's/<\/I><B>or<\/B><I>/<\/I> <B>or<\/B> <I>/g' $output + sed -i 's/<\/I><B>and<\/B><I>/<\/I> <B>and<\/B> <I>/g' $output + fi +done + diff --git a/meso-menu.sh b/meso-menu.sh @@ -30,16 +30,22 @@ schiff_man_pages=( "schiff-output 5" ) -high_tune_man_pages=( +htrdr_man_pages=( + "atrri 5" + "atrtp 5" + "htmie 5" + "htcp 5" + "htgop 5" + "htpp 1" "htrdr 1" + "htrdr-atmosphere 1" + "htrdr-combustion 1" "htrdr-image 5" "htrdr-materials 5" "htrdr-obj 5" - "htpp 1" - "htmie 5" - "htcp 5" "les2htcp 1" "mrumtl 5" + "sth 5" ) stardis_man_pages=( @@ -125,7 +131,7 @@ print_art_sub_menu() { } -print_high_tune_sub_menu() { +print_htrdr_sub_menu() { local root=$1 local name=$2 @@ -134,35 +140,30 @@ print_high_tune_sub_menu() { if [ "$name" == "Overview" ]; then echo ' <li id=cur>Overview</li>' else - echo " <li><a href=${root}high-tune/high-tune.html>Overview</a></li>" + echo " <li><a href=${root}htrdr/htrdr.html>Overview</a></li>" + fi + if [ "$name" == "Documentations" ]; then + echo ' <li id=cur>Reference documentation</li>' + else + echo " <li><a href=${root}htrdr/htrdr-docs.html>Reference documentation</a></li>" fi - echo ' <li>Reference documentation</li>' - echo ' <li><ul class=lvl2>' - local i - for((i=0; i < ${#high_tune_man_pages[@]}; ++i)); do - local entry=(${high_tune_man_pages[$i]}) - if [ "$name" == "${entry[0]}" ]; then - echo " <li id=cur>$name</li>" - else - local link_path="${root}high-tune/man/man${entry[1]}/${entry[0]}.${entry[1]}.html" - echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" - fi - done - echo " <li><a href="${root}high-tune/downloads/gas_opt_prop_en.pdf">htgop</a> <b>[PDF]</b></li>" echo ' </ul></li>' if [ "$name" == "Starter-Pack" ]; then echo " <li id=cur>Starter Pack</li>" else - echo " <li><a href=${root}high-tune/starter-pack.html>Starter Pack</a></li>" + echo " <li><a href=${root}htrdr/starter-pack.html>Starter Pack</a></li>" fi echo " <li><a href=https://gitlab.com/meso-star/htrdr>Git repository</a></li>" echo ' </ul>' echo ' <div id="info">' + echo ' <p> htrdr was funded bu the <a' + echo ' href=https://anr.fr/Project-ANR-18-CE05-0015>ANR Astoria</a> from 2018 to' + echo ' 2022. |Méso|Star> was sub-contractor of the project.</p>' echo ' <p>htrdr was funded by the <a href=https://www.ademe.fr/>ADEME</a>' echo ' (MODEVAL-URBA-2019) from 2019 to 2022. |Méso|Star> was partner of the' echo ' project with <a href="https://www.umr-cnrm.fr/">CNRM</a>.</p>' echo ' <p>htrdr was funded by the <a' - echo ' href=https://anr.fr/Project-ANR-16-CE01-0010> ANR High-Tune</a> from' + echo ' href=https://anr.fr/Project-ANR-16-CE01-0010>ANR High-Tune</a> from' echo ' 2016 to 2019. |Méso|Star> was sub-contractor of the project. Visit' echo ' the <a href="http://www.umr-cnrm.fr/high-tune/?lang=en"> High-Tune' echo ' project web site</a>.</p>' @@ -376,11 +377,11 @@ print_header() { else echo " <h2><a href=${root}art/art.html>A.R.T.</a></h2>" fi - if [ "$section" == "High-Tune" ]; then - echo " <h2>High-Tune: RenDeRer</h2>" - print_high_tune_sub_menu ${root} ${name} + if [ "$section" == "htrdr" ]; then + echo " <h2 style='font-variant: none'><code style='color: black'>htrdr</code></h2>" + print_htrdr_sub_menu ${root} ${name} else - echo " <h2><a href=${root}high-tune/high-tune.html>High-Tune: RenDeRer</a></h2>" + echo " <h2 style='font-variant: none'><code><a href=${root}htrdr/htrdr.html>htrdr</a></code></h2>" fi if [ "$section" == "Schiff" ]; then echo ' <h2>Schiff</h2>' @@ -510,7 +511,9 @@ convert_man_page() { { print_header ${section} man-${man_name} echo -n "<div style=\"font-variant: small-caps; float: right; color: #777777\">" - echo "Version $version</div>"; + [ $section == "htrdr" ] \ + && echo "<code style='font-variant:none'>$section</code> $version</div>" \ + || echo "$section $version</div>"; echo "<header>" echo " <h1>${man_name}(${man_num})</h1>"; echo "</header>" @@ -525,12 +528,13 @@ convert_man_page() { print_footer >> $output - # Remove hyperlink on csplit, feh, gnuplot, sed and mpirun commands + # Remove hyperlink on csplit, feh, gnuplot, sed, mmap and mpirun commands sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' $output sed -i 's/<B><A HREF="\.\.\/man1\/gnuplot\.1\.html">gnuplot<\/A><\/B>/gnuplot/g' $output sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' $output sed -i 's/<B><A HREF="\.\.\/man1\/mpirun\.1\.html">mpirun<\/A><\/B>/mpirun/g' $output + sed -i 's/<B><A HREF="\.\.\/man2\/mmap\.2\.html">mmap<\/A><\/B>/mmap/g' $output # Fix the hyperlink toward the GPLv3+ license sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' $output diff --git a/meso.css b/meso.css @@ -73,6 +73,21 @@ hr { } /******************************************************************************* + * Two columns layout + ******************************************************************************/ +.column { + float: left; + width: 50%; +} + +/* Clear floats after the columns */ +.row:after { + content: ""; + display: table; + clear: both; +} + +/******************************************************************************* * Navigation bar ******************************************************************************/ #navcontainer {