Changes between Initial Version and Version 1 of Ticket #115


Ignore:
Timestamp:
Nov 21, 2006, 4:10:35 PM (18 years ago)
Author:
nick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #115

    • Property Owner changed from Duncan to ole
  • Ticket #115 – Description

    initial v1  
    1 this ticket is about making the run script more simple
     1There 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)
    22
    3 It would be very useful if urs2sww were independant of the origin in the domain created.... This stems from the desire to have a build_???.py and a run_???.py.  build_???.py would create the DEM and boundary files and needs only to be run only at the begin of the scenario. therefore simplifing the run script
     3-----------------------
     4from anuga.shallow_water.data_manager import urs2sww
    45
    5 OR
     6from caching import cache
     7cache(urs2sww,
     8      (boundaries_in_dir_name,
     9       project.boundaries_dir_name1),
     10      {'verbose': True,
     11       'minlat': project.south_boundary,
     12       'maxlat': project.north_boundary,
     13       'minlon': project.west_boundary,
     14       'maxlon': project.east_boundary,
     15       'mint': 0, 'maxt': 35000,
     16#       'origin': domain.geo_reference.get_origin(),
     17       'mean_stage': project.tide,
     18       'fail_on_NaN': False},
     19       verbose = True,
     20       )
     21--------------------
    622
    7 allow the reading in of geospatial_data objects, the addition and exporting to file to be cached.
     23*** a sww file is created, here is the call to load and interpolate
     24
     25----------------
     26Bf = File_boundary(project.boundaries_dir_name1 + '.sww',
     27                  domain, time_thinning=5, use_cache=True, verbose=True)
     28--------------------
     29
     30*** here are the results... note the 'inf' in the interpolated results
     31
     32-------------------
     33Caching: looking for cached files /d/cit/1/cit/unixhome/nbartzis/.python_cache/_file_function[5361887147248772811]_{Result,Args,Admin}.z
     34+-------------------------------------------------------------
     35| Tue Nov 21 01:33:32 2006. Evaluating function _file_function
     36+-------------------------------------------------------------
     37| Argument:     '/d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/...
     38| Keyword Args: {'quantities': None, 'domain': Mesh: 102684 vertices, 204683 triangles, 683 boundary segments, 'interpolation_points': Array: (683, ...
     39| Reason:       No cached result
     40+-------------------------------------------------------------
     41
     42Reading /d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/dampiertest.sww
     43File_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
     44  References:
     45    Lower left corner: [412922.456514, 7677626.654401]
     46    Start time:   0.000000
     47Building interpolation matrix from source mesh (780 vertices, 1450 triangles)
     48FitInterpolate: Building mesh
     49FitInterpolate: Building quad tree
     50Interpolating (683 interpolation points, 1400 timesteps). Timesteps were thinned by a factor of 5
     51 time step 0 of 1400
     52 time step 141 of 1400
     53 time step 282 of 1400
     54 time step 423 of 1400
     55 time step 564 of 1400
     56 time step 705 of 1400
     57 time step 846 of 1400
     58 time step 987 of 1400
     59 time step 1128 of 1400
     60 time step 1269 of 1400
     61------------------------------------------------
     62Interpolation_function (spatio-temporal) statistics:
     63  Extent:
     64    x in [0.000000, 101006.776851], len(x) == 780
     65    y in [0.000000, 92448.178132], len(y) == 780
     66    t in [0.000000, 34975.000000], len(t) == 1400
     67  Quantities:
     68    stage in [-4.912385, 8.462469]
     69    xmomentum in [-92.791469, 84.464149]
     70    ymomentum in [-100.180145, 107.720670]
     71  Interpolation points (xi, eta): number of points == 683
     72    xi in [12293.138000, 104455.822670]
     73    eta in [9282.735912, 83226.491136]
     74  Interpolated quantities (over all timesteps):
     75    stage at interpolation points in [-0.033441, inf]
     76    xmomentum at interpolation points in [-28.994856, inf]
     77    ymomentum at interpolation points in [-53.002702, inf]
     78------------------------------------------------
     79
     80+-------------------------------------------------------
     81| Tue Nov 21 04:30:21 2006. Caching statistics (storing)
     82+-------------------------------------------------------
     83| Function:     _file_function
     84| Argument:     '/d/xrd/gem/2/ramp/risk_assessment_methods_project/inundation/data/western_australia/dampier_tsunami_scenario_2006/anuga/boundaries/...
     85| Keyword Args: {'quantities': None, 'domain': Mesh: 102684 vertices, 204683 triangles, 683 boundary segments, 'interpolation_points': Array: (683, ...
     86| Reason:       No cached result
     87| CPU time:     10580.57 seconds
     88| Loading time: 3.06 seconds (estimated)
     89|
     90| Caching dir:  /d/cit/1/cit/unixhome/nbartzis/.python_cache/
     91| Result file:  _file_function[5361887147248772811]_Result (22983934 bytes)
     92| Args file:    _file_function[5361887147248772811]_Args (138438149 bytes)
     93| Admin file:   _file_function[5361887147248772811]_Admin (684 bytes)
     94|
     95| Dependencies: 
     96|  /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
     97+-------------------------------------------------------
     98
     99finished reading boundary file
     100set_boundary
     101finish set boundary
     102Time = 0.0000, steps=0 (0)
     103Boundary values at time 0.0000:
     104    ocean:
     105        stage     in [  2.40000000,          inf]
     106        xmomentum in [  0.00000000,          inf]
     107        ymomentum in [  0.00000000,          inf]
     108
     109----------------
     110
     111*** no error is thrown until 'evolve'
     112
     113--------------------
     114Traceback (most recent call last):
     115  File "run_dampier.py", line 244, in ?
     116    for t in domain.evolve(yieldstep = 120, finaltime = 9000):
     117  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/shallow_water/shallow_water_domain.py", line 461, in evolve
     118    skip_initial_step=skip_initial_step):
     119  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py", line 792, in evolve
     120    self.distribute_to_vertices_and_edges()
     121  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
     122    distribute_to_vertices_and_edges(self)
     123  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
     124    balance_deep_and_shallow(domain)
     125  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
     126    hc = wc - zc
     127OverflowError: math range error
     128------------------------------------
     129
     130*** NOW if you use this urs2sww the interpolated results are correct and the evolvtion works perfectly
     131
     132Furthermore here are the directories that contain the actual code used
     133
     134T:\data\western_australia\dampier_tsunami_scenario_2006\anuga\outputs\20061121_001525_build
     135
     136T:\data\western_australia\dampier_tsunami_scenario_2006\anuga\outputs\20061121_012318_run