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.

class weac.utils.snowpilot_parser.SnowPilotParser(file_path)[source]

Bases: object

Parser for SnowPilot files using the snowpylot library.

Parameters:

file_path (str)

__init__(file_path)[source]
Parameters:

file_path (str)

extract_layers()[source]

Extract layers from snowpit.

Return type:

Tuple[List[Layer], List[str]]

get_density_for_layer_range(layer_top_mm, layer_bottom_mm, sp_density_layers)[source]

Find density measurements that overlap with the given layer depth range.

Parameters:
  • layer_top_mm (float) – Top depth of layer in mm

  • layer_bottom_mm (float) – Bottom depth of layer in mm

  • sp_density_layers (List[DensityObs]) – List of density observations

Returns:

Average density from overlapping measurements, or None if no overlap

Return type:

float | None

extract_weak_layer_and_layers_above(weak_layer_depth, layers)[source]

Extract weak layer and layers above the weak layer for the given depth_top extracted from the stability test.

Parameters:
  • weak_layer_depth (float)

  • layers (List[Layer])

Return type:

Tuple[WeakLayer, List[Layer]]