Opened 18 years ago

Closed 18 years ago

#115 closed defect (fixed)

Problem with file_boundary using a boundary sww file with no origin

Reported by: Nick Owned by: ole
Priority: high Milestone:
Component: Functionality and features Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by nick)

There seems to be a problem loading a file boundary using File_boundary if the origin of the boundary has not been set. For example using the below urs2sww (in build_dampier.py)


from anuga.shallow_water.data_manager import urs2sww

from caching import cache cache(urs2sww,

(boundaries_in_dir_name,

project.boundaries_dir_name1),

{'verbose': True,

'minlat': project.south_boundary, 'maxlat': project.north_boundary, 'minlon': project.west_boundary, 'maxlon': project.east_boundary, 'mint': 0, 'maxt': 35000,

# 'origin': domain.geo_reference.get_origin(),

'mean_stage': project.tide, 'fail_on_NaN': False}, verbose = True, )


* a sww file is created, here is the call to load and interpolate


Bf = File_boundary(project.boundaries_dir_name1 + '.sww',

domain, time_thinning=5, use_cache=True, verbose=True)


* here are the results... note the 'inf' in the interpolated results


Caching: looking for cached files /d/cit/1/cit/unixhome/nbartzis/.python_cache/_file_function[5361887147248772811]_{Result,Args,Admin}.z +------------------------------------------------------------- | Tue Nov 21 01:33:32 2006. Evaluating function _file_function +------------------------------------------------------------- | Argument: '/d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/... | Keyword Args: {'quantities': None, 'domain': Mesh: 102684 vertices, 204683 triangles, 683 boundary segments, 'interpolation_points': Array: (683, ... | Reason: No cached result +-------------------------------------------------------------

Reading /d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/dampiertest.sww File_function data obtained from: /d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/dampiertest.sww

References:

Lower left corner: [412922.456514, 7677626.654401] Start time: 0.000000

Building interpolation matrix from source mesh (780 vertices, 1450 triangles) FitInterpolate?: Building mesh FitInterpolate?: Building quad tree Interpolating (683 interpolation points, 1400 timesteps). Timesteps were thinned by a factor of 5

time step 0 of 1400 time step 141 of 1400 time step 282 of 1400 time step 423 of 1400 time step 564 of 1400 time step 705 of 1400 time step 846 of 1400 time step 987 of 1400 time step 1128 of 1400 time step 1269 of 1400


Interpolation_function (spatio-temporal) statistics:

Extent:

x in [0.000000, 101006.776851], len(x) == 780 y in [0.000000, 92448.178132], len(y) == 780 t in [0.000000, 34975.000000], len(t) == 1400

Quantities:

stage in [-4.912385, 8.462469] xmomentum in [-92.791469, 84.464149] ymomentum in [-100.180145, 107.720670]

Interpolation points (xi, eta): number of points == 683

xi in [12293.138000, 104455.822670] eta in [9282.735912, 83226.491136]

Interpolated quantities (over all timesteps):

stage at interpolation points in [-0.033441, inf] xmomentum at interpolation points in [-28.994856, inf] ymomentum at interpolation points in [-53.002702, inf]


+------------------------------------------------------- | Tue Nov 21 04:30:21 2006. Caching statistics (storing) +------------------------------------------------------- | Function: _file_function | Argument: '/d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/... | Keyword Args: {'quantities': None, 'domain': Mesh: 102684 vertices, 204683 triangles, 683 boundary segments, 'interpolation_points': Array: (683, ... | Reason: No cached result | CPU time: 10580.57 seconds | Loading time: 3.06 seconds (estimated) | | Caching dir: /d/cit/1/cit/unixhome/nbartzis/.python_cache/ | Result file: _file_function[5361887147248772811]_Result (22983934 bytes) | Args file: _file_function[5361887147248772811]_Args (138438149 bytes) | Admin file: _file_function[5361887147248772811]_Admin (684 bytes) | | Dependencies: | /d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/dampiertest.sww: Tue Nov 21 00:44:32 2006 131139736 bytes +-------------------------------------------------------

finished reading boundary file set_boundary finish set boundary Time = 0.0000, steps=0 (0) Boundary values at time 0.0000:

ocean:

stage in [ 2.40000000, inf] xmomentum in [ 0.00000000, inf] ymomentum in [ 0.00000000, inf]


* no error is thrown until 'evolve'


Traceback (most recent call last):

File "run_dampier.py", line 244, in ?

for t in domain.evolve(yieldstep = 120, finaltime = 9000):

File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/shallow_water/shallow_water_domain.py", line 461, in evolve

skip_initial_step=skip_initial_step):

File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py", line 792, in evolve

self.distribute_to_vertices_and_edges()

File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/shallow_water/shallow_water_domain.py", line 374, in distribute_to_vertices_and_edges

distribute_to_vertices_and_edges(self)

File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/shallow_water/shallow_water_domain.py", line 953, in distribute_to_vertices_and_edges

balance_deep_and_shallow(domain)

File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/shallow_water/shallow_water_domain.py", line 1205, in balance_deep_and_shallow_c

hc = wc - zc

OverflowError?: math range error


* NOW if you use this urs2sww the interpolated results are correct and the evolvtion works perfectly

Furthermore here are the directories that contain the actual code used

T:\data\western_australia\dampier_tsunami_scenario_2006\anuga\outputs\20061121_001525_build

T:\data\western_australia\dampier_tsunami_scenario_2006\anuga\outputs\20061121_012318_run

Change History (3)

comment:1 Changed 18 years ago by nick

  • Description modified (diff)
  • Owner changed from Duncan to ole

comment:2 Changed 18 years ago by nick

  • Summary changed from Can urs2sww and other converters be made independant of domain.geo_reference.get_origin to Problem with file_boundary using a boundary sww file with no origin

comment:3 Changed 18 years ago by nick

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.