Hazard Curves¶
These models represent aggregated hazard curves derived from OpenQuake PSHA engine outputs.
Hazard Aggregate Curve¶
The core model for aggregated hazard curve data, stored as PyArrow parquet datasets.
Bases: BaseModel
Generally these are aggregated realisation curves.
Attributes:
| Name | Type | Description |
|---|---|---|
compatible_calc_id |
str
|
for hazard-calc equivalence. |
model_id |
str
|
the model that these curves represent. |
nloc_001 |
str
|
the location string to three places e.g. "-38.330~17.550". |
nloc_0 |
str
|
the location string to zero places e.g. "-38.0~17.0" (used for partitioning). |
imt |
str
|
the imt label e.g. 'PGA', 'SA(5.0)' |
vs30 |
int
|
the VS30 integer |
aggr |
str
|
the aggregation type |
values |
List[float]
|
a list of the 44 IMTL values |
Source code in toshi_hazard_store/model/hazard_models_pydantic.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
PyArrow Schema¶
The HazardAggregateCurve model can be converted to a PyArrow schema for dataset I/O:
from toshi_hazard_store.model.hazard_models_pydantic import HazardAggregateCurve
schema = HazardAggregateCurve.pyarrow_schema()
The schema includes:
compatible_calc_id(string) - Compatible calculation identifierhazard_model_id(string) - Model identifier (e.g., "NSHM_v1.0.4")nloc_001(string) - Location to 3 decimal places (e.g., "-38.330~17.550")nloc_0(string) - Location to 0 decimal places (e.g., "-38.0~17.0") for partitioningimt(string) - Intensity measure type (e.g., "PGA", "SA(5.0)")vs30(int32) - VS30 valueaggr(string) - Aggregation type (e.g., "mean", "0.9", "std")values(list of float32) - 44 IMT level values
Constraint Enums¶
These enumerations define valid values for model fields:
Aggregation Enum¶
Bases: Enum
Defines the values available for aggregations.
Source code in toshi_hazard_store/model/constraints.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
Intensity Measure Type Enum¶
Bases: Enum
Defines the values available for IMTs.
Source code in toshi_hazard_store/model/constraints.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
VS30 Enum¶
Bases: Enum
Defines the values available for VS30.
Source code in toshi_hazard_store/model/constraints.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
Probability Enum¶
Bases: Enum
Defines the values available for probabilities.
store values as float representing probability in 1 year
Source code in toshi_hazard_store/model/constraints.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |