dem2adcdp

The dem2adcdp module extracts depths at nodes in an ADCIRC mesh from a provided Digital Elevation Model (DEM) file.

Functions

Submodules

dem2adcdp

Assignment of depth to mesh nodes based on DEM data

@author: shinbunya

class vewutils.dem2adcdp.dem2adcdp.DEM2DP[source]

Bases: object

zonal_stats_node_cache = {}
polygon_chunk_size = 100
n2e = None
mesh = None
max_count = None
time_start = None
header = None
__init__()[source]
read_mesh(meshfile)[source]
write_mesh(meshfile)[source]
read_f13(f13file)[source]
gen_hash(lat, area)[source]
init_progressbar(header)[source]
show_progress()[source]
update_progress()[source]
init_worker()[source]
DEM2DPElem(tiffile)[source]
generate_nodal_poly(meshxy, bounds, nodes)[source]
obtain_zonal_stats_for_node(tiffile, gdfpolys, method, nodes)[source]
add_all()[source]
remove_all()[source]
add_by_polygons(polygon_filename, refresh=False)[source]
remove_by_polygons(polygon_filename, refresh=False)[source]
remove_by_polygons_outside(polygon_filename, refresh=False)[source]
add_channelnodes()[source]
remove_channelnodes()[source]
add_banknodes()[source]
remove_banknodes()[source]
add_boundarynodes()[source]
add_selected_nodes(selected_nodes_file)[source]

Add selected nodes from CSV file to target list.

Parameters:

selected_nodes_file (str) – Path to CSV file containing selected nodes with ‘node_id’ column

extract_dem_vals_on_mesh_nodes(tiffile, method, ncores=8, chunk_size_poly=100000, chunk_size_zonalstats=1000)[source]
save_cache(filename)[source]
load_cache(filename)[source]
assign_mesh_depth(min_count=100, ignore_channelnodes=False, land_only=False, submerged_only=False, min_depth=-100000.0, min_depth_tapering_end=0.0, max_depth=100000.0, deepen=False, channel_deeper_by=0.0, channel_deeper_by_threshold=10000.0, method='mean', ignore_tiff=False, ignore_land_pixels=False)[source]
vewutils.dem2adcdp.dem2adcdp.get_parser()[source]
vewutils.dem2adcdp.dem2adcdp.main(args=None)[source]

adcmesh

Created on Thu Apr 11 08:50:00 2024 Module to read and write mesh and f13 files for the ADCIRC model

@author: shinbunya

class vewutils.dem2adcdp.adcmesh.Mesh[source]

Bases: object

Class to store info in mesh file

__init__()[source]
read(meshFilename, msgout=True)[source]
generate_boundary_polygon()[source]
generate_boundary64_polygons()[source]
write(mesh_filename, msgout=True)[source]
read_boundary_polygon(filename, msgout=True)[source]
write_boundary_polygon(filename, msgout=True)[source]
write_boundary64_polygons(filename, msgout=True)[source]
class vewutils.dem2adcdp.adcmesh.F13[source]

Bases: object

Class to store info in f13 file

__init__()[source]
read(f13Filename, msgout=True)[source]