commit 98bcb5c4df856608162b836a703e6c9672a8d851
parent fb357ea064977603442fcd87fd38e2dadd41bfdd
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 21 Sep 2022 11:37:08 +0200
Write the rnpfi man page
Diffstat:
3 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -128,7 +128,7 @@ if(NOT SCDOC)
"The `scdoc' program is missing. "
"The Rad Net ATMopshere man page cannot be generated.")
else()
- set(_man_names rngt.5)
+ set(_man_names rngt.5 rnpfi.5)
foreach(_man IN LISTS _man_names)
set(_src ${PROJECT_SOURCE_DIR}/../doc/${_man}.scd)
diff --git a/doc/rnpfi.5.scd b/doc/rnpfi.5.scd
@@ -0,0 +1,69 @@
+rnpfi(5)
+
+; Copyright (C) 2022 Centre National de la Recherche Scientifique
+; Copyright (C) 2022 Institut de Physique du Globe de Paris
+; Copyright (C) 2022 |Méso|Star> (contact@meso-star.com)
+; Copyright (C) 2022 Université de Reims Champagne-Ardenne
+; Copyright (C) 2022 Université de Versaille Saint-Quentin
+; Copyright (C) 2022 Université Paul Sabatier (contact@laplace.univ-tlse.fr)
+;
+; 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/>.
+
+# NAME
+
+rnpfi - Rad-Net Phase Function Indices
+
+# DESCRIPTION
+
+*rnpfi* is a binary file format for storing a list of indices referring to phase
+functions. The indices are attached to a volumetric mesh which is _not_
+described there but must be defined in a separate file, for example in an
+*smsh*(5) file. The number of indices and their order must therefore correspond
+to the data of the mesh to which they are attached, i.e. to the nodes|cells
+listed in the corresponding mesh.
+
+*rnpfi* file is actually a Star-Buffer file (see *sbuf*(5)). It starts with a
+header of 4 64-bit integers describing the layout of the data. The first integer
+is a power of two (usually 4096) that defines the size of the memory page in
+bytes to which the list of indices aligns (_pagesize_). The second integer is
+the _size_ of the array, i.e. the number of indices defined in the list.
+Finally, the 2 remaining integers store the memory size (4 bytes) and the memory
+alignment (4 bytes) of an index.
+
+Padding bytes follow the file header to align the listed indices to
+_pagesize_.
+
+The end of the file is eventually padded with dummy bytes to ensure that the
+overall file size is a multiple of _pagesize_.
+
+# BINARY FILE FORMAT
+
+Data are encoded with respect to the little endian bytes ordering, i.e. least
+significant bytes are stored first.
+
+```
+<rngt> ::= <pagesize> <size> 4 4
+ <padding>
+ <indices>
+ <padding>
+
+<pagesize> ::= UINT64
+<size> ::= UINT64 # Number of indices stored
+<indices> ::= UINT32 ...
+<padding> ::= [ BYTE ... ] # Ensure alignement
+```
+
+# SEE ALSO
+
+*sbuf*(5), *smsh*(5)
diff --git a/src/rnatm_properties.c b/src/rnatm_properties.c
@@ -336,7 +336,7 @@ setup_aerosol_properties
res = sars_create(&sars_args, &aerosol->sars);
if(res != RES_OK) goto error;
- /* Load the aerosol radiativ properties */
+ /* Load the aerosol radiative properties */
res = sars_load(aerosol->sars, aerosol_args->sars_filename);
if(res != RES_OK) goto error;
res = check_aerosol_sars_desc(atm, aerosol, aerosol_args);