make.scoops

make.scoops will generate D-Claw input files that specify an initial 3D landslide geometry from user-supplied files and parameters. The following is typical usage for make.scoops.

  1. Prepare a topography file as a geotif. If the area of interest includes submarine regions, the topography and bathymetry should be represented as a seamless surface in a single file.

  2. Prepare or obtain a shapefile containing one or more polygons indicating landslide extents. Optionally, identify auxiliary information that will help you specify the function inputs (see API documentation for make.scoops for details). Typically this requires some fundamental knowledge about the landslide itself such as estimates of the headscarp angle. Ensure that the geotif and shapefile have the same coordinate system.

  3. Run make.scoops to generate input files for D-Claw. Inspect the output and adjust any input parameters as needed.

  4. Using these files, set up a D-Claw simulation to run and analyze. digger will not do this for you.

A code snippet that uses make.scoops may be found in the file digger/examples/pre-run/barry_arm/make_scoops_barry_arm_example.py,

"""Example using digger.make.scoops.

This example makes  a logspiral failure plane for the prow and core
elements of the Barry Arm landslide.
"""

from digger import make

make.scoops(
    source_path="../../../data/all.shp",
    source_mask_path="../../../data/prowcore.shp",
    topo_path="../../../data/barry_topo.tif",
    q1_prefix="q1barry",
    q4_prefix="etabarry",
    b_prefix="bbarry",
    eta_prefix="q4barry",
    eta_dry=None,
    slip_angle=None,
    vertex_only=True,
    step=200,
    npoints=100,
    clip_extent=True,
    q1_buffer=50,
    alpha1=-90,
    alpha2=0,
    check_crs=True,
    c=None,
    m0=0.62,
    plot=True,
    write_tt3=True,
    write_tif=True,
    fig_path="scoops_barry.png",
    water_level=0,
)

Attention

This code snippet is not fully self-sufficient. To reproduce the example, execute the code such that the relative path is correct. This may be done by executing the example script from within the directory in which it is located.

After this code runs, it will produce geotif and topotype3 files that specify the upper and lower surfaces of the landslide and the initial solid-volume fraction of the landslide material.

It will also create diagnostic figures to assist the user in refining the failure surface generated through make.scoops.

Example digger.make.scoops summary figure.

Fig. 1 An example of the diagnostic output provided by digger.make.scoops.

The function make.scoops has many options. One such option is the ability to modify the topographic surface within the landslide to be a flat plane estimated by fitting a plane to the exterior of the landslide. An example of using this functionality is provided in the file digger/examples/pre-run/barry_arm/make_scoops_barry_arm_flat_example.py. It differs from the prior example only by the use of fill_flat=True.

"""Example using digger.make.scoops.

This example makes  a logspiral failure plane for the prow and core
elements of the Barry Arm landslide.

It uses fill_flat=True to generate a flat landslide surface (eta).
"""

from digger import make

make.scoops(
    source_path="../../../data/all.shp",
    source_mask_path="../../../data/prowcore.shp",
    topo_path="../../../data/barry_topo.tif",
    q1_prefix="q1barryflat",
    q4_prefix="q4barryflat",
    b_prefix="bbarryflat",
    eta_prefix="etabarryflat",
    slip_angle=None,
    vertex_only=True,
    step=200,
    npoints=100,
    q1_buffer=50,
    alpha1=-90,
    alpha2=0,
    check_crs=False,
    c=None,
    m0=0.62,
    plot=True,
    write_tt3=False,
    write_tif=True,
    fig_path="scoops_barry_flat.png",
    water_level=0,
    fill_flat=True,
)

The diagnostic figure from this section option looks as follows:

Example digger.make.scoops summary figure.

Fig. 2 An example of the diagnostic output provided by digger.make.scoops with fill_flat=True.