Changeset 4504
- Timestamp:
- May 28, 2007, 6:08:39 PM (16 years ago)
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/damage_modelling/inundation_damage.py
r4503 r4504 141 141 interate_over = [x for x in dir_ls if base in x and x[-4:] == '.sww'] 142 142 #print "interate_over", interate_over 143 143 from os import sep 144 144 for this_sww_file in interate_over: 145 callable_sww = file_function( this_sww_file,145 callable_sww = file_function(dir+sep+this_sww_file, 146 146 quantities=quantities, 147 147 interpolation_points=points, -
anuga_core/source/anuga/shallow_water/smf.py
r4023 r4504 366 366 for i in range(N): 367 367 try: 368 if i == 10: print 'hello', x[i], x0, xr[i] 368 369 z[i] = -(am/am2) / (amin*(cosh(kappa*(yr[i]-y0)/(wi+wa)))**2) \ 369 370 * (exp(-((xr[i]-x0)/wa)**2) - \ -
anuga_work/production/broome_2006/export_results.py
r4429 r4504 1 import project , os1 import project_urs, os 2 2 import sys 3 3 … … 5 5 from os import sep 6 6 7 time_dir = '20070423_040235_run' # 7 #time_dir = '20070423_040235_run' # 8 #time_dir = '20070509_015227_run_final_4.9_nbartzis' # HAT 1 in 10000 yr wave height for Dampier 9 time_dir = '20070518_060438_run_final_0_nbartzis' # MSL 1 in 10000 yr wave height for Dampier 8 10 cellsize = 25 9 11 timestep = None 10 directory = project .output_dir12 directory = project_urs.output_dir 11 13 #name = directory + time_dir + sep + project.scenario_name 12 name = directory+time_dir+sep+project .scenario_name14 name = directory+time_dir+sep+project_urs.scenario_name 13 15 14 16 is_parallel = True … … 16 18 print 'output dir:', name 17 19 18 which_var = 2 19 if which_var == 0: # Stage 20 outname = name + '_stage' 21 quantityname = 'stage' 20 var = [2,3,4] 22 21 23 if which_var == 1: # Absolute Momentum 24 outname = name + '_momentum_i1' 25 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 22 for which_var in var: 23 if which_var == 0: # Stage 24 outname = name + '_stage' 25 quantityname = 'stage' 26 26 27 if which_var == 2: # Depth 28 outname = name + '_depth'29 quantityname = 'stage-elevation'27 if which_var == 1: # Absolute Momentum 28 outname = name + '_momentum_i1' 29 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 30 30 31 if which_var == 3: # Speed 32 outname = name + '_speed_i0'33 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed31 if which_var == 2: # Depth 32 outname = name + '_depth' 33 quantityname = 'stage-elevation' 34 34 35 if which_var == 4: # Elevation 36 outname = name + '_elevation'37 quantityname = 'elevation' #Elevation35 if which_var == 3: # Speed 36 outname = name + '_speed' 37 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 38 38 39 if which_var == 4: # Elevation 40 outname = name + '_elevation' 41 quantityname = 'elevation' #Elevation 39 42 40 41 if is_parallel == True: 42 # print 'is_parallel',is_parallel 43 for i in range(0,nodes): 44 namei = name + '_P%d_%d' %(i,nodes) 45 outnamei = outname + '_P%d_%d' %(i,nodes) 46 print 'start sww2dem for sww file %d' %(i) 47 sww2dem(namei, basename_out = outnamei, 43 if is_parallel == True: 44 # print 'is_parallel',is_parallel 45 for i in range(0,nodes): 46 namei = name + '_P%d_%d' %(i,nodes) 47 outnamei = outname + '_P%d_%d' %(i,nodes) 48 print 'start sww2dem for sww file %d' %(i) 49 sww2dem(namei, basename_out = outnamei, 50 quantity = quantityname, 51 timestep = timestep, 52 cellsize = cellsize, 53 easting_min = project_urs.e_min_area, 54 easting_max = project_urs.e_max_area, 55 northing_min = project_urs.n_min_area, 56 northing_max = project_urs.n_max_area, 57 reduction = max, 58 verbose = True, 59 format = 'asc') 60 else: 61 print 'start sww2dem' 62 sww2dem(name, basename_out = outname, 48 63 quantity = quantityname, 49 64 timestep = timestep, 50 65 cellsize = cellsize, 51 easting_min = project.e_min_area,52 easting_max = project.e_max_area,53 northing_min = project.n_min_area,54 northing_max = project.n_max_area,66 #easting_min = project.e_min_area, 67 #easting_max = project.e_max_area, 68 #northing_min = project.n_min_area, 69 #northing_max = project.n_max_area, 55 70 reduction = max, 56 71 verbose = True, 57 72 format = 'asc') 58 else: 59 print 'start sww2dem' 60 sww2dem(name, basename_out = outname, 61 quantity = quantityname, 62 timestep = timestep, 63 cellsize = cellsize, 64 easting_min = project.e_min_area, 65 easting_max = project.e_max_area, 66 northing_min = project.n_min_area, 67 northing_max = project.n_max_area, 68 reduction = max, 69 verbose = True, 70 format = 'asc') 73 -
anuga_work/production/broome_2006/run_building_inundation.py
r4314 r4504 20 20 21 21 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 22 import project 22 import project_urs 23 23 24 24 # Inputs 25 #timestampdir = '20060704_063005' # HAT 26 #timestampdir = '20060704_063112' # LAT 27 #timestampdir = '20060704_063234' # MSL 28 timestampdir = '20060515_001733' # DTED MSL 29 file_loc = project.outputdir + timestampdir + sep 30 swwfile = file_loc + project.basename + '.sww' 31 buildings_filename = project.buildings_filename 32 buildings_filename_out = file_loc + project.buildings_filename_out 25 #timestampdir = '20070509_015227_run_final_4.9_nbartzis' # HAT 26 timestampdir = '20070518_060438_run_final_0_nbartzis' # MSL 27 file_loc = project_urs.output_dir + timestampdir + sep 28 swwfile = file_loc + project_urs.scenario_name #+ '.sww' 29 buildings_filename = project_urs.buildings_filename 30 buildings_filename_out = file_loc + project_urs.buildings_filename_out 33 31 34 32 #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out) -
anuga_work/production/dampier_2006/project.py
r4430 r4504 127 127 community_KD = gauges_dir + 'community_KD.csv' 128 128 129 #buildings_filename = gauges_dir + 'dampier_res_nexis.csv'130 buildings_filename_ damage_out = 'dampier_res_nexis_modified.csv'129 buildings_filename = gauges_dir + 'Dampier_res_Project.csv' 130 buildings_filename_out = 'Dampier_res_Project_modified.csv' 131 131 ############################### 132 132 # Domain definitions -
anuga_work/production/dampier_2006/run_building_inundation.py
r4314 r4504 23 23 24 24 # Inputs 25 #timestampdir = '20060704_063005' # HAT 26 #timestampdir = '20060704_063112' # LAT 27 #timestampdir = '20060704_063234' # MSL 28 timestampdir = '20060515_001733' # DTED MSL 29 file_loc = project.outputdir + timestampdir + sep 30 swwfile = file_loc + project.basename + '.sww' 25 #timestampdir = '20070419_065050_run' # HAT 1 in 10000 yr Dampier event 26 timestampdir = '20070419_065018_run' # MSL 1 in 10000 yr Dampier event 27 file_loc = project.output_dir + timestampdir + sep 28 swwfilebasename = file_loc + project.scenario_name #+ '.sww' 31 29 buildings_filename = project.buildings_filename 32 30 buildings_filename_out = file_loc + project.buildings_filename_out 33 34 #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out)35 inundation_damage(swwfile , buildings_filename, buildings_filename_out)31 print 'hello', swwfilebasename 32 add_depth_and_momentum2csv(swwfilebasename, buildings_filename, buildings_filename_out) 33 inundation_damage(swwfilebasename, buildings_filename, buildings_filename_out) 36 34 37 35 print '\n Augmented building file written to %s \n' \ -
anuga_work/production/exmouth_2006/run_building_inundation.py
r4314 r4504 23 23 24 24 # Inputs 25 #timestampdir = '20060704_063005' # HAT 26 #timestampdir = '20060704_063112' # LAT 27 #timestampdir = '20060704_063234' # MSL 28 timestampdir = '20060515_001733' # DTED MSL 29 file_loc = project.outputdir + timestampdir + sep 30 swwfile = file_loc + project.basename + '.sww' 25 #timestampdir = '' # HAT 26 #timestampdir = '' # MSL 27 file_loc = project.output_dir + timestampdir + sep 28 swwfile = file_loc + project.scenario_name + '.sww' 31 29 buildings_filename = project.buildings_filename 32 30 buildings_filename_out = file_loc + project.buildings_filename_out -
anuga_work/production/onslow_2006/export_results.py
r4479 r4504 5 5 from os import sep 6 6 7 time_dir = '20070507_215717_run_final_1.5_nbartzis' # HAT 1 in Dampier 10000 yr7 #time_dir = '20070507_215717_run_final_1.5_nbartzis' # HAT 1 in Dampier 10000 yr 8 8 #time_dir = '20070517_061654_run_final_0.0_nbartzis' # MSL 1 in Dampier 10000 yr 9 9 #time_dir = '' # HAT 1 in Broome 10000 yr … … 15 15 #time_dir = '' # HAT 1 in Exmouth 10000 yr 16 16 #time_dir = '' # MSL 1 in Exmouth 10000 yr 17 cellsize = 25 17 time_dir = '20060704_063005' # 2006 simulation HAT Mw9 18 #cellsize = 30 19 cellsize = 250 18 20 timestep = None 19 21 directory = project.outputdir 20 22 #name = directory + time_dir + sep + project.scenario_name 21 name = directory+time_dir+sep+project.scenario_name 23 #name = directory+time_dir+sep+project.scenario_name 24 name = directory+time_dir+sep+'source' 22 25 23 is_parallel = True 26 is_parallel = False 27 #is_parallel = True 24 28 if is_parallel == True: nodes = 4 25 29 print 'output dir:', name 26 30 27 var = [2,3,4] # depth and speed 31 #var = [2,3,4] # depth and speed 32 var = [3] # depth and speed 28 33 29 34 for which_var in var: … … 71 76 timestep = timestep, 72 77 cellsize = cellsize, 73 easting_min = project.e_min_area,74 easting_max = project.e_max_area,75 northing_min = project.n_min_area,76 northing_max = project.n_max_area,78 #easting_min = project.e_min_area, 79 #easting_max = project.e_max_area, 80 #northing_min = project.n_min_area, 81 #northing_max = project.n_max_area, 77 82 reduction = max, 78 83 verbose = True, -
anuga_work/production/onslow_2006/project.py
r4477 r4504 133 133 # region to export 134 134 135 e_min_area = 300000136 e_max_area = 3 10000137 n_min_area = 760 0000138 n_max_area = 76 10000135 e_min_area = 290500 136 e_max_area = 321500 137 n_min_area = 7601550 138 n_max_area = 7620000 139 139 140 140 # region to export to make elevation map: JS 22/9/06 - NOTE, this won't -
anuga_work/production/onslow_2006/run_building_inundation.py
r4314 r4504 20 20 21 21 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 22 import project 22 import project_urs 23 23 24 24 # Inputs 25 #timestampdir = '20060704_063005' # HAT 26 #timestampdir = '20060704_063112' # LAT 27 #timestampdir = '20060704_063234' # MSL 28 timestampdir = '20060515_001733' # DTED MSL 29 file_loc = project.outputdir + timestampdir + sep 30 swwfile = file_loc + project.basename + '.sww' 31 buildings_filename = project.buildings_filename 32 buildings_filename_out = file_loc + project.buildings_filename_out 25 #timestampdir = '20070507_215717_run_final_1.5_nbartzis' # HAT 26 timestampdir = '20070518_021050_run_final_0.0_nbartzis' # MSL 27 file_loc = project_urs.output_dir + timestampdir + sep 28 swwfile = file_loc + project_urs.scenario_name #+ '.sww' 29 buildings_filename = project_urs.buildings_filename 30 buildings_filename_out = file_loc + project_urs.buildings_filename_out 33 31 34 32 #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out) -
anuga_work/production/pt_hedland_2006/export_results.py
r4479 r4504 1 import project , os1 import project_urs, os 2 2 import sys 3 3 … … 5 5 from os import sep 6 6 7 time_dir = '' # HAT 1 in Dampier 10000 yr8 #time_dir = '' # MSL 1 in Dampier 10000 yr7 #time_dir = '20070518_020117_run_final_3.6_nbartzis' # HAT 1 in Dampier 10000 yr 8 time_dir = '20070520_225029_run_final_0.0_nbartzis' # MSL 1 in Dampier 10000 yr 9 9 #time_dir = '' # HAT 1 in Broome 10000 yr 10 10 #time_dir = '' # MSL 1 in Broome 10000 yr … … 18 18 cellsize = 25 19 19 timestep = None 20 directory = project .output_dir20 directory = project_urs.output_dir 21 21 22 name = directory+time_dir+sep+project .scenario_name22 name = directory+time_dir+sep+project_urs.scenario_name 23 23 24 is_parallel = False24 is_parallel = True 25 25 if is_parallel == True: nodes = 4 26 26 print 'output dir:', name 27 27 28 var = [2,3 ] # depth and speed28 var = [2,3,4] # depth and speed 29 29 30 30 for which_var in var: … … 59 59 timestep = timestep, 60 60 cellsize = cellsize, 61 easting_min = project .e_min_area,62 easting_max = project .e_max_area,63 northing_min = project .n_min_area,64 northing_max = project .n_max_area,61 easting_min = project_urs.e_min_area, 62 easting_max = project_urs.e_max_area, 63 northing_min = project_urs.n_min_area, 64 northing_max = project_urs.n_max_area, 65 65 reduction = max, 66 66 verbose = True, -
anuga_work/production/pt_hedland_2006/run_building_inundation.py
r4320 r4504 20 20 21 21 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 22 import project 22 import project_urs 23 23 24 24 # Inputs 25 #timestampdir = '20060704_063005' # HAT 26 #timestampdir = '20060704_063112' # LAT 27 #timestampdir = '20060704_063234' # MSL 28 timestampdir = '20060515_001733' # DTED MSL 29 file_loc = project.outputdir + timestampdir + sep 30 swwfile = file_loc + project.basename + '.sww' 31 buildings_filename = project.buildings_filename 32 buildings_filename_out = file_loc + project.buildings_filename_out 25 #timestampdir = '20070518_020117_run_final_3.6_nbartzis' # HAT 26 timestampdir = '20070520_225029_run_final_0.0_nbartzis' # MSL 27 file_loc = project_urs.output_dir + timestampdir + sep 28 swwfile = file_loc + project_urs.scenario_name #+ '.sww' 29 buildings_filename = project_urs.buildings_filename 30 buildings_filename_out = file_loc + project_urs.buildings_filename_out 33 31 34 32 #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out) 35 33 inundation_damage(swwfile, buildings_filename, buildings_filename_out) 36 #inundation_damage(swwfile, buildings_filename, buildings_filename_out)37 34 38 35 print '\n Augmented building file written to %s \n' \ -
anuga_work/production/wollongong_2006/project_slide.py
r4346 r4504 56 56 polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep 57 57 58 gauge_filename = gaugedir + 'gong_gauges.csv' 58 #gauge_filename = gaugedir + 'gong_gauges.csv' 59 gauge_filename = gaugedir + 'gauges.csv' 59 60 codedir = getcwd()+sep 60 61 codedirname = codedir + 'project_slide.py'
Note: See TracChangeset
for help on using the changeset viewer.