digger.analyze.splash_points

Module Contents

Functions

splash

Generate a table of wave arrival time, wave travel distance, and maximum surface alitude along coastline points using input rasters.

API

digger.analyze.splash_points.splash(data_path: str, output_type: str = 'fgout', out_path: str = 'time_distance_array.csv', offshore_buffer: float = 0, routing: str = 'd8', fig_dir: str = '.', fig_stem: str = 'scenario', plots: bool = True, initial_landslide=None) None

Generate a table of wave arrival time, wave travel distance, and maximum surface alitude along coastline points using input rasters.

This function takes in a multi-layer raster that contains spatially variable simulation results of wave arrival time and maximum surface altitude (zero to peak) and outputs a csv of coastline points with the fields arrival time, distance, and maximum height calculated for each coastline point in the raster domain.

This function first extracts coastline point coordinates using Sobel edge detection as defined by the scipy.ndimage module. The wave travel distance along a curve perpendicular to the propagating wave front is approximated using a steepest-descent path on the arrival time map (not the topographic surface). This step uses the pysheds flow distance algorithms.

Arrival time, distance from inital landslide, and maximum surface altitude values at each coastline point are exported as a csv to out_path.

Inputs:
data_path: str

path to a netcdf file with ‘arrival_time’ and ‘eta_max’ raster layers. Each layer is expected to have spatial attribute information, including ‘coords’, ‘dims’, ‘attrs’, and ‘resolution’ accessible via the rioxarray accessor .rio.

output_typestr

Type of gridded output. Options are "fgout", indicating clawpack fgout max-style output that will be read using the xarray FGMaxBackend. Alternatively, "netcdf4" indicates netcdf files.

If output_type=="fgout", then an installation of the clawpack python modules is necessary as they provide the xarray FGOutBackend. To meet this requirement, install D-Claw as described in the documentation.

netcdfs are expected to have the variables for ‘arrival_time’ and ‘eta_max’. These are clawpack standard names for the fgout max file.

out_path: str

complete filepath for output csv.

offshore_bufferfloat

Length from the shoreline to conduct the analysis at. offshore_buffer=0 will conduct the analysis at the shoreline. offshore_buffer=100 will conduct the analysis 100 m into the water from the shoreline.

routingstr

The routing method to use (default is ‘d8’). This is passed to pysheds.

plotsbool

Whether to make plots

fig_dirstr

Directory that output figure(s) will be saved to.

fig_stemstr

Stem of name to use for all figures. Default is ‘scenario’-

initial_landslidestr

Path to a polygon shapefile indicating the initial landslide extent.

Outputs:

None

This function automatically writes a csv named ‘time_distance_array.csv’ into the out_folder. One row will be generated for each shoreline point identified. The csv has the the following columns:

Table 5 Columns in time_distance_array.csv.

Column name

Column description

Units

row

Row index array coordinate

unitless

col

Column index array coordinate

unitless

x

Cell center x-coordinate in CRS

meters

y

Cell center y-coordinate in CRS

meters

time

Wave arrival time at shoreline location

seconds

distance

Distance from from landslide to shoreline location along wave travel path

meters

eta_max

Maximum simulated tsunami height at the shoreline location