1 | # -*- coding: cp1252 -*- |
---|
2 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
3 | """ |
---|
4 | |
---|
5 | from os import sep, environ, getenv, getcwd |
---|
6 | from os.path import expanduser |
---|
7 | import sys |
---|
8 | from time import localtime, strftime, gmtime |
---|
9 | from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles |
---|
10 | from anuga.utilities.system_tools import get_user_name, get_host_name |
---|
11 | from anuga.shallow_water.data_manager import urs2sts,create_sts_boundary |
---|
12 | from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon |
---|
13 | |
---|
14 | # file and system info |
---|
15 | #--------------------------------- |
---|
16 | #codename = 'project.py' |
---|
17 | |
---|
18 | home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent diruser = get_user_name() |
---|
19 | muxhome = getenv('MUXHOME') |
---|
20 | user = get_user_name() |
---|
21 | host = get_host_name() |
---|
22 | |
---|
23 | # INUNDATIONHOME is the inundation directory, not the data directory. |
---|
24 | |
---|
25 | #time stuff |
---|
26 | time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir |
---|
27 | gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir |
---|
28 | build_time = time+'_build' |
---|
29 | run_time = time+'_run' |
---|
30 | print 'gtime: ', gtime |
---|
31 | |
---|
32 | #Making assumptions about the location of scenario data |
---|
33 | state = 'anuga_validation' |
---|
34 | scenario = 'benchmark_problem_4' |
---|
35 | sww_name = 'slide' |
---|
36 | |
---|
37 | alpha = 0.1 |
---|
38 | friction=0.01 |
---|
39 | starttime=0 |
---|
40 | finaltime=500 |
---|
41 | remainder_res = 1. |
---|
42 | export_cellsize=25 |
---|
43 | |
---|
44 | dir_comment='_'+'finaltime'+str(finaltime)+'_'+str(user) |
---|
45 | |
---|
46 | anuga_dir = home+state+sep+scenario+sep+'anuga'+sep |
---|
47 | |
---|
48 | meshes_dir = anuga_dir+'meshes'+sep |
---|
49 | meshes_dir_name = meshes_dir + sww_name |
---|
50 | |
---|
51 | polygons_dir = anuga_dir+'polygons'+sep |
---|
52 | |
---|
53 | #output locations |
---|
54 | output_dir = anuga_dir+'outputs'+sep |
---|
55 | output_run_time_dir = anuga_dir+'outputs'+sep+run_time+dir_comment+sep |
---|
56 | output_run_time_dir_name = output_run_time_dir + sww_name #Used by post processing |
---|
57 | |
---|
58 | #gauges |
---|
59 | gauge_name = 'gauge_location.csv' |
---|
60 | gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep |
---|
61 | gauges_dir_name = gauges_dir + gauge_name |
---|
62 | |
---|
63 | |
---|
64 | ############################### |
---|
65 | # Interior region definitions |
---|
66 | ############################### |
---|
67 | |
---|
68 | #Initial bounding polygon for data clipping |
---|
69 | #poly_all = read_polygon(polygons_dir+'poly_all.csv') |
---|
70 | #res_poly_all = 100000 |
---|
71 | |
---|
72 | |
---|
73 | ################################################################### |
---|
74 | # Clipping regions for export to asc and regions for clipping data |
---|
75 | ################################################################### |
---|
76 | |
---|
77 | |
---|
78 | #Geordie Bay extract ascii grid |
---|
79 | xminGeordie = 358000 |
---|
80 | xmaxGeordie = 362000 |
---|
81 | yminGeordie = 6458500 |
---|
82 | ymaxGeordie = 6461000 |
---|
83 | |
---|
84 | #Sorrento extract ascii grid |
---|
85 | xminSorrento = 379000 |
---|
86 | xmaxSorrento = 382500 |
---|
87 | yminSorrento = 6477000 |
---|
88 | ymaxSorrento = 6480000 |
---|
89 | |
---|
90 | #Fremantle extract ascii grid |
---|
91 | xminFremantle = 376000 |
---|
92 | xmaxFremantle = 388000 |
---|
93 | yminFremantle = 6449000 |
---|
94 | ymaxFremantle = 6461000 |
---|
95 | |
---|
96 | #Rockingham extract ascii grid |
---|
97 | xminRockingham = 373500 |
---|
98 | xmaxRockingham = 385500 |
---|
99 | yminRockingham = 6424000 |
---|
100 | ymaxRockingham = 6433000 |
---|
101 | |
---|