weac.utils.snowpilot_parser module¶
Utilizes the snowpylot library to convert a CAAML file to a WEAC ModelInput.
The snowpylot library is used to parse the CAAML file and extract the snowpit. The snowpit is then converted to a List of WEAC ModelInput.
Based on the different stability tests performed, several scenarios are created. Each scenario is a WEAC ModelInput.
The scenarios are created based on the following logic: - For each PropSawTest, a scenario is created with the cut length and a standard segment. - For each ExtColumnTest, a scenario is created with a standard segment. - For each ComprTest, a scenario is created with a standard segment. - For each RBlockTest, a scenario is created with a standard segment.
The a standard segment is a segment with a length of 1000 mm and a foundation of True.
The the cut length is the cut length of the PropSawTest. The the column length is the column length of the PropSawTest.
- weac.utils.snowpilot_parser.vertical_to_slope_normal_depth_scale(phi_deg)[source]¶
Scale vertical (plumb) depth/thickness to distance along slope normal.
CAAML / SnowPilot report depths from the surface along the vertical. WEAC slab layer thicknesses are measured normal to the slope. Following the convention used for SnowPilot import here, the plumb-line depth
d_vis converted to slope-normal depthd_nbyd_n = d_v * cos(phi), wherephiis the slope angle from horizontal.- Parameters:
phi_deg (float)
- Return type:
float
- class weac.utils.snowpilot_parser.SnowPilotParser(file_path)[source]¶
Bases:
objectParser for SnowPilot files using the snowpylot library.
- Parameters:
file_path (str)
- pit_slope_angle_deg()[source]¶
Slope angle from CAAML
validSlopeAngleif present, elseNone.- Return type:
float | None
- extract_layers(slope_angle_deg=0.0)[source]¶
Extract layers from snowpit.
Depths and thicknesses in CAAML are measured along the vertical. For WEAC, pass the same slope angle (degrees from horizontal) as
ScenarioConfig.phi; thicknesses and matching depths are scaled to slope-normal bycos(phi). The default0leaves depths unchanged (vertical equals slope-normal on flat terrain). To use the angle stored in the pit file, passslope_angle_deg=parser.pit_slope_angle_deg() or 0.0.- Parameters:
slope_angle_deg (float)
- Return type:
tuple[list[Layer], list[str]]