Changeset 5710
- Timestamp:
- Aug 29, 2008, 10:39:35 AM (17 years ago)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/Hinwood_2008/create_mesh.py
r5682 r5710 5 5 from anuga.pmesh.mesh import * 6 6 from anuga.coordinate_transforms.geo_reference import Geo_reference 7 8 xslope = 5.0 # Distance between the boundary and the start of the slope9 10 7 11 8 def generate(mesh_filename, slope, width, … … 18 15 19 16 """ 20 #Basic geometry21 global xslope22 17 23 18 xleft = slope['xleft'][0] … … 27 22 ytop = width/2.0 28 23 ybottom = -ytop 29 ###xslope = slope 30 24 31 25 #Outline 32 26 point_sw = [xleft, ybottom] … … 75 69 m.add_points_and_segments(points, segments, segment_tags) 76 70 77 # dam = m.add_region(xslope - 0.0000001,(ytop - ybottom)/2)78 # # this is the location of the reservoir region.79 # dam.setTag("flat")80 81 # slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2)82 # # this is the location of the slope region.83 # slope.setTag("slope")84 85 71 m.generate_mesh(maximum_triangle_area=maximum_triangle_area) 86 72 -
anuga_validation/Hinwood_2008/run_dam.py
r5696 r5710 1 1 """ 2 2 3 Script for running a breaking wave simulation of Jon Hinwood s wave tank.3 Script for running a breaking wave simulation of Jon Hinwood's wave tank. 4 4 5 5 Duncan Gray, GA - 2007 -
anuga_validation/Hinwood_2008/scenarios.py
r5691 r5710 1 1 """ 2 2 Scenario information, used to run simulations and create graphs. 3 3 """ 4 4 5 # A list of scenario dictionaries 5 6 scenarios = [] -
anuga_work/development/Hinwood_2008/calc_rmsd.py
r5709 r5710 1 1 """ 2 Functions used to calculate the root mean square deviation. 3 4 Duncan Gray, GA - 2007 2 5 3 6 """ … … 27 30 28 31 def get_max_min_condition_array(min, max, vector): 32 """ 33 Given a vector of values, and minimum and maximum values, return a 34 vector of 0/1's that can be used to cut arrays so only the times 35 in the min max range are used. 36 37 precondition: The vector values are ascending. 38 39 """ 29 40 30 41 SMALL_MIN = -1e10 # Not that small, but small enough … … 38 49 def auto_rrms(outputdir_tag, scenarios, quantity, y_location_tag=':0.0'): 39 50 """ 40 Given a bunchof scenarios that have CSV guage files, calc the51 Given a list of scenarios that have CSV guage files, calc the 41 52 err, Number_of_samples and rmsd for all gauges in each scenario. 42 53 Write this info to a file for each scenario. … … 322 333 def err_files(scenarios, outputdir_tag, rmsd_dir, quantity): 323 334 """ 324 The err files, for a list of scenarios335 Create a list of err files, for a list of scenarios. 325 336 """ 326 337 file_errs = [] … … 337 348 save_as=None, 338 349 is_interactive=False): 350 """ 351 Calculate the RMSD for all the tests in a scenario 352 """ 339 353 340 354 # A bit hacky. Getting a pro_instance to get the rmsd_dir. -
anuga_work/development/Hinwood_2008/create_mesh.py
r5577 r5710 5 5 from anuga.pmesh.mesh import * 6 6 from anuga.coordinate_transforms.geo_reference import Geo_reference 7 8 xslope = 5.0 # Distance between the boundary and the start of the slope9 10 7 11 8 def generate(mesh_filename, slope, width, … … 18 15 19 16 """ 20 #Basic geometry21 global xslope22 17 23 18 xleft = slope['xleft'][0] … … 27 22 ytop = width/2.0 28 23 ybottom = -ytop 29 ###xslope = slope30 24 31 25 #Outline … … 75 69 m.add_points_and_segments(points, segments, segment_tags) 76 70 77 # dam = m.add_region(xslope - 0.0000001,(ytop - ybottom)/2)78 # # this is the location of the reservoir region.79 # dam.setTag("flat")80 81 # slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2)82 # # this is the location of the slope region.83 # slope.setTag("slope")84 85 71 m.generate_mesh(maximum_triangle_area=maximum_triangle_area) 86 72 -
anuga_work/development/Hinwood_2008/prepare_time_boundary.py
r5681 r5710 31 31 32 32 def csv2tms(filename, offshore_bed_elevation): 33 """Convert benchmark 2 time series to NetCDF tms file. 33 """ 34 Convert Hinwood boundary file to NetCDF tms file. 34 35 the filename is the name of the output tms file, eg 'hi.tsm'. 35 36 There must be an equivalent .csv file, eg 'hi.csv'. 36 37 37 38 """ 38 39 40 39 41 40 print 'Creating', filename -
anuga_work/development/Hinwood_2008/scenarios.py
r5681 r5710 1 1 """ 2 2 Scenario information, used to run simulations and create graphs. 3 3 """ 4 4 5 # A list of scenario dictionaries 5 6 scenarios = [] -
anuga_work/development/Hinwood_2008/slope.py
r5659 r5710 27 27 Load a csv file, where the first row is the column header and 28 28 the first colum explains the rows. 29 30 returns the data as two vectors and an array. 29 31 """ 30 32 #slope, _ = csv2dict(file_sim)
Note: See TracChangeset
for help on using the changeset viewer.