Changeset 3885
- Timestamp:
- Oct 30, 2006, 1:56:46 PM (18 years ago)
- Location:
- anuga_work/production/dampier_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/project.py
r3877 r3885 10 10 convert_from_latlon_to_utm 11 11 12 from time import localtime, strftime 12 from time import localtime, strftime, gmtime 13 13 from anuga.geospatial_data.geospatial_data import * 14 14 … … 75 75 76 76 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir 77 gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir 77 78 build_time = time+'_build' 78 79 run_time = time+'_run' 80 81 print 'gtime: ', gtime 79 82 80 83 output_build_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+build_time+sep -
anuga_work/production/dampier_2006/run_dampier.py
r3877 r3885 48 48 # filenames 49 49 50 build_time = '2006102 5_113524_build'50 build_time = '20061029_231935_build_tide_24' 51 51 boundaries_name = project.boundaries_name 52 52 meshes_dir_name = project.meshes_dir_name+'.msh' … … 54 54 boundaries_time_dir_name = project.boundaries_dir + build_time + sep + boundaries_name 55 55 56 # # creates copy of code in output dir if dir doesn't exist 57 if myid == 0: 58 if access(project.output_run_time_dir,F_OK) == 0: 59 print 'project.output_run_time_dir',dirname(project.output_run_time_dir) 60 mkdir (project.output_run_time_dir,0777) 61 copy (dirname(project.__file__) +sep+ project.__name__+'.py', 62 project.output_run_time_dir + project.__name__+'.py') 63 copy (__file__, project.output_run_time_dir + basename(__file__)) 64 print 'project.output_run_time_dir',project.output_run_time_dir 65 66 #normal screen output is stored in 67 screen_output_name = project.output_run_time_dir + "screen_output_%d_%d.txt" %(myid,numprocs) 68 screen_error_name = project.output_run_time_dir + "screen_error_%d_%d.txt" %(myid,numprocs) 69 70 #used to catch screen output to file 71 sys.stdout = Screen_Catcher(screen_output_name) 72 sys.stderr = Screen_Catcher(screen_error_name) 73 74 print 'USER: ', project.user 75 76 77 #-------------------------------------------------------------------------- 78 # Create the triangular mesh based on overall clipping polygon with a 79 # tagged 80 # boundary and interior regions defined in project.py along with 81 # resolutions (maximal area of per triangle) for each polygon 82 #-------------------------------------------------------------------------- 83 84 interior_regions = [#[project.karratha_polygon, 25000], 85 [project.cipma_polygon, 50000]] 86 87 print 'start create mesh from regions' 88 meshes_dir_name = project.meshes_dir_name + '.msh' 89 create_mesh_from_regions(project.bounding_polygon, 90 boundary_tags={'back': [7, 8], 'side': [0, 6], 91 'ocean': [1, 2, 3, 4, 5]}, 92 maximum_triangle_area=300000, 93 interior_regions=interior_regions, 94 filename=meshes_dir_name, 95 use_cache=True, 96 verbose=True) 56 97 57 98 #------------------------------------------------------------------------- … … 61 102 domain = Domain(meshes_dir_name, use_cache=True, verbose=True) 62 103 print domain.statistics() 63 64 104 65 105 #------------------------------------------------------------------------- … … 76 116 alpha = 0.1) 77 117 78 79 118 #------------------------------------------------------ 80 119 # Distribute domain to implement parallelism !!! … … 83 122 if numprocs > 1: 84 123 domain=distribute(domain) 85 86 124 87 125 #------------------------------------------------------ … … 93 131 domain.set_default_order(2) #associate to the spatial order of the triangle 94 132 domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm 95 96 133 97 134 #-------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.