Changeset 5408
- Timestamp:
- Jun 17, 2008, 9:03:30 AM (17 years ago)
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/demos/cairns/ExportResults.py
r5365 r5408 44 44 reduction = max, 45 45 verbose = True, 46 format = ' asc')46 format = 'ers') 47 47 -
anuga_work/production/busselton/project.py
r5387 r5408 37 37 alpha = 0.1 38 38 friction=0.01 39 starttime= 1000039 starttime=0 40 40 midtime=21600 41 41 #finaltime=25000 42 finaltime= 1000043 export_cellsize= 5042 finaltime=86000 43 export_cellsize=25 44 44 setup='final' 45 45 source='exmouth' -
anuga_work/production/busselton/run_busselton.py
r5381 r5408 123 123 from polygon import Polygon_function 124 124 #following sets the stage/water to be offcoast only 125 IC = Polygon_function( [(project.poly_mainland, -1.0)], default = kwargs['tide'],125 IC = Polygon_function( [(project.poly_mainland, 0)], default = kwargs['tide'], 126 126 geo_reference = domain.geo_reference) 127 127 domain.set_quantity('stage', IC) … … 173 173 Br = Reflective_boundary(domain) 174 174 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 175 Bo = Dirichlet_boundary([kwargs['tide']+10.0,0,0]) 176 177 if project.source != 'test': 178 print 'start reading boundary file' 179 180 Bf = Field_boundary(kwargs['boundary_file'], 175 176 177 Bf = Field_boundary(kwargs['boundary_file'], 181 178 domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'], 182 179 use_cache=True, verbose=True) 183 184 domain.set_boundary({'back': Br,180 print 'finished reading boundary file' 181 domain.set_boundary({'back': Bd, 185 182 'side': Bd, 186 183 'ocean': Bf}) 187 else:188 print 'set ocean'189 domain.set_boundary({'back': Br,190 'side': Bd,191 'ocean': Bd})192 184 193 185 kwargs['input_start_time']=domain.starttime … … 200 192 t0 = time.time() 201 193 202 for t in domain.evolve(yieldstep = 240, finaltime = kwargs[' starttime']):194 for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']): 203 195 domain.write_time() 204 196 domain.write_boundary_statistics(tags = 'ocean') 205 206 if allclose(t, 240):207 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bo})208 209 if allclose(t, 1440):210 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})211 212 # for t in domain.evolve(yieldstep = kwargs['yieldstep'], finaltime = kwargs['midtime']213 # ,skip_initial_step = True):214 # domain.write_time()215 # domain.write_boundary_statistics(tags = 'ocean')216 #217 # for t in domain.evolve(yieldstep = 240, finaltime = kwargs['finaltime']218 # ,skip_initial_step = True):219 # domain.write_time()220 # domain.write_boundary_statistics(tags = 'ocean')221 197 222 198 x, y = domain.get_maximum_inundation_location() … … 235 211 236 212 print 'memory usage before del domain1',mem_usage() 237 238 def export_model(**kwargs): 239 #store_parameters(**kwargs) 240 241 # print 'memory usage before del domain',mem_usage() 242 #del domain 243 print 'memory usage after del domain',mem_usage() 244 245 swwfile = kwargs['output_dir']+kwargs['aa_scenario_name'] 246 print'swwfile',swwfile 247 248 export_grid(swwfile, extra_name_out = 'town', 249 quantities = ['speed','depth','elevation','stage'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation 250 #quantities = ['speed','depth'], # '(xmomentum**2 + ymomentum**2)**0.5' defaults to elevation 251 timestep = None, 252 reduction = max, 253 cellsize = kwargs['export_cellsize'], 254 NODATA_value = -9999, 255 easting_min = project.eastingmin, 256 easting_max = project.eastingmax, 257 northing_min = project.northingmin, 258 northing_max = project.northingmax, 259 verbose = False, 260 origin = None, 261 datum = 'GDA94', 262 format = 'asc') 263 264 inundation_damage(swwfile+'.sww', project.buildings_filename, 265 project.buildings_filename_out) 266 267 #------------------------------------------------------------- 213 214 #------------------------------------------------------------- 268 215 if __name__ == "__main__": 269 216 -
anuga_work/production/exmouth_2006/export_results.py
r4856 r5408 10 10 #time_dir = '20070619_042140_run_final_0_onslow_nbartzis' # MSL 1 in Onslow 10000 yr 11 11 #time_dir = '20070619_042542_run_final_1.4_exmouth_nbartzis' # HAT 1 in Exmouth 10000 yr 12 time_dir = '20070619_042417_run_final_0_exmouth_nbartzis' # MSL 1 in Exmouth 10000 yr 12 #time_dir = '20070619_042417_run_final_0_exmouth_nbartzis' # MSL 1 in Exmouth 10000 yr 13 #time_dir = '20080610_041607_run_final_1.4_exmouth_kvanputt' # HAT 1 in Exmouth 10000 yr 14 time_dir = '20080613_055032_run_final_1.4_exmouth_kvanputt' # HAT 1 in Exmouth 10000 yr slope 1 15 13 16 cellsize = 25 14 17 timestep = None … … 17 20 name = directory+time_dir+sep+project.scenario_name 18 21 19 is_parallel = True22 is_parallel = False 20 23 if is_parallel == True: nodes = 4 21 24 print 'output dir:', name 22 25 23 var = [2,3 ] # depth and speed26 var = [2,3, 4] # depth and speed 24 27 25 28 for which_var in var: … … 33 36 34 37 if which_var == 2: # Depth 35 outname = name + '_depth _north'38 outname = name + '_depth' 36 39 quantityname = 'stage-elevation' 37 40 38 41 if which_var == 3: # Speed 39 outname = name + '_speed _north'42 outname = name + '_speed' 40 43 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 41 44 … … 67 70 timestep = timestep, 68 71 cellsize = cellsize, 69 easting_min = project.e _min_area,70 easting_max = project.e _max_area,71 northing_min = project.n _min_area,72 northing_max = project.n _max_area,72 easting_min = project.eastingmin, 73 easting_max = project.eastingmax, 74 northing_min = project.northingmin, 75 northing_max = project.northingmax, 73 76 reduction = max, 74 77 verbose = True, -
anuga_work/production/exmouth_2006/project.py
r4856 r5408 133 133 output_dir = anuga_dir+'outputs'+sep 134 134 output_build_time_dir = output_dir+build_time+sep 135 #output_run_time_dir = output_dir +run_time+dir_comment+sep136 output_run_time_dir = output_dir +'20070619_042140_run_final_0_onslow_nbartzis'+sep135 output_run_time_dir = output_dir +run_time+dir_comment+sep 136 #output_run_time_dir = output_dir +'20070619_042140_run_final_0_onslow_nbartzis'+sep 137 137 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 138 138 -
anuga_work/production/exmouth_2006/run_exmouth.py
r4631 r5408 66 66 # kwargs['bathy_file']=project.combined_small_dir_name + '.txt' 67 67 kwargs['boundary_file']=project.boundaries_in_dir_name + '.sww' 68 '''68 69 69 print 'output_dir',kwargs['output_dir'] 70 70 if myid == 0: … … 108 108 use_cache=False, 109 109 verbose=True) 110 copy(project.meshes_dir_name+'.msh',project.output_dir+project.scenario_name+'.msh')111 110 barrier() 112 111 … … 170 169 domain.beta_h = 0 #sets the surface of the triangle to follow the bathy 171 170 #domain.H0=0.01 #controls the flux limiter (limiter2007) 172 #domain.tight_slope_limiters = 1#minimises creep171 domain.tight_slope_limiters = 0 #minimises creep 173 172 174 173 #------------------------------------------------------------------------- … … 227 226 kwargs['completed']=str(time.time()-t0) 228 227 229 '''228 230 229 if myid == 0: 231 230 store_parameters(**kwargs) -
anuga_work/production/perth/project.py
r5387 r5408 38 38 friction=0.01 39 39 starttime=10000 40 midtime=21600 41 finaltime=10000 40 finaltime=80000 42 41 export_cellsize=50 43 42 setup='final' … … 213 212 ################################################################### 214 213 215 # exporting asc grid 216 eastingmin = 379000 217 eastingmax = 385000 218 northingmin = 6450700 219 northingmax = 6459800 220 221 222 214 215 #Geordie Bay extract ascii grid 216 xminGeordie = 359500 217 xmaxGeordie = 360850 218 yminGeordie = 6459400 219 ymaxGeordie = 6460430 220 221 #Sorrento extract ascii grid 222 xminSorrento = 379560 223 xmaxSorrento = 380920 224 yminSorrento = 6477750 225 ymaxSorrento = 6479030 226 227 #Perth extract ascii grid 228 xminPerth = 379106 229 xmaxPerth = 383100 230 yminPerth = 6450500 231 ymaxPerth = 6461150 232 233 #Rockingham extract ascii grid 234 xminRockingham = 375500 235 xmaxRockingham = 383100 236 yminRockingham = 6427900 237 ymaxRockingham = 6430100 238 -
anuga_work/production/perth/run_perth.py
r5386 r5408 225 225 kwargs['starttime']=project.starttime 226 226 kwargs['yieldstep']=project.yieldstep 227 kwargs['midtime']=project.midtime228 227 kwargs['finaltime']=project.finaltime 229 228
Note: See TracChangeset
for help on using the changeset viewer.