htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

rnrl.5 (3112B)


      1 .\" Copyright (C) 2018-2019, 2022-2025 Centre National de la Recherche Scientifique
      2 .\" Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux
      3 .\" Copyright (C) 2022-2025 Institut Pierre-Simon Laplace
      4 .\" Copyright (C) 2022-2025 Institut de Physique du Globe de Paris
      5 .\" Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com)
      6 .\" Copyright (C) 2022-2025 Observatoire de Paris
      7 .\" Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne
      8 .\" Copyright (C) 2022-2025 Université de Versaille Saint-Quentin
      9 .\" Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier
     10 .\"
     11 .\" This program is free software: you can redistribute it and/or modify
     12 .\" it under the terms of the GNU General Public License as published by
     13 .\" the Free Software Foundation, either version 3 of the License, or
     14 .\" (at your option) any later version.
     15 .\"
     16 .\" This program is distributed in the hope that it will be useful,
     17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
     18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     19 .\" GNU General Public License for more details.
     20 .\"
     21 .\" You should have received a copy of the GNU General Public License
     22 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
     23 .Dd October 9, 2023
     24 .Dt RNRL 5
     25 .Os
     26 .Sh NAME
     27 .Nm rnrl
     28 .Nd radiance distribution format
     29 .Sh DESCRIPTION
     30 .Nm
     31 is a binary file format for storing a radiance distribution, i.e. a set
     32 of radiances
     33 .Pq in W/m^2/sr/m
     34 sorted by ascending wavelength
     35 .Pq in nm .
     36 .Pp
     37 A
     38 .Nm
     39 file is actualy a Star-Buffer file
     40 .Pq see Xr sbuf 5 .
     41 It starts  with a header of 4 integers
     42 The first integer is a power of two
     43 .Pq usually 4096
     44 that defines the size of the memory page in bytes
     45 .Pq Va pagesize
     46 on which the list of radiances by wavelength is aligned.
     47 By aligning data to pagesize, and depending on system requirements,
     48 memory mapping can be used to automatically load/unload pages on demand
     49 .Pq see Xr mmap 2 .
     50 The second integer is the
     51 .Va size
     52 of the array, i.e. the number of wavelengths for which a radiance is
     53 defined.
     54 The 2 remaining integers store the memory size (16 bytes) and memory
     55 alignment (16 bytes) of each entry, i.e. the wavelength
     56 .Pq in nm
     57 and its associated radiance
     58 .Pq in W/m^2/sr/m .
     59 .Pp
     60 Padding bytes follow the file header to align the radiance distribution
     61 to
     62 .Va pagesize .
     63 .Pp
     64 The distribution is finally followed by padding bytes to align the
     65 overall file size with the size of a page.
     66 .Pp
     67 Data are encoded with respect to the little endian bytes ordering,
     68 i.e.\& least significant bytes are stored first.
     69 .Pp
     70 The file format is as follows:
     71 .Bl -column (distribution) (::=) ()
     72 .It Ao Va rnsl Ac Ta ::= Ta Ao Va pagesize Ac Ao Va size Ac Li 16 16
     73 .It Ta Ta Aq Va padding
     74 .It Ta Ta Aq Va distribution
     75 .It Ta Ta Aq Va padding
     76 .It Ao Va pagesize Ac Ta ::= Ta Vt uint64_t
     77 .It Ao Va distribution Ac Ta ::= Ta
     78 .Aq Va wavelength
     79 .Aq Va radiance
     80 .It Ta Ta Va ...
     81 .It Ao Va wavelength Ac Ta ::= Ta Vt double
     82 # In nm
     83 .It Ao Va radiance Ac Ta ::= Ta Vt double
     84 # In W/m^2/sr/m
     85 .It Ao Va padding Ac Ta ::= Ta Op Vt int8_t ...
     86 .El
     87 .Sh SEE ALSO
     88 .Xr mmap 2 ,
     89 .Xr sbuf 5