Changeset 5396
- Timestamp:
- Jun 10, 2008, 4:05:44 PM (15 years ago)
- Location:
- anuga_work/development/convergence_okushiri_2008
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/convergence_okushiri_2008/project_truescale.py
r5345 r5396 3 3 4 4 """ 5 from os import sep, environ, getenv, getcwd, umask 6 from os.path import expanduser, basename, join 7 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon, number_mesh_triangles 8 import sys 9 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees 10 from time import localtime, strftime, gmtime 11 from anuga.utilities.system_tools import get_user_name, get_host_name 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 17 user = get_user_name() 18 host = get_host_name() 19 #needed when running using mpirun, mpirun doesn't inherit umask from .bashrc 20 umask(002) 21 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 5 47 6 48 # Given boundary wave -
anuga_work/development/convergence_okushiri_2008/run_okushiri_truescale.py
r5343 r5396 40 40 print domain.statistics() 41 41 42 z = domain.get_vertex_coordinates() 42 43 44 # Write vertex coordinates to file 45 filename='okushiri_mesh_vertex_coordinates_truescale.txt' 46 fid=open(filename,'w') 47 fid.write('x (m), y (m)\n') 48 for i in range(len(z)): 49 pt=z[i] 50 x=pt[0] 51 y=pt[1] 52 fid.write('%.6f, %.6f\n' %(x, y)) 53 43 54 #------------------------- 44 55 # Initial Conditions … … 57 68 #------------------------- 58 69 domain.set_name(project_truescale.output_filename) # Name of output sww file 70 domain.set_datadir(project_truescale.output_dir) 59 71 domain.set_default_order(2) # Apply second order scheme 60 72 domain.set_all_limiters(0.9) # Max second order scheme (old lim)
Note: See TracChangeset
for help on using the changeset viewer.