Environment Variables¶
OasisLMF uses environment variables to control runtime behaviour that must be set before the package is imported. These are distinct from the JSON configuration file options (see Options for the JSON Configuration File).
Numeric Type Configuration¶
The following variables control the numeric precision of internal data types.
They are read once at import time, so they must be set in the shell before
running any oasislmf command or importing the package.
OASIS_AREAPERIL_TYPEControls the integer type used for AreaPeril IDs. Default:
u4(uint32, max value 4,294,967,295). Set tou8(uint64) for models with AreaPeril IDs exceeding this limit.export OASIS_AREAPERIL_TYPE=u8 oasislmf model run ...
OASIS_FLOATControls floating-point precision for loss values. Default:
f4(float32). Set tof8(float64) for higher numerical precision at the cost of increased memory usage and slower computation.export OASIS_FLOAT=f8
OASIS_INTControls integer precision for internal Oasis fields for example SummaryId. Default:
i4(int32). Set toi8(int64) for extended range.export OASIS_INT=i8
Note
All three variables must be consistent with the binary model data files on disk. Changing them without regenerating model data will produce incorrect results. See issue #1990 for details on cache-related pitfalls when changing these values between runs.
Logging¶
See Logging Configuration for the OASIS_PACKAGE_LOG_LEVEL and
related logging environment variables.