Changeset 6288
- Timestamp:
- Feb 6, 2009, 9:04:49 AM (16 years ago)
- Location:
- anuga_work/production/australia_ph2/sydney
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py
r6241 r6288 31 31 ##time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt' 32 32 ##time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt' 33 time_dir3 = '200901 23_155045_run_final_0_7875_250m_large_jgriffin'34 time_dir4 = '20090123_154945_run_final_0_7875_250m_small_jgriffin'33 time_dir3 = '20090130_160955_run_final_0_7875_250m_vlarge_jgriffin' 34 #time_dir4 = '20090123_154945_run_final_0_7875_250m_small_jgriffin' 35 35 ##time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt' 36 36 ##time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt' 37 37 38 38 39 time_dirs = [time_dir3 , time_dir4] #, time_dir3, time_dir4, time_dir5, time_dir6]39 time_dirs = [time_dir3]#, time_dir4] #, time_dir3, time_dir4, time_dir5, time_dir6] 40 40 41 41 for time_dir in time_dirs: … … 62 62 63 63 generate_filename = [] 64 input_ascii = glob.glob(folder + ' sydney_All_stage.asc')64 input_ascii = glob.glob(folder + '*stage_max.asc') 65 65 print time_dir 66 66 -
anuga_work/production/australia_ph2/sydney/build_boundary_7875.py
r6176 r6288 64 64 65 65 scenario_name=project_250m.scenario_name 66 order_filename=os.path.join(project_250m. order_filename_dir)66 order_filename=os.path.join(project_250m.urs_boundary_name) 67 67 68 68 print 'reading', order_filename -
anuga_work/production/australia_ph2/sydney/build_model.py
r6286 r6288 89 89 90 90 print 'Export combined DEM file' 91 G_clip.export_points_file(project.combined_ dir_name+ '.pts')91 G_clip.export_points_file(project.combined_elevation + '.pts') 92 92 print 'Do txt version too' 93 93 # Use for comparision in ARC 94 G_clip.export_points_file(project.combined_ dir_name+ '.txt')94 G_clip.export_points_file(project.combined_elevation + '.txt') 95 95 -
anuga_work/production/australia_ph2/sydney/export_results_max.py
r6176 r6288 20 20 directory = project_250m.output_dir 21 21 22 time_dir1 = '20081125_135917_run_final_0_27283_250m_none_lfountai' 23 24 time_dirs = [time_dir1]#, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 22 time_dir1 = '20090123_155045_run_final_0_7875_250m_large_jgriffin' 23 #time_dir2 = '20090123_155045_run_final_0_7875_250m_large_jgriffin' 24 #time_dir3 = '20090123_154945_run_final_0_7875_250m_small_jgriffin' 25 time_dirs = [time_dir1]#,time_dir2,time_dir3]#, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 25 26 26 27 #cellsize = 20 … … 48 49 49 50 # one or more key strings from var_equations above 50 var = ['stage', 'speed'] 51 #var = ['stage', 'speed','depth'] 52 var = ['elevation'] 51 53 52 54 ###### … … 78 80 79 81 name1 = directory+time_dir+sep+project_250m.scenario_name 80 name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_59580_0'82 #name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_52620_0' 81 83 # name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_78360_0' 82 84 83 names = [name1 , name2] #, name3]85 names = [name1]#, name2] #, name3] 84 86 85 87 asc_name = [] -
anuga_work/production/australia_ph2/sydney/run_sydney_250m.py
r6176 r6288 26 26 from os import mkdir, access, F_OK 27 27 from shutil import copy 28 from math import pi, sin, exp 28 29 import time 29 30 import sys … … 31 32 # Related major packages 32 33 from anuga.shallow_water import Domain 34 from anuga.shallow_water.shallow_water_domain import Transmissive_stage_zero_momentum_boundary 33 35 from anuga.shallow_water import Dirichlet_boundary 34 36 from anuga.shallow_water import File_boundary 35 37 from anuga.shallow_water import Reflective_boundary 36 38 from anuga.shallow_water import Field_boundary 39 from anuga.shallow_water import Time_boundary 37 40 from Numeric import allclose 38 41 from anuga.shallow_water.data_manager import export_grid, create_sts_boundary … … 76 79 # Domain definitions 77 80 #----------------------------------------------------------------------- 78 79 # Read in boundary from ordered sts file 80 urs_bounding_polygon=create_sts_boundary(os.path.join(project_250m.boundaries_dir_event,project_250m.scenario_name)) 81 82 # Reading the landward defined points, this incorporates the original clipping 83 # polygon minus the 100m contour 84 landward_bounding_polygon = read_polygon(project_250m.landward_dir) 85 86 # Combine sts polyline with landward points 87 bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 88 89 # counting segments 90 N = len(urs_bounding_polygon)-1 91 92 # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N 93 boundary_tags={'back': [N+1,N+2,N+3,N+4,N+5,N+6,N+7,N+8,N+9,N+10,N+11,N+12,N+13,N+14,N+15,N+16,N+17], 'side': [N,N+18], 'ocean': range(N)} 94 81 ## 82 ## # Read in boundary from ordered sts file 83 ## urs_bounding_polygon=create_sts_boundary(os.path.join(project_250m.boundaries_dir_event,project_250m.scenario_name)) 84 ## 85 ## # Reading the landward defined points, this incorporates the original clipping 86 ## # polygon minus the 100m contour 87 ## landward_bounding_polygon = read_polygon(project_250m.landward_dir) 88 ## 89 ## # Combine sts polyline with landward points 90 ## bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 91 ## 92 ## # counting segments 93 ## N = len(urs_bounding_polygon)-1 94 ## print 'N'+str(N) 95 ## # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N 96 ## boundary_tags={'back': [N+1,N+2,N+3,N+4,N+5,N+6,N+7,N+8,N+9,N+10,N+11,N+12,N+13,N+14,N+15,N+16,N+17,N+18,N+19], 'side': [N,N+20], 'ocean': range(N)} 97 if project_250m.area =='large': 98 land = [2,3,4,] 99 sea = [0] 100 side1 = [1] 101 side2 = [5] 102 bounding_polygon = project_250m.poly_all 103 boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2} 104 elif project_250m.area =='small': 105 land = [2,3,4,] 106 sea = [0] 107 side1 = [1] 108 side2 = [5] 109 bounding_polygon = project_250m.poly_all 110 boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2} 111 elif project_250m.area =='medium': 112 land = [2,3,4] 113 sea = [0] 114 side1 = [1] 115 side2 = [5] 116 bounding_polygon = project_250m.poly_all 117 boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2} 118 elif project_250m.area =='vlarge': 119 land = [9,10,11,12,13,14] 120 sea = [0,1,2,3,4,5,6,7] 121 side1 = [8] 122 side2 = [15] 123 bounding_polygon = project_250m.poly_all 124 boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2} 125 else: 126 print 'area not defined therefore bondary_tags not defined' 95 127 #-------------------------------------------------------------------------- 96 128 # Create the triangular mesh based on overall clipping polygon with a tagged … … 109 141 interior_regions=project_250m.interior_regions, 110 142 filename=project_250m.meshes_dir_name, 111 use_cache= True,143 use_cache=False, 112 144 verbose=True) 113 145 … … 177 209 Br = Reflective_boundary(domain) 178 210 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 179 Bt r= Transmissive_stage_zero_momentum_boundary(domain)180 181 print 'Available boundary tags', domain.get_boundary_tags()182 Bf = Field_boundary(boundary_urs_out+'.sts', # Change from file_boundary183 domain, mean_stage= project_250m.tide,184 time_thinning=1,185 default_boundary=Bd,186 use_cache=True,187 verbose = True,188 boundary_polygon=bounding_polygon)211 Bt = Transmissive_stage_zero_momentum_boundary(domain) 212 Rb = Time_boundary (domain, f=lambda t: [(sin(t*pi/600) * exp(-(t/3600)**2)), 0.0, 0.0]) 213 ## print 'Available boundary tags', domain.get_boundary_tags() 214 ## Bf = Field_boundary(boundary_urs_out+'.sts', # Change from file_boundary 215 ## domain, mean_stage= project_250m.tide, 216 ## time_thinning=1, 217 ## default_boundary=Bd, 218 ## use_cache=False, 219 ## verbose = True, 220 ## boundary_polygon=bounding_polygon) 189 221 190 222 domain.set_boundary({'back': Br, 191 'side': Btr, 192 'ocean': Bf}) 223 'side1': Bt, 224 'side2':Bt, 225 'ocean':Rb}) 193 226 194 227 kwargs['input_start_time']=domain.starttime
Note: See TracChangeset
for help on using the changeset viewer.