source: anuga_work/production/carnarvon/run_boundary_points.py @ 6514

Last change on this file since 6514 was 5382, checked in by kristy, 16 years ago

urs boundary points

File size: 3.3 KB
Line 
1"""Script for running tsunami inundation scenario for Dampier, WA, Australia.
2
3Source data such as elevation and boundary data is assumed to be available in
4directories specified by project.py
5The output sww file is stored in project.output_run_time_dir
6
7The scenario is defined by a triangular mesh created from project.polygon,
8the elevation data and a simulated tsunami generated with URS code.
9
10Ole Nielsen and Duncan Gray, GA - 2005 and Jane Sexton, Nick Bartzis, GA - 2006
11"""
12
13#------------------------------------------------------------------------------
14# Import necessary modules
15#------------------------------------------------------------------------------
16
17# Standard modules
18
19# # Related major packages
20# from anuga.shallow_water import Domain
21from anuga.shallow_water.data_manager import URS_points_needed_to_file, \
22     urs_ungridded2sww
23#import project                 # Definition of file names and polygons
24
25#-----------------------------------------------------------------------------
26# With no project file
27#-----------------------------------------------------------------------------
28from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
29from os import sep, environ, getenv, getcwd ,umask
30from anuga.utilities.system_tools import get_user_name, get_host_name
31
32# INUNDATIONHOME is the inundation directory, not the data directory.
33home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir   
34user = get_user_name()
35host = get_host_name()
36
37#Making assumptions about the location of scenario data
38state = 'western_australia'
39scenario_name = 'carnarvon'
40scenario = 'carnarvon_tsunami_scenario'
41
42anuga_dir = home+state+sep+scenario+sep+'anuga'+sep
43polygons_dir = anuga_dir+'polygons'+sep
44
45#boundaries locations
46boundaries_in_dir = anuga_dir + sep + 'boundaries' + sep + scenario_name
47boundaries_dir = anuga_dir+'boundaries'+sep
48boundaries_dir_name = boundaries_dir + scenario_name
49
50# bounding polygon for study area
51poly_all = read_polygon(polygons_dir+'poly_all.csv')
52
53
54
55#-----------------------------------------------------------------------------
56# run_boundary_points
57#-----------------------------------------------------------------------------
58 
59LL_LAT = -50.0          #ll_lat - lower left latitude, in decimal degrees
60LL_LONG = 80.0          #ll-long - lower left longitude, in decimal degrees
61GRID_SPACING = 2.0/60.0 #grid_spacing - in deciamal degrees
62LAT_AMOUNT = 4800       #lat_amount - number of latitudes
63LONG_AMOUNT = 3600      #long_amount- number of longs
64ZONE = 49
65
66#------------------------------------------------------------------------------
67# Copy scripts to time stamped output directory and capture screen
68# output to file
69#------------------------------------------------------------------------------
70poly = poly_all
71print "poly", poly
72print "project.boundaries_in_dir",boundaries_in_dir
73URS_points_needed_to_file(boundaries_in_dir,poly, ZONE,
74                          LL_LAT, LL_LONG,GRID_SPACING,LAT_AMOUNT, LONG_AMOUNT,export_csv=True)
75#URS_points_needed_to_file(project.boundaries_dir_name5,poly, export_csv=True, zone=50)
76#URS_points_needed_to_file(project.boundaries_dir_name5,poly, export_csv=True)
77#urs_ungridded2sww(project.boundaries_in_dir_name2, project.boundaries_dir_name5, mean_stage= project.tide,  verbose=True)
Note: See TracBrowser for help on using the repository browser.