- Timestamp:
- Nov 17, 2006, 10:24:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/demos/cairns/runcairns.py
r3979 r4003 28 28 from anuga.abstract_2d_finite_volumes.combine_pts import combine_rectangular_points_files 29 29 from anuga.geospatial_data.geospatial_data import * 30 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher31 30 32 31 # Application specific imports … … 36 35 # Define scenario as either slump or fixed_wave. 37 36 #------------------------------------------------------------------------------- 38 scenario = 'slump' # 'fixedwave' 39 mkdir (scenario) 40 basename = scenario + project.basename 41 42 #------------------------------------------------------------------------------- 43 # Copy scripts to time stamped output directory and capture screen 44 # output to file 45 #------------------------------------------------------------------------------- 46 47 # creates copy of code in output dir if dir doesn't exist 48 if access(project.outputtimedir,F_OK) == 0 : 49 mkdir (project.outputtimedir) 50 copy (project.codedirname, project.outputtimedir + project.codename) 51 copy (project.codedir + 'runcairns.py', project.outputtimedir + 'runcairns2.py') 52 print'output dir', project.outputtimedir 53 54 #normal screen output is stored in 55 screen_output_name = project.outputtimedir + "screen_output.txt" 56 screen_error_name = project.outputtimedir + "screen_error.txt" 57 58 #used to catch screen output to file 59 sys.stdout = Screen_Catcher(screen_output_name) 60 sys.stderr = Screen_Catcher(screen_error_name) 61 62 print 'USER: ', project.user 37 scenario = 'slump' # OR 'fixed_wave' 38 if access(scenario,F_OK) == 0: 39 mkdir (scenario) 40 basename = scenario + 'source' 63 41 64 42 #------------------------------------------------------------------------------- … … 69 47 70 48 # filenames 71 dem_name = project.dem_name72 meshname = project.meshname+'.msh'49 dem_name = 'cairns' 50 meshname = 'cairns.msh' 73 51 74 52 # creates DEM from asc data … … 116 94 print domain.statistics() 117 95 118 domain.set_name(basename) #domain.set_name(project.basename)119 domain.set_datadir(scenario) #domain.set_datadir(project.outputtimedir)96 domain.set_name(basename) 97 domain.set_datadir(scenario) 120 98 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 121 99 domain.set_minimum_storable_height(0.01) … … 129 107 domain.set_quantity('friction', 0.0) 130 108 domain.set_quantity('elevation', 131 filename = project.dem_name + '.pts',109 filename = dem_name + '.pts', 132 110 use_cache = True, 133 111 verbose = True,
Note: See TracChangeset
for help on using the changeset viewer.