rnatm

Load and structure data describing an atmosphere
git clone git://git.meso-star.fr/rnatm.git
Log | Files | Refs | README | LICENSE

rnatm.1 (9784B)


      1 .\" Copyright (C) 2022, 2023, 2025 Centre National de la Recherche Scientifique
      2 .\" Copyright (C) 2022, 2023, 2025 Institut Pierre-Simon Laplace
      3 .\" Copyright (C) 2022, 2023, 2025 Institut de Physique du Globe de Paris
      4 .\" Copyright (C) 2022, 2023, 2025 |Méso|Star>(contact@meso-star.com)
      5 .\" Copyright (C) 2022, 2023, 2025 Observatoire de Paris
      6 .\" Copyright (C) 2022, 2023, 2025 Université de Reims Champagne-Ardenne
      7 .\" Copyright (C) 2022, 2023, 2025 Université de Versaille Saint-Quentin
      8 .\" Copyright (C) 2022, 2023, 2025 Université Paul Sabatier
      9 .\"
     10 .\" This program is free software: you can redistribute it and/or modify
     11 .\" it under the terms of the GNU General Public License as published by
     12 .\" the Free Software Foundation, either version 3 of the License, or
     13 .\" (at your option) any later version.
     14 .\"
     15 .\" This program is distributed in the hope that it will be useful,
     16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     18 .\" GNU General Public License for more details.
     19 .\"
     20 .\" You should have received a copy of the GNU General Public License
     21 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
     22 .Dd October 1, 2025
     23 .Dt RNATM 1
     24 .Os
     25 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     26 .Sh NAME
     27 .Nm rnatm
     28 .Nd check atmospheric data and structures built to manage them
     29 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     30 .Sh SYNOPSIS
     31 .Nm
     32 .Op Fl hNv
     33 .Op Fl a Ar aerosol_opt Ns Op : Ns Ar aerosol_opt No ...
     34 .Op Fl c
     35 .Op Fl d Ar octrees
     36 .Op Fl i Ar storage
     37 .Op Fl n Ar name
     38 .Op Fl o Ar storage
     39 .Op Fl s Ar nu0 , Ns Ar nu1
     40 .Op Fl T Ar optical_thickness
     41 .Op Fl t Ar thread_count
     42 .Op Fl V Ar definition
     43 .Fl g Ar gas_opt Ns Op : Ns Ar gas_opt No ...
     44 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     45 .Sh DESCRIPTION
     46 .Nm
     47 helps to check and diagnose errors in input data as submitted to the RaD-net
     48 atmospheric library.
     49 It also makes it easy to check the internal workings of the library, such as the
     50 construction of structures used to accelerate ray tracing in the heterogeneous
     51 semi-transparent environment described by the input data.
     52 .Pp
     53 In addition to regular verification of the input data format, additional tests
     54 can be performed
     55 .Pq option Fl c
     56 to further validate the data, at the cost of longer execution time.
     57 For example, enabling this option allows to verify the validity of aerosol
     58 phase function indices with respect to the mesh to which they are associated and
     59 the list of loaded phase functions.
     60 .Pp
     61 The options are as follows:
     62 .Bl -tag -width Ds
     63 .\""""""""""""""""""""""""""""""""""""""
     64 .It Fl a Ar aerosol
     65 Define an aerosol.
     66 Use this option once per aerosol, and duplicate it as many times as
     67 necessary.
     68 .Pp
     69 The aerosol options are as follows:
     70 .Bl -tag -width Ds
     71 .It Cm mesh= Ns Ar volume_mesh
     72 Aerosol tetrahedral mesh saved in
     73 .Xr smsh 5
     74 format.
     75 .It Cm name= Ns Ar string
     76 Name assigned to the aerosol.
     77 .It Cm radprop= Ns Ar radiative_properties
     78 Radiatve properties of the aerosol saved in
     79 .Xr sars 5
     80 format.
     81 Radiative properties are defined per volumetric mesh node.
     82 This file and the tetrahedral mesh
     83 .Pq option Cm mesh
     84 must therefore be consistent with each other, i.e. the nodes must be
     85 listed in the same order.
     86 .It Cm phasefn= Ns Ar phase_functions_list
     87 List in
     88 .Xr rnsl 5
     89 format of phase functions to be loaded.
     90 Each phase function is saved in
     91 .Xr rnsf 5
     92 format.
     93 The correspondence between these phase functions and the nodes of the
     94 volumetric mesh is defined in another file
     95 .Pq option Cm phaseids .
     96 .It Cm phaseids= Ns Ar per_node_phase_function
     97 Path to the
     98 .Xr rnpfi 5
     99 file that stores the index of the phase function to be used per
    100 volumetric mesh node.
    101 The list of phase function is defined in another file
    102 .Pq option Cm phasefn .
    103 Note that this file and the tetrahedral mesh
    104 .Pq option Cm mesh
    105 must be consistent with each other, i.e. the nodes must be
    106 listed in the same order.
    107 .El
    108 .\""""""""""""""""""""""""""""""""""""""
    109 .It Fl c
    110 Thorough data validation.
    111 .\""""""""""""""""""""""""""""""""""""""
    112 .It Fl d Ar octrees
    113 Write the builded acceleration structures (i.e., the octrees) to file according
    114 to the VTK file format.
    115 They are written to standard ouput if the file is a dash
    116 .Pq - .
    117 To split the resulting file
    118 into
    119 .Ar n
    120 VTK files, each storing an octree, one can use the csplit command.
    121 For example with
    122 .Ar n
    123 = 4:
    124 .Bd -literal -offset Ds
    125 csplit -f octree -k file %^#\ vtk% /^#\ vtk/ {2};
    126 .Ed
    127 .\""""""""""""""""""""""""""""""""""""""
    128 .It Fl g Ar gas_opt Ns Op : Ns Ar gas_opt No ...
    129 Gas mixture.
    130 .Pp
    131 The gas options are as follows:
    132 .Bl -tag -width Ds
    133 .It Cm mesh= Ns Ar volumetric_mesh
    134 Gas tetrahedral mesh saved in
    135 .Xr smsh 5
    136 format.
    137 .It Cm ck= Ns Ar correlated_k
    138 Correlated K fof the gas saved in
    139 .Xr sck 5
    140 format.
    141 The correlated K are defined per volumetric mesh node.
    142 This file and the tetrahedral mesh
    143 .Pq option Cm mesh
    144 must therefore be consistent with each other, i.e. the nodes must be
    145 listed in the same order.
    146 .It Cm temp= Ns Ar temperature
    147 Gas temperatures saved in
    148 .Xr rngt 5
    149 format.
    150 The temperature is defined per volumetric mesh node.
    151 This file and the tetrahedral mesh
    152 .Pq option Cm mesh
    153 must therefore be consistent with each other, i.e. the nodes must be
    154 listed in the same order.
    155 .El
    156 .\""""""""""""""""""""""""""""""""""""""
    157 .It Fl h
    158 Display short help and exit.
    159 .\""""""""""""""""""""""""""""""""""""""
    160 .It Fl i Ar storage
    161 Acceleration structures are not built from scratch, but loaded from the
    162 .Ar storage
    163 file.
    164 .\""""""""""""""""""""""""""""""""""""""
    165 .It Fl N
    166 Precalculate tetrahedron normals.
    167 This speeds up execution performance for applications that search for the
    168 tetrahedron to which a position belongs.
    169 In return, the memory space used to store normals increases the memory
    170 footprint.
    171 .\""""""""""""""""""""""""""""""""""""""
    172 .It Fl n Ar name
    173 Atmosphere name.
    174 Default is
    175 .Dq atmosphere .
    176 .\""""""""""""""""""""""""""""""""""""""
    177 .It Fl o Ar storage
    178 Offload acceleration structures to the
    179 .Ar storage
    180 file.
    181 .\""""""""""""""""""""""""""""""""""""""
    182 .It Fl s Ar nu0 , Ns Ar nu1
    183 Spectral range to consider
    184 .Pq in nanometers .
    185 Default is visible spectrum, i.e., [380, 780] nm.
    186 .\""""""""""""""""""""""""""""""""""""""
    187 .It Fl T Ar optical_thickness
    188 Optical thickness criteria for the construction of acceleration structures.
    189 Default is 1.
    190 .\""""""""""""""""""""""""""""""""""""""
    191 .It Fl t Ar thread_count
    192 Advice on the number of threads to use to build acceleration structures.
    193 Default assumes as many threads as processor cores.
    194 .\""""""""""""""""""""""""""""""""""""""
    195 .It Fl V Ar definition
    196 Advice on the definition of the acceleration structures along the 3 axis.
    197 Default is 512.
    198 .\""""""""""""""""""""""""""""""""""""""
    199 .It Fl v
    200 Make
    201 .Nm
    202 Verbose.
    203 .El
    204 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    205 .Sh EXIT STATUS
    206 .Ex -std
    207 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    208 .Sh EXAMPLES
    209 A
    210 .Nm
    211 command line can be lengthy due to the options required to describe the
    212 atmopshere.
    213 For editing purposes, the following command line spans multiple lines using the
    214 backslash character
    215 .Pq \e .
    216 While there's nothing original about this practice, we'd like to
    217 emphasize the importance of spaces or their absence before the backslash
    218 character, particularly for options defining aerosols
    219 .Pq option Fl a :
    220 their argument must be a single character string with no spaces other
    221 than those that may be required for file names.
    222 .Bd -literal -offset Ds
    223 rnatm -v -c \\
    224       -g mesh=gas.smsh:ck=gas.sck:temp=gas.rngt \\
    225       -a name=clouds\\
    226 :mesh=clouds_tetrahedra.smsh\\
    227 :radprop=clouds_properties.sars\\
    228 :phasefn=clouds_phase_functions.rnsf\\
    229 :phaseids=clouds_phase_function_ids.rnpfi \\
    230       -a name=haze\\
    231 :mesh=haze_tetrahedra.smsh\\
    232 :radprop=haze_properties.sars\\
    233 :phasefn=haze_phase_functions.rnsf\\
    234 :phaseids=haze_phase_function_ids.rnpfi \\
    235       -N \\
    236       -T 10 \\
    237       -V 1024
    238       -o storage.bin
    239 .Ed
    240 .Pp
    241 The above command line runs
    242 .Nm
    243 in a verbose way
    244 .Pq option Fl v
    245 for a thorough verification of the input data
    246 .Pq option Fl c .
    247 The gas of the planetary atmosphere
    248 .Pq option Fl g
    249 is described by the tetrahedral mesh recorded in the
    250 .Pa gas.smsh
    251 file, while its spectral data and temperature are given by the files
    252 .Pa gas.sck
    253 and
    254 .Pa gas.rngt ,
    255 respectively.
    256 .Pp
    257 Two aerosols complete the planetary atmosphere
    258 .Pq option Fl a :
    259 one for
    260 .Ar clouds
    261 and one for
    262 .Ar haze .
    263 Their respective meshes are stored in the
    264 .Pa clouds_tetrahedra.smsh No and Pa haze_tetrahedra.smsh
    265 files while their radiative properties are given by the
    266 .Pa clouds_properties.sars No and Pa haze_properties.sars
    267 files.
    268 Finally, their phase functions are described by a set of 2 files: the
    269 .Pa clouds_phase_functions.rnsf No and Pa haze_phase_functions.rnsf
    270 files which list the aerosol phase functions,
    271 and the
    272 .Pa clouds_phase_function_ids.rnpfi No and Pa haze_phase_function_ids.rnpfi
    273 files which reference them by volumetric mesh node.
    274 .Pp
    275 The normals of the tetrahedral meshes of the gas and aerosols are
    276 precalculated
    277 once and for all
    278 .Pq option Fl N .
    279 The definition of acceleration structures
    280 cannot exceed
    281 .Ar 1024^3
    282 .Pq option Fl V
    283 and its voxels can be merged until their optical thickness
    284 is greater than
    285 .Ar 10
    286 .Pq option Fl T .
    287 These structures are finally stored in
    288 .Pa storage.bin
    289 .Pq option Fl o .
    290 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    291 .Sh SEE ALSO
    292 .Xr htrdr-planets 1 ,
    293 .Xr rnpfi 5 ,
    294 .Xr rnsf 5 ,
    295 .Xr rnsl 5 ,
    296 .Xr sars 5 ,
    297 .Xr sck 5 ,
    298 .Xr smsh 5
    299 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    300 .Sh HISTORY
    301 .Nm
    302 has been developed as part of
    303 .Ql ANR-21-CE49-0020
    304 RaD-net project.