Gridded Hazard Models¶
These models represent hazard values interpolated at grid locations for given probabilities of exceedance.
Gridded Hazard POE Levels¶
Hazard acceleration (shaking) levels at various grid locations for a given POE, investigation time, VS30, IMT, and aggregation.
Bases: BaseModel
A list of hazard acceleration (shaking) at various locations in a grid.
Ground shaking levels for the given location_grid at the given poe, investigation time, vs30, imt and aggr.
NB the validator methods on this model are 'rigorous and slow', for use when creating new model instances.
If models that are being rehydrated from trusted source can use the pydantic use the model_construct method
to avoid the validation overhead.
Attributes:
| Name | Type | Description |
|---|---|---|
compatible_calc_id |
str
|
for hazard-calc equivalence. |
hazard_model_id |
str
|
the model that the values are derived from. |
location_grid_id |
str
|
the NSHM grid identifier. |
imt |
str
|
the imt label e.g. |
vs30 |
int
|
the VS30 value. |
aggr |
str
|
the aggregation type. e.g |
investigation_time |
int
|
the time period (in years) for which the poe applies. |
poe |
float
|
the Probability of Exceedance (poe) expressed as a normalized percentage (i.e 0 to 1.0). |
accel_levels |
List[float]
|
a list of floats representing the acceleration level in G at the given poe for each grid location.
This list must align with the locations in the given |
Source code in toshi_hazard_store/model/gridded/gridded_hazard_pydantic.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 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 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 124 125 126 127 128 129 130 131 132 | |
PyArrow Schema¶
The GriddedHazardPoeLevels model can be converted to a PyArrow schema for dataset I/O:
from toshi_hazard_store.model.gridded.gridded_hazard_pydantic import GriddedHazardPoeLevels
schema = GriddedHazardPoeLevels.pyarrow_schema()
The schema includes:
compatible_calc_id(string) - Compatible calculation identifierhazard_model_id(string) - Model identifierlocation_grid_id(string) - NSHM grid identifier (e.g., "NZ_0_1_NB_1_1")imt(string) - Intensity measure type (validated againstIntensityMeasureTypeEnum)vs30(int32) - VS30 value (validated againstVS30Enum)aggr(string) - Aggregation type (validated againstAggregationEnum)investigation_time(int) - Must be 50 yearspoe(float) - Probability of exceedance (0 < poe < 1)accel_levels(list of float32) - Acceleration levels in G, aligned with grid locations