Changeset 6217
- Timestamp:
- Jan 20, 2009, 2:04:09 PM (16 years ago)
- Location:
- anuga_work/production/australia_ph2/dampier
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/australia_ph2/dampier/export_results_max.py
r6204 r6217 20 20 directory = project_250m.output_dir 21 21 22 ##time_dir1 = '20090115_151520_run_final_0_250m_kvanputt'23 time_dir2 = '20090115_164756_run_final_0_250m_small_kvanputt'24 time_dirs = [time_dir 2]22 time_dir1 = '20090115_151520_run_final_0_250m_kvanputt' 23 ##time_dir2 = '20090115_164756_run_final_0_250m_small_kvanputt' 24 time_dirs = [time_dir1] 25 25 26 26 #cellsize = 5 … … 34 34 ###### 35 35 36 #area = ['Sorrento', 'Geordie' ] # strings must match keys in var_equations below37 36 area = ['All'] # 'All' means no special areas - the whole thing 38 37 … … 78 77 79 78 name1 = directory+time_dir+sep+project_250m.scenario_name 80 ## name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_39900_0' 81 ## name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_79800_0' 79 name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_16200_0' 80 name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_32400_0' 81 name4 = directory+time_dir+sep+project_250m.scenario_name+'_time_48600_0' 82 name5 = directory+time_dir+sep+project_250m.scenario_name+'_time_64800_0' 82 83 83 names = [name1 ] #, name2, name3]84 names = [name1, name2, name3, name4, name5] 84 85 85 ##asc_name = []86 asc_name = [] 86 87 87 88 for name in names: … … 104 105 format = 'asc') 105 106 106 ## asc_name.append(outname + '.asc') 107 ## 108 ## maxasc_outname = directory+time_dir+sep+project_250m_250m.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 109 ## 110 ## print 'max asc outname ', maxasc_outname 111 ## print 'asc_name ', str(asc_name) 112 ## 113 ## MaxAsc(maxasc_outname, asc_name) 107 asc_name.append(outname + '.asc') 108 109 maxasc_outname = directory+time_dir+sep+project_250m.scenario_name+'_'+which_area+'_'+which_var+'_max.asc' 110 print 'max asc outname ', maxasc_outname 111 print 'asc_name ', str(asc_name) 112 113 MaxAsc(maxasc_outname, asc_name) -
anuga_work/production/australia_ph2/dampier/get_timeseries.py
r6204 r6217 2 2 Generate time series of nominated "gauges". 3 3 Input: sww file from run_perth.py 4 gauges project .gauge_filename4 gauges project_250m.gauge_filename 5 5 Output: csv files stage,speed,depth,elevation over time 6 6 Stored in the 'outputs_dir' folder for respective .sww file … … 14 14 from os import sep, rename, listdir, system 15 15 from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs 16 import project 16 import project_250m 17 17 18 directory = project .output_dir18 directory = project_250m.output_dir 19 19 20 time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt'+sep+'gauge' 21 time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt'+sep+'gauge' 22 time_dir3 = '20081031_133624_run_final_0_27255_alpha0.1_kvanputt'+sep+'gauge' 23 time_dir4 = '20081031_133735_run_final_0.6_27255_alpha0.1_kvanputt'+sep+'gauge' 24 time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'+sep+'gauge' 25 time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt'+sep+'gauge' 20 time_dir1 = '20090115_151520_run_final_0_250m_kvanputt' 21 time_dir2 = '20090115_164756_run_final_0_250m_small_kvanputt' 26 22 27 time_dirs = [time_dir1, time_dir2 , time_dir3, time_dir4, time_dir5, time_dir6]23 time_dirs = [time_dir1, time_dir2] 28 24 29 25 for time_dir in time_dirs: 30 name = directory+time_dir+sep+project .scenario_name31 gauge = project .gauges_dir_name26 name = directory+time_dir+sep+project_250m.scenario_name 27 gauge = project_250m.gauges_dir_name 32 28 sww2csv_gauges(name+'.sww',gauge, 33 29 quantities = ['stage','speed','depth','elevation'], … … 35 31 36 32 37 ## name1 = directory+time_dir+sep+project .scenario_name38 #### name2 = directory+time_dir+sep+project .scenario_name+'_time_43380_0'39 #### name3 = directory+time_dir+sep+project .scenario_name+'_time_78360_0'33 ## name1 = directory+time_dir+sep+project_250m.scenario_name 34 #### name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_43380_0' 35 #### name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_78360_0' 40 36 ## 41 37 ## names = [name1]#, name2, name3] 42 38 ## 43 39 ## for i, name in enumerate(names): 44 ## gauge = project .gauges_dir_name40 ## gauge = project_250m.gauges_dir_name 45 41 #### out_name = 'gauge_%d_' % i 46 42 ## print name -
anuga_work/production/australia_ph2/dampier/project_250m.py
r6204 r6217 40 40 scenario_name = 'dampier_ph2' 41 41 scenario = 'dampier' 42 area = 'large_b10' #'small_b10' 42 43 43 44 # Model specific parameters. One or all can be changed each time the … … 75 76 # Important to distinguish each run - ensure str(user) is included! 76 77 # Note, the user is free to include as many parameters as desired 77 dir_comment='_'+setup+'_'+str(tide)+'_250m_ small_'+str(user)78 dir_comment='_'+setup+'_'+str(tide)+'_250m_' + str(area)+'_'+str(user) 78 79 79 80 #------------------------------------------------------------------------------ … … 86 87 87 88 # gauges - used in get_timeseries.py 88 #gauge_name = 'perth.csv'89 gauge_name = 'gauges.csv' 89 90 90 91 # BOUNDING POLYGON - used in build_boundary.py and run_perth.py respectively … … 101 102 # Output filename for elevation 102 103 # this is a combination of all the data (utilisied in build_boundary) 103 combined_name = scenario_name + '_combined_elevation_250m_ small'104 combined_name = scenario_name + '_combined_elevation_250m_' + area 104 105 105 106 #------------------------------------------------------------------------------ … … 129 130 130 131 # where the mesh sits (this is created during the run_perth.py) 131 meshes_dir_name = meshes_dir + scenario_name+ '_ small.msh'132 meshes_dir_name = meshes_dir + scenario_name+ '_' + area + '.msh' 132 133 133 134 # where the boundary ordering files sit (this is used within build_boundary.py) … … 146 147 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 147 148 148 # where the directory of the gauges sit149 ##gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py149 # where the directory of the gauges sit 150 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py 150 151 ##gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py 151 152 … … 154 155 #------------------------------------------------------------------------------ 155 156 156 #Land, to set the initial stage/water to be offcoast only157 poly_mainland = read_polygon(polygons_dir+'initial_condition_small.csv')158 159 157 # Initial bounding polygon for data clipping 160 poly_all = read_polygon(polygons_dir+'poly_all_ small.csv')158 poly_all = read_polygon(polygons_dir+'poly_all_' +area + '.csv') 161 159 res_poly_all = 125000*res_factor 162 160 -
anuga_work/production/australia_ph2/dampier/run_dampier_ph2_250m.py
r6204 r6217 96 96 ## boundary_tags={'back': [N+1,N+2,N+3], 'side': [N,N+4], 'ocean': range(N)} 97 97 98 ## land = range (0,11) 99 ## sea = range (12,122) 100 ## bounding_polygon = project_250m.poly_all 101 ## boundary_tags={'back': land, 'side': [11,122], 'ocean': sea} 102 103 sea = range (4,22) 104 bounding_polygon = project_250m.poly_all 105 boundary_tags={'back': [0,1,2,23], 'side': [3,22], 'ocean': sea} 98 if project_250m.area =='large_b10': 99 land = range (0,516) 100 sea = range (516,626) 101 bounding_polygon = project_250m.poly_all 102 boundary_tags={'back': land, 'ocean': sea} 103 elif project_250m.area =='small_b10': 104 land = range (0,276) 105 sea = range (276,294) 106 bounding_polygon = project_250m.poly_all 107 boundary_tags={'back': land, 'ocean': sea} 108 else: 109 print 'area not defined therefore bondary_tags not defined' 106 110 107 111 #-------------------------------------------------------------------------- … … 144 148 145 149 # sets the initial stage in the offcoast region only 146 IC = Polygon_function( [(project_250m.poly_mainland, 0)], default = kwargs['tide'],147 geo_reference = domain.geo_reference)148 domain.set_quantity('stage', IC)150 ## IC = Polygon_function( [(project_250m.poly_mainland, 0)], default = kwargs['tide'], 151 ## geo_reference = domain.geo_reference) 152 domain.set_quantity('stage', 0) 149 153 #domain.set_quantity('stage',kwargs['tide'] ) 150 154 domain.set_quantity('friction', kwargs['friction']) … … 200 204 Rb = Time_boundary (domain, f=lambda t: [(sin(t*pi/600) * exp(-(t/3600)**2)), 0.0, 0.0]) 201 205 202 domain.set_boundary({'back': Br, 203 'side': Bt, 206 domain.set_boundary({'back': Bt, 204 207 'ocean': Rb}) 205 208
Note: See TracChangeset
for help on using the changeset viewer.