Opened 18 years ago
Closed 18 years ago
#143 closed defect (invalid)
setting initial conditions using Polygon_function
Reported by: | jane.sexton@… | Owned by: | duncan |
---|---|---|---|
Priority: | highest | Milestone: | FESA - Karratha Scenario |
Component: | Functionality and features | Version: | 1.0 |
Severity: | major | Keywords: | |
Cc: |
Description
When setting high tide initial conditions, we want to ensure that onshore areas under the high tide value are not filled with water. The idea is to allow the high tide to be applied in the ocean only and set stage to zero on the land. The following lines in run_dampier.py show how this is done:
from polygon import * IC = Polygon_function( [(project.poly_mainland, 0.)], default = tide) domain.set_quantity('stage', IC)
However, it doesn't appear to be working - see
gneiss\gem5nhi\data\western_australia\dampier_tsunami_scenario_2006\anuga\outputs\20070419_065050_run\testIC.ppt
I have included the polygon into a test which has been checked in to test_polygon.py. It appears to pass this test.
Nick ran another example with default = 200 - see dampier.sww in 20070424_043504_run.
Change History (3)
comment:1 Changed 18 years ago by ole
- Owner changed from ole to duncan
comment:2 Changed 18 years ago by ole
- Priority changed from normal to highest
- Severity changed from normal to major
comment:3 Changed 18 years ago by Duncan <duncan@…>
- Resolution set to invalid
- Status changed from new to closed
The polygon points are absolute values. domain.set_quantity uses relative values. If the geo_ref of the domain is passed into polygon_function it will make the polygon points relative. This will give the desired results.
Jane showed a test where it passes. My guess is that this has to do with georeferencing . In other words whereas the polygon which is supplied to Polygon_function is in absolute UTM coordinates, perhaps the x,y coordinatios passed into the function by set_quantity is relative to the origin of domain. Would you be able to have a look at it Duncan?