meso-web

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

commit 963cf52e8e45db4a938a1273311e5e90afca50ea
parent 052cad4c3682644b734633e8bc65d5b970bc59fb
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 25 Feb 2020 13:58:24 +0100

Gen the High-Tune: Starter pack page from its README file

Diffstat:
Mhigh-tune/Makefile | 2+-
Mhigh-tune/high-tune.sh | 114++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
Dhigh-tune/starter-pack.html.in | 150-------------------------------------------------------------------------------
3 files changed, 112 insertions(+), 154 deletions(-)

diff --git a/high-tune/Makefile b/high-tune/Makefile @@ -16,7 +16,7 @@ HTRDR-VERSION=0.3.0 HTRDR-STARTER-PACK-VERSION=0.2.0 -SRC = high-tune.html.in high-tune.sh starter-pack.html.in +SRC = high-tune.html.in high-tune.sh IMG = CLEMENT.jpg DZVAR.jpg DZVAR2.jpg L12km_BOMEX.jpg L25_Fire.jpg HRES_ARMCu.jpg .PHONY: all clean default publish diff --git a/high-tune/high-tune.sh b/high-tune/high-tune.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (C) 2017-2019 |Meso|Star> +# Copyright (C) 2017-2020 |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 @@ -71,6 +71,8 @@ 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 ################################################################################ @@ -79,7 +81,8 @@ cd $dir_curr cd $dir_temp release_notes=$($markdown $arch/share/doc/htrdr/README.md \ | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed '/^<h2>License<\/h2>/,$d') + | sed '/^<h2>License<\/h2>/,$d' \ + | sed 's/scracth/scratch/') # Misspelling cd $dir_curr ################################################################################ @@ -97,10 +100,115 @@ echo "Write 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 '/^<h2>License<\/h2>/,$d') + { print_header High-Tune Starter-Pack - VERSION_PACK=$2 envsubst < starter-pack.html.in; + + 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: 18em\">" + 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 " <div class=\"caption\">" + echo " Images of the DZVAR, DZVAR2, L12km_BOMEX and L25_Fire scenes rendered with" + echo " <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 "<h2>License</h2>" + echo "" + echo "<p>High-Tune: Starter Pack is released under the GPLv3+ license: GNU GPL" + echo "version 3 or later. You can freely study, modify or extend it. You are also" + echo "welcome to redistribute it under certain conditions; refer to the <a" + echo "href=\"https://www.gnu.org/licenses/gpl.html\">license</a> for details." + print_footer + } > starter-pack.html ################################################################################ diff --git a/high-tune/starter-pack.html.in b/high-tune/starter-pack.html.in @@ -1,150 +0,0 @@ -<header> - <h1>High-Tune: Starter Pack</h1> -</header> - -<div class="news"> - <p><b>High-Tune: Starter Pack ${VERSION_PACK}</b></p> - <ul> - <li><a href="downloads/High-Tune-Starter-Pack-${VERSION_PACK}.tar.gz">tarball</a> / - <a href="downloads/High-Tune-Starter-Pack-${VERSION_PACK}.tar.gz.sig">pgp</a></li> - </ul> -</div> - -<p>The High-Tune: Starter Pack contains <b>input data</b> necessary to perform -renderings with <code>htrdr</code>. It also provides <b>bash scripts</b> that -make easier the invocation of the <code>htrdr</code> program and the -description of the scene to render. - -<h2>Content</h2> - -<h3>Atmospheric profile</h3> - -<div class="img" style="width: 18em"> - <a href="DZVAR.jpg"><img src="DZVAR.jpg" alt="DZVAR"></a> - <a href="DZVAR2.jpg"><img src="DZVAR2.jpg" alt="DZVAR2"></a> - <a href="L12km_BOMEX.jpg"><img src="L12km_BOMEX.jpg" alt="L12_BOMEX"></a> - <a href="L25_Fire.jpg"><img src="L25_Fire.jpg" alt="L25_Fire"></a> - <div class="caption"> - Images of the DZVAR, DZVAR2, L12km_BOMEX and L25_Fire scenes rendered with - <code>htrdr</code>. - </div> -</div> - -<p>The <code>ecrad_opt_prop.txt</code> file defines the gas optical properties -provided for the pressure and temperature atmospheric vertical profile. These -data were generated with the <a -href="https://www.ecmwf.int/en/elibrary/16901-ecrad-new-radiation-scheme-ifs">ECRAD</a> -software and are saved according to the <a -href=downloads/gas_opt_prop_en.pdf>High-Tune: Gas Optical Properties</a> file -format. - -<h3>Clouds</h3> - -<p>The files contained in the <code>clouds</code> subdirectory contains <a -href=man/man5/htcp.5.html>htcp</a> files defining the liquid water content in -suspension within clouds. These fields are generated from idealized Large Eddy -Simulations computed by the French non hydrostatic research model, MesoNH -(<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>), with flat surfaces and prescribed large-scale forcings. Available -files are: - -<ul> - <li><code>DZVAR.1.ARMCU.008.diaKCL.htcp</code>: a continental cumulus case - initialized from a composite of observed thermodynamic profiles measured on - the ARM SGP site, following <a - href="https://rmets.onlinelibrary.wiley.com/doi/10.1256/003590002320373210">Brown - et al. (2002)</a>. The provided field corresponds to the 8th hour of - simulation (13h30 local time), in the middle of the diurnal cycle. The - boundary layer is well-developed with cloud base height around 1km and cloud - top around 2km, and a total cloud cover of around 25% of the 6.4km x 6.4km - domain (horizontal resolution is 25m)</li> - - <li><code>L12km.1.BOMEX.005.htcp</code>: an oceanic, trade wind cumulus case - initialized from observed thermodynamic profiles acquired during the BOMEX - campaign in the Barbados. The model set-up is as in <a - href="https://journals.ametsoc.org/doi/10.1175/1520-0469%282003%2960%3C1201%3AALESIS%3E2.0.CO%3B2">Siebesma - et al. (2003)</a> but with a 12.8km x 12.8km domain and resolution 25m. The - cloud layer is between 500m and 1.5km heights and covers around 14% of the - domain. </li> - - <li><code>L25.1.FIRE.012.htcp</code>: a marine stratocumulus case initialized - from observed thermodynamic profiles acquired during the FIRE campaign off - the coast of southern California. The model set-up is as in <a - href="https://rmets.onlinelibrary.wiley.com/doi/abs/10.1256/qj.03.139">Duynkerke - et al. (2004) </a>with a 25km x 25km domain, 100m horizontal and 10m - vertical resolutions. The field corresponds to the 12th hour of simulation - (12h local time) typical of a decoupled boundary layer, with the overcast - stratocumulus layer between 300 and 600m.</li> -</ul> - -<h3>Water droplets properties</h3> - -<p>The <code>Mie_LUT_Cloud.nc</code> stores the spectro-angular tabulation of -water droplets optical properties computed using the <a -href="https://pubs.giss.nasa.gov/abs/mi06300n.html">Mishchenko et al. -(2002)</a> implementation of the Lorenz-Mie solution for light scattering by -homogeneous spherical particles. The monodisperse solution was integrated over -a log-normal droplet size distribution of mean 10 micrometers and standard -deviation 1 micrometer. This NetCDF file is formatted according to the <a -href="man/man5/htmie.5.html">High-Tune: Mie</a> file format. - -<h3>Ground geometries</h3> - -<p>The <code>models</code> subdirectory contains ground geometries saved in the -<a href="http://www.martinreddy.net/gfx/3d/OBJ.spec">OBJ</a> file format. -Available geometries are: - -<ul> - <li><code>models/plane.obj</code>: quad centered in 0 whose size along the X - and Y dimension is 10 meters.</li> - <li><code>models/mountain.obj</code>: geometry representing mountains. The OBJ - lower bound is 0 while its upper bound is [10000, 10000, 700] which means - that its size along the X and Y axis is 10 kilometers while the highest - mountain peaks at 700 meters. Note that the geometry is carefully designed to - be <b>cyclic</b>: it can be repeated along the X and Y axis without visual - glitches.</li> -</ul> - -<h3>Scene description</h3> - -<p>The <code>scenes</code> subdirectory stores bash scripts describing scenes -from the aforementioned data (atmosphere, clouds, <i>etc.</i>) and how to -render them (image definition, point of view, <i>etc.</i>). These files are -actually input files for the <code>ht-run.sh</code> script. - -<h3>Run script</h3> - -<p>The <code>ht-run.sh</code> bash script builds and runs a <code>htrdr</code> -command line from a scene file submitted as input. - -<h2>Install and run</h2> - -<p>Download the High-Tune: Starter-Pack archive and verify its integrity -against its <a href="../misc/pgp_signatures.html">PGP signature</a>. Then -extract it. Assuming that <code>htrdr</code> is installed and registered in the -current shell, one can invoke a <code>htrdr</code> rendering as bellow: - -<pre class="code"> -$ cd ~/High-Tune-Starter-Pack-${VERSION_PACK} -~/High-Tune-Starter-Pack-${VERSION_PACK} $ bash ht-run.sh scenes/DZVAR2 -</pre> - -<p>With <code>~/High-Tune-Starter-Pack-${VERSION_PACK}</code> the directory -where the Starter Pack is installed. The resulting image -<code>DZVAR2_1280x720x128.txt</code> is stored in the <a -href="man/man5/htrdr-image.5.html">htrdr-image</a> file format. Use the <a -href="man/man1/htpp.1.html">htpp</a> program to convert it in a regular PPM -file that can be then displayed with a regular image viewer. - -<pre class="code"> -~/High-Tune-Starter-Pack-${VERSION_PACK} $ htpp -o DZVAR2.ppm DZVAR2_1280x720x128.txt -</pre> - -<h2>License</h2> - -<p>High-Tune: Starter Pack is 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. -