sln-build.1 (7126B)
1 .\" Copyright (C) 2022, 2026 |Méso|Star> (contact@meso-star.com) 2 .\" Copyright (C) 2026 Université de Lorraine 3 .\" Copyright (C) 2022 Centre National de la Recherche Scientifique 4 .\" Copyright (C) 2022 Université Paul Sabatier 5 .\" 6 .\" This file is part of Star-Line. 7 .\" 8 .\" This program is free software: you can redistribute it and/or modify 9 .\" it under the terms of the GNU General Public License as published by 10 .\" the Free Software Foundation, either version 3 of the License, or 11 .\" (at your option) any later version. 12 .\" 13 .\" This program is distributed in the hope that it will be useful, 14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 .\" GNU General Public License for more details. 17 .\" 18 .\" You should have received a copy of the GNU General Public License 19 .\" along with this program. If not, see <http://www.gnu.org/licenses/>. 20 .Dd August 17, 2026 21 .Dt SLN-BUILD 1 22 .Os 23 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 24 .Sh NAME 25 .Nm sln-build 26 .Nd build an acceleration structure for line importance sampling 27 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 28 .Sh SYNOPSIS 29 .Nm 30 .Op Fl chsv 31 .Op Fl a Ar arity 32 .Op Fl e Ar polyline_opt Ns Op : Ns Ar polyline_opt No ... 33 .Op Fl L Ar leaf_nlines 34 .Op Fl l Ar line_profile 35 .Op Fl o Ar accel_struct 36 .Op Fl t Ar thread_count 37 .Fl m Ar molparams 38 .Fl P Ar pressure 39 .Fl T Ar temperature 40 .Fl x Ar mixture 41 .Op Ar lines 42 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 43 .Sh DESCRIPTION 44 .Nm 45 constructs a data structure designed to accelerate the sampling by 46 importance of the spectral lines defined for a gas mixture under given 47 thermodynamic conditions, from a spectroscopic parameters database. 48 The generated structure is a binary tree that stores a polyline of 49 spectral data at each node that it encompasses. 50 .Pp 51 The input spectroscopic data, i.e., the line list and isotopological 52 metadata, are formatted in HITRAN file formats. 53 If not provided, the list of lines is read from standard input. 54 .Pp 55 The options are as follows: 56 .Bl -tag -width Ds 57 .\"""""""""""""""""""""""""""""""""" 58 .It Fl a Ar arity 59 Maximum number of children of an internal node in the constructed tree 60 that partitions the input lines. 61 It cannot be less than 2, which is its default value. 62 .\"""""""""""""""""""""""""""""""""" 63 .It Fl c 64 For each internal node, construct its polyline by merging the polylines 65 of its children in pairs and then simplifying the result of this merge. 66 The process is repeated on the resulting polylines until only a single 67 polyline remains, which becomes the polyline of the internal node. 68 In other words, these polylines are constructed by successively 69 collapsing the polylines of the child nodes. 70 .Pp 71 By default, the polylines of the internal nodes are constructed in a 72 single step of merging and simplification that takes into account all 73 child polylines at once. 74 .\"""""""""""""""""""""""""""""""""" 75 .It Fl e Ar polyline_opt Ns Op : Ns Ar polyline_opt No ... 76 Configure the polylines, i.e., the data used to encode the shape of the 77 spectrum in the acceleration structure. 78 .Pp 79 The polyline options are as follows: 80 .Bl -tag -width Ds 81 .It Cm err= Ns Ar decimation_error 82 Relative error used to simplifly polylines. 83 The larger it is, the coarser the polylines obtained, and therefore the 84 less memory it uses. 85 The default value is 0.01. 86 .It Cm mesh= Ns Ar mesh_type 87 Define how the polylines are meshed. 88 .Pp 89 The supported 90 .Ar mesh_type 91 values are as follows: 92 .Bl -tag -width Ds 93 .It Cm fit 94 The polylines fit the spectrum data. 95 .It Cm upper 96 The polylines define an upper limit for the spectrum they encode. 97 This is the default behavior. 98 .El 99 .It Cm vcount= Ns Ar vertex_count_hint 100 Recommendation for the number of vertices around the center of the line. 101 The fewer vertices there are, the coarser the polyline of a line and the 102 smaller the memory usage. 103 The default value is 16. 104 .El 105 .\"""""""""""""""""""""""""""""""""" 106 .It Fl h 107 Display short help and exit. 108 .\"""""""""""""""""""""""""""""""""" 109 .It Fl L Ar leaf_nlines 110 Maximum number of lines per tree leaf. 111 The default value is 1. 112 .\"""""""""""""""""""""""""""""""""" 113 .It Fl l Ar line_profile 114 Defines the line profile. 115 Currently, 116 .Cm voigt 117 is the only supported profile and therefore the default value. 118 .\"""""""""""""""""""""""""""""""""" 119 .It Fl m Ar molparams 120 Isotopologue metadata in HITRAN format. 121 .\"""""""""""""""""""""""""""""""""" 122 .It Fl o Ar accel_struct 123 Output file. 124 If not defined, the acceleration structure is written to standard output. 125 .\"""""""""""""""""""""""""""""""""" 126 .It Fl P Ar pressure 127 Pressure of the gaz mixture, in atmospheres 128 .Pq 1 atm = 1.01315 bar . 129 .\"""""""""""""""""""""""""""""""""" 130 .It Fl s 131 Specifies that input lines are formatted according to the binary format 132 as written by the 133 .Xr shtr 1 134 utility, and not according to the HITRAN format. 135 This format is more compact, allowing for faster loading of line data. 136 .\"""""""""""""""""""""""""""""""""" 137 .It Fl T Ar temperature 138 Temperature of the gaz mixture, in Kelvin. 139 .\"""""""""""""""""""""""""""""""""" 140 .It Fl t Ar thread_count 141 Advice on the number of threads to use. 142 By default, 143 .Nm 144 uses as many threads as processor cores. 145 .\"""""""""""""""""""""""""""""""""" 146 .It Fl v 147 Make 148 .Nm 149 verbose. 150 Multiple 151 .Fl v 152 options increase the verbosity. 153 The maximum is 3. 154 .\"""""""""""""""""""""""""""""""""" 155 .It Fl x Ar mixture 156 Composition of the gaz mixture in 157 .Xr sln-mixture 5 158 format. 159 If a molecule is absent from this file, its concentration in the mixture 160 is assumed to be zero. 161 .El 162 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 163 .Sh EXIT STATUS 164 .Ex -std 165 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 166 .Sh EXAMPLES 167 Build a structure that accelerates importance sampling of the lines in 168 the H2O spectrum, between 0 and 50 cm^-1, at a pressure of 1 atm and a 169 temperature of 292 K. 170 Use the default options to mesh the spectrum, so that the resulting 171 structure represents an upper bound on the spectral data: 172 .Bd -literal -offset Ds 173 sln-build -P 1 -T 292 -o H2O_0-50_HITEMP2010_tree.bin \e 174 -m /path/to/hitran/molparams.txt -x mixture.txt \e 175 /path/to/hitran//H2O/01_0-50_HITEMP2010.par 176 .Ed 177 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 178 .Sh SEE ALSO 179 .Xr shtr 1 , 180 .Xr sln-mixture 5 181 .Rs 182 .%A Yaniss Nyffenegger-Péré et al. 183 .%T Spectrally refined unbiased monte carlo estimate of the earth's \ 184 global radiative cooling 185 .%J Proceedings of the National Academy of Sciences 186 .%P e2315492121 187 .%V 121 188 .%N 5 189 .%D 2024 190 .Re 191 .Rs 192 .%T The HITRAN Database 193 .%U https://hitran.org/ 194 .Re 195 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 196 .Sh STANDARDS 197 .Rs 198 .%A L.S. Rothman et al. 199 .%T The HITRAN2012 molecular spectroscopic database 200 .%J Journal of Quantitative Spectroscopy & Radiative Transfer 201 .%V 130 202 .%P pp. 4\(en50 203 .%D 2013 204 .Re 205 .Pp 206 .Rs 207 .%A L.S. Rothman et al. 208 .%T HITEMP, the high-temperature molecular spectroscopic database 209 .%J Journal of Quantitative Spectroscopy & Radiative Transfer 210 .%V 111 211 .%P pp. 2139\(en2150 212 .%D 2010 213 .Re