Assigning Bathymetry

Converting a 2dm file to gr3 or between gr3 or 2dm and shapefile

convert_mesh

Convert a mesh from one format to another. The format is decided by the extensions automatically.

Usage

convert_mesh [OPTIONS]

Options

--input <input>

Required Input mesh file.

--output <output>

Required Output mesh file.

--crs <crs>

CRS string for the projection.

-h, --help

Show this message and exit.

Assigning depths from prioritized DEMs

These tools are used by the preprocessor but also work with functions that can be used generically and consistently with SCHISM.

stacked_dem_fill

Smoother for complex topography

Often it is necessary to incorporate inudated marshy areas where elevations are poorly sampled and contours are tortuous. The script contour_smooth.py uses minmax curvature flow (Malladi and Sethian) to impose a minimum length scale of change for contours, essentially unraveling the features that are most contorted.

contour_smooth

Uses the min-max curvature flow algorithm of Malladi and Sethian to simplify DEM topography.

The script requires a subcommand like: $ contour_smooth.py smooth The most basic subcommand is smooth. Given limited efficiency at the moment, the script is generally run on a small area and dumps intermediate points in the processing as numpy arrays so you can view the differences using the contour_smooth.py view subcommand.

You can get subject-specific help on a subcommand by typing: $ contour_smooth.py subcommand –help

Usage

contour_smooth [OPTIONS] COMMAND [ARGS]...

Options

-h, --help

Show this message and exit.

save

Save dumped DEM based on .npy dump and the original DEM it came from.

Usage

contour_smooth save [OPTIONS]

Options

-h, --help

Show this message and exit.

--dumpfile <dumpfile>

Required Dump file from smoothing (npy format).

--original <original>

Required Original DEM (GeoTiff).

--outfile <outfile>

Required Output file that will be saved (GeoTiff format).

smooth

Smooth the input DEM.

Usage

contour_smooth smooth [OPTIONS]

Options

-h, --help

Show this message and exit.

--input <input>

Required Input file name, file in tiff format.

--scales <scales>

Scales (in multiples of DEM side length) over which to smooth. The sequence [1,2,3,4] is an example, where the smoothing is gradually introduced at 10m, 20m, 30m and 40m for a 10m DEM.

--nstep <nstep>

Number of pseudo time steps to resolve integration. Default is 40.

--max_time <max_time>

Pseudo time representing final time step. Default is 4.0.

--report_interval <report_interval>

Intermediate interval at which integration will be segmented and smoothed DEMs will be dumped. For example, if –max_time is 2.0 and –report_interval is 0.1, you will get 20 intermediate reports.

view

View two versions of the smoothed DEM based on their .npy dump.

Usage

contour_smooth view [OPTIONS] FILE0 FILE1

Options

-h, --help

Show this message and exit.

--levels <levels>

Contour levels.

--vmin <vmin>

Minimum elevation in color bar.

--vmax <vmax>

Maximum elevation in color bar.

Arguments

FILE0

Required argument

FILE1

Required argument

Optimizing depths for volume

A mesh draped over noisy bathymetry data does not necessarily represent important moments such as volumes and vertical face areas smoothly and realistically. To better represent these facets of the geometry, we compare the volumetric quantities that come from SCHISM shape functions (which are much like a TIN) to a higher order quadrature using the DEM with bilinear interpolation. The quadrature is more accurate, and also incorporates more sample points.