star-aerosol

Describe the radiative properties of aerosols
git clone git://git.meso-star.fr/star-aerosol.git
Log | Files | Refs | README | LICENSE

sars.5 (3679B)


      1 .\" Copyright (C) 2022, 2023 |Méso|Star> (contact@meso-star.com)
      2 .\"
      3 .\" This program is free software: you can redistribute it and/or modify
      4 .\" it under the terms of the GNU General Public License as published by
      5 .\" the Free Software Foundation, either version 3 of the License, or
      6 .\" (at your option) any later version.
      7 .\"
      8 .\" This program is distributed in the hope that it will be useful,
      9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
     10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11 .\" GNU General Public License for more details.
     12 .\"
     13 .\" You should have received a copy of the GNU General Public License
     14 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
     15 .Dd July 28, 2023
     16 .Dt SARS 5
     17 .Os
     18 .Sh NAME
     19 .Nm sars
     20 .Nd Star AeRoSol file format
     21 .Sh DESCRIPTION
     22 .Nm
     23 is a binary file format for storing the radiative properties of an
     24 aerosol.
     25 The volumetric mesh to which the CKs are attached is
     26 .Em not
     27 described there but must be defined in a separated file via, for example, the
     28 .Xr smsh 5
     29 file format.
     30 .Pp
     31 A
     32 .Nm
     33 file begins by a header that describes the layout of the data.
     34 Next the spectral bands on which the radiative coefficients were defined are
     35 listed.
     36 Finally, the entire list of the scattering coefficients and absorption
     37 coefficients are stored.
     38 .Pp
     39 The header consists of 3 64-bit integers.
     40 The first integer is a power of two
     41 .Pq usually 4096
     42 that defines the
     43 .Va pagesize
     44 in bytes on which the radiative coefficients are aligned.
     45 The remaining two integers store the number of bands and the number of nodes,
     46 that is, the number of radiative coefficients per band which is actually the
     47 number of nodes in the volumetric mesh to which these coefficients are
     48 attached.
     49 .Pp
     50 After the header comes the list of spectral bands sorted in ascending order
     51 relative to their interval.
     52 Each spectral band is defined by 2 double-precision floating-point numbers that
     53 represent the lower and upper limits of the band in nanometers.
     54 .Pp
     55 Fill bytes follow the list of spectral bands to ensure alignment of the
     56 radiative coefficients on
     57 .Va pagesize .
     58 By aligning data on
     59 .Va pagesize ,
     60 and depending on system requirements, memory mapping can be used to
     61 automatically load/unload the radiative coefficients on demand
     62 .Pq see Xr mmap 2 .
     63 For each band, the absorption coefficient and diffusion coefficient are listed
     64 per node.
     65 This list is followed by a
     66 .Va padding ,
     67 which is a list of bytes that provides memory alignment of the following data
     68 to
     69 .Va pagesize .
     70 Bands are sorted according to the order in which they were previously declared.
     71 .Pp
     72 Data are encoded with respect to the little endian bytes ordering, i.e. least
     73 significant bytes are stored first.
     74 .Pp
     75 The file format is as follows:
     76 .Bl -column (per-band-k) (::=) ()
     77 .It Ao Va sars Ac Ta ::= Ta Ao Va pagesize Ac Ao Va #bands Ac Ao Va #nodes Ac
     78 .It Ta Ta Aq Va bands
     79 .It Ta Ta Aq Va padding
     80 .It Ta Ta Aq Va rad-coefs
     81 .It \  Ta Ta
     82 .It Ao Va pagesize Ac Ta ::= Ta Vt uint64_t
     83 .It Ao Va #bands Ac Ta ::= Ta Vt uint64_t
     84 .It Ao Va #nodes Ac Ta ::= Ta Vt uint64_t
     85 .It Ao Va padding Ac Ta ::= Ta Op Va int8_t ...
     86 # Ensure alignment on
     87 .Va pagesize
     88 .It \  Ta Ta
     89 .It Ao Va bands Ac Ta ::= Ta Ao Va band Ac Va ...
     90 .It Ao Va band Ac Ta ::= Ta Ao Va band-low Ac Ao Va band-upp Ac
     91 .It Ao Va band-low Ac Ta ::= Ta Vt double
     92 # Inclusive bound in nm
     93 .It Ao Va band-upp Ac Ta ::= Ta Vt double
     94 # Excusive bound in nm
     95 .It \  Ta Ta
     96 .It Ao Va rad-coefs Ac Ta ::= Ta Ao Va per-band-k Ac Va ...
     97 .It Ao Va ka-ks Ac Ta ::= Ta Ao Va ka Ac Ao Va ks Ac
     98 .It Ao Va ka Ac Ta ::= Ta Vt float
     99 # In m^-1
    100 .It Ao Va ks Ac Ta ::= Ta Vt float
    101 # In m^-1
    102 .El
    103 .Sh SEE ALSO
    104 .Xr mmap 2 ,
    105 .Xr smsh 5