star-hitran

Load line-by-line data from the HITRAN database
git clone git://git.meso-star.fr/star-hitran.git
Log | Files | Refs | README | LICENSE

commit 05ae53a8c3723e8e9b0caf8c45a955097056fa56
parent 0a72bab13ef1b1cde1622b31dc303d5b39bf22b2
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 28 Jan 2026 15:57:54 +0100

Use the shtr_molecule_id enumeration in the line structure

This is the type of identifier for its molecule.

Diffstat:
Msrc/shtr.h | 2+-
Msrc/shtr_line_list.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shtr.h b/src/shtr.h @@ -115,7 +115,7 @@ struct shtr_line { double n_air; /* Temperature-dependant exponent */ double delta_air; /* Air-pressure wavenumber shift [cm^-1.atm^-1] */ - int32_t molecule_id; + enum shtr_molecule_id molecule_id; /* The value of the following isotopic index is _not_ the value of the * isotopic index read from the HITRAN file. The original value is in [0, 9] diff --git a/src/shtr_line_list.c b/src/shtr_line_list.c @@ -120,7 +120,7 @@ line_encode(const struct shtr_line* line, struct line* line_encoded) /* Store the molecule id on 7 bits */ ASSERT(line->molecule_id < 128); - ucast.i32 |= line->molecule_id & (BIT_I32(7)-1); + ucast.i32 |= (int32_t)line->molecule_id & (BIT_I32(7)-1); line_encoded->nair25_molid7 = ucast.i32; }