Changeset 4567 for anuga_core/source/anuga/shallow_water/data_manager.py
- Timestamp:
- Jun 28, 2007, 5:27:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r4563 r4567 89 89 pmesh_to_domain_instance 90 90 from anuga.abstract_2d_finite_volumes.util import get_revision_number, \ 91 remove_lone_verts, sww2timeseries 91 remove_lone_verts, sww2timeseries, get_centroid_values 92 92 from anuga.load_mesh.loadASCII import export_mesh_file 93 93 # formula mappings … … 5448 5448 5449 5449 def get_maximum_inundation_data(filename, polygon=None, time_interval=None, 5450 use_centroid_values=False, 5450 5451 verbose=False): 5451 5452 """Compute maximum run up height from sww file. … … 5513 5514 elevation = fid.variables['elevation'][:] 5514 5515 stage = fid.variables['stage'][:] 5516 5517 5518 # Here's where one could convert nodal information to centroid information 5519 # but is probably something we need to write in C. 5520 # Here's a Python thought which is NOT finished!!! 5521 if use_centroid_values is True: 5522 x = get_centroid_values(x, volumes) 5523 y = get_centroid_values(y, volumes) 5524 elevation = get_centroid_values(elevation, volumes) 5515 5525 5516 5526 … … 5574 5584 maximal_runup_location = None 5575 5585 for i in timesteps: 5576 depth = stage[i,:] - elevation 5586 if use_centroid_values is True: 5587 stage_i = get_centroid_values(stage[i,:], volumes) 5588 else: 5589 stage_i = stage[i,:] 5590 5591 depth = stage_i - elevation 5577 5592 5578 5593 # Get wet nodes i.e. nodes with depth>0 within given region and timesteps
Note: See TracChangeset
for help on using the changeset viewer.