- Timestamp:
- Jun 23, 2008, 1:01:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/convergence_okushiri_2008/project_truescale.py
r5396 r5411 1 """Common filenames for truescale Okushiri Island validation1 """Common filenames for truescale Okushiri Island convergence study 2 2 Formats are given as ANUGA native netCDF where applicable. 3 3 … … 11 11 from anuga.utilities.system_tools import get_user_name, get_host_name 12 12 13 codename = 'project_grad.py' # FIXME can be obtained automatically as __file__ 14 15 home = join(getenv('INUNDATIONHOME'), 'data', 'anuga_validation', 16 'convergence_okushiri_2008')# Location of Data 13 home = join(getenv('INUNDATIONHOME'),'data', 'anuga_validation', 14 'convergence_okushiri_2008') # Location of Data 17 15 user = get_user_name() 18 16 host = get_host_name() … … 20 18 umask(002) 21 19 22 #time stuff 23 time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir 24 run_time = time+'_run' 25 26 #Set anuga directories 27 anuga_dir = join(home, 'anuga') 28 29 dir_comment='_'+setup+'_'+str(tide)+'_'+\ 30 str(user)+'_'+boundary_event+'_'+which_data 31 32 mesh_dir = join(anuga_dir, 'meshes') 33 mesh_name = join(mesh_dir, 'okushiri_truescale') 34 35 polygons_dir = join(anuga_dir, 'polygons') # Created with ArcGIS (csv files) 36 tide_dir = join(anuga_dir, 'tide_data') 37 38 #output locations 39 output_dir = join(anuga_dir, 'outputs')+sep 40 output_run_time_dir = output_dir +run_time+dir_comment+sep 41 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 42 43 #gauges 44 gauges_dir = join(anuga_dir,'gauges') 45 gauge_name = 'gauge_location_onslow.csv' 46 gauges_dir_name = gauges_dir + gauge_name 20 #------------------- 21 # Input file names 22 #------------------- 47 23 48 24 # Given boundary wave … … 55 31 bathymetry_filename = 'okushiri_truescale_bathymetry.pts' 56 32 57 # Triangular mesh 58 mesh_filename = 'okushiri_truescale.msh' 33 34 #------------------------------------ 35 # Output file names and directories 36 #------------------------------------ 59 37 60 38 # Model output 61 39 output_filename = 'okushiri_truescale.sww' 62 40 41 # Time stuff 42 time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir 43 run_time = time+'_run' 44 45 # Run parameters 46 finaltime=450 47 setup='original' 48 49 if setup =='original': 50 print 'original resolution' 51 base_resolution=1 52 yieldstep=1 53 if setup =='double': 54 print 'double original resolution' 55 base_resolution=0.5 56 yieldstep=1 57 if setup =='half': 58 print 'half original resolution' 59 base_resolution=2 60 yieldstep=1 61 if setup =='no polygons': 62 print 'half original resolution' 63 base_resolution=2 64 yieldstep=1 65 66 67 # Set anuga directories 68 anuga_dir = join(home,'anuga')+sep 69 70 dir_comment='_'+setup+'_'+str(user) 71 72 mesh_dir = join(anuga_dir, 'meshes')+sep 73 mesh_name = join(mesh_dir, 'okushiri_truescale') 74 75 polygons_dir = join(anuga_dir, 'polygons')+sep # Created with ArcGIS (csv files) 76 77 # Output locations 78 output_dir = join(anuga_dir, 'outputs')+sep 79 output_run_time_dir = output_dir+run_time+dir_comment+sep 80 output_run_time_dir_name = output_run_time_dir + output_filename #Used by post processing 81 82 # Gauges 83 gauges_dir = join(anuga_dir,'gauges')+sep 84 gauge_name = 'gauge_location_okushiri.csv' 85 gauges_dir_name = gauges_dir+gauge_name 86 87 # Vertex coordinates 88 vertex_filename = output_run_time_dir+setup+'vertex_coordinates.txt' 89 90 #------------------------------ 91 # Polygon definitions 92 #------------------------------ 93 94 poly_all = read_polygon(polygons_dir+'bounding_polygon.csv') 95 res_poly_all = 16000*base_resolution 96 97 #print 'Area of bounding polygon', polygon_area(poly_all)/1000000.0 98 99 poly_gulleys = read_polygon(polygons_dir+'gulleys_polygon.csv') 100 res_gulleys = 3.2*base_resolution 101 102 poly_island = read_polygon(polygons_dir+'island_polygon.csv') 103 res_island = 32*base_resolution 104 105 poly_rhs = read_polygon(polygons_dir+'rhs_polygon.csv') 106 res_rhs = 80*base_resolution 107 108 interior_regions = [[poly_gulleys,res_gulleys],[poly_island,res_island], 109 [poly_rhs,res_rhs]] 110 111 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 112 113 print 'min number triangles', trigs_min 63 114 64 115 116 117 118 119
Note: See TracChangeset
for help on using the changeset viewer.