Changeset 4248
- Timestamp:
- Feb 9, 2007, 2:50:41 PM (17 years ago)
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4244 r4248 15 15 16 16 from anuga.geospatial_data.geospatial_data import ensure_absolute 17 from anuga_parallel.parallel_api import barrier18 17 19 18 def file_function(filename, … … 509 508 510 509 dir_name = dir_name 511 if myid == 0 and access(dir_name,F_OK) == 0: 512 # if access(dir_name,F_OK) == 0: 510 if access(dir_name,W_OK) == 0: 513 511 print 'Make directory %s' %dir_name 514 print "myid", myid515 512 mkdir (dir_name,0777) 516 barrier()517 513 screen_output_name = dir_name + "screen_output_%d_%d.txt" %(myid,numprocs) 518 514 screen_error_name = dir_name + "screen_error_%d_%d.txt" %(myid,numprocs) … … 789 785 790 786 if plot_quantity is None: 791 plot_quantity = ['depth', 'speed' , 'bearing']787 plot_quantity = ['depth', 'speed'] 792 788 else: 793 789 assert type(plot_quantity) == list,\ … … 1064 1060 vh = f(t, point_id = k)[3] 1065 1061 depth = w-z 1066 m = sqrt(uh*uh + vh*vh) 1062 m = sqrt(uh*uh + vh*vh) 1067 1063 if depth < 0.001: 1068 1064 vel = 0.0 1069 1065 else: 1070 vel = m / (depth + 1.e- 30)1071 bearing = calc_bearing(uh, vh)1066 vel = m / (depth + 1.e-6/depth) 1067 #bearing = calc_bearing(uh, vh) 1072 1068 model_time[i,k,j] = t/60.0 1073 1069 stages[i,k,j] = w … … 1077 1073 momenta[i,k,j] = m 1078 1074 speed[i,k,j] = vel 1079 bearings[i,k,j] = bearing1075 #bearings[i,k,j] = bearing 1080 1076 depths[i,k,j] = depth 1081 1077 thisgauge = gauges[k] … … 1134 1130 savefig('profilefig') 1135 1131 1136 depth_axis = axis([time_min/60.0, time_max/60.0, -0.1, max(max_depths)*1.1]) 1137 stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1]) 1138 vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1]) 1139 mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1]) 1140 1132 elev_output = [] 1141 1133 if generate_fig is True: 1134 depth_axis = axis([time_min/60.0, time_max/60.0, -0.1, max(max_depths)*1.1]) 1135 stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1]) 1136 vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1]) 1137 mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1]) 1142 1138 cstr = ['g', 'r', 'b', 'c', 'm', 'y', 'k'] 1143 1139 nn = len(plot_quantity) 1144 1140 no_cols = 2 1145 elev_output = []1141 1146 1142 if len(label_id) > 1: graphname_report = [] 1147 1143 pp = 1 -
anuga_work/production/newcastle_2006/export_results.py
r4186 r4248 5 5 from os import sep 6 6 7 # first run 7 8 #time_dir = '20061207_035946' #bulli 8 9 #time_dir = '20061212_012802' #shovel 9 time_dir = '20061212_064757' #yacaaba 10 #time_dir = '20061212_064757' #yacaaba 11 # second run 12 #time_dir = '20070119_055707' # yacaaba 13 time_dir = '20070121_213838' # shovel 14 #time_dir = '20070119_055809' # bulli 10 15 11 16 directory = project_slide.outputdir … … 26 31 27 32 if which_var == 2: # Depth 28 outname = name + '_depth '33 outname = name + '_depth-shovel' 29 34 quantityname = 'stage-elevation' 30 35 … … 58 63 sww2dem(name, basename_out = outname, 59 64 quantity = quantityname, 60 cellsize = 100,65 cellsize = 25, 61 66 easting_min = project_slide.eastingmin, 62 67 easting_max = project_slide.eastingmax, -
anuga_work/production/newcastle_2006/run_newcastle_slide.py
r4186 r4248 143 143 from smf import slide_tsunami 144 144 145 tsunami_source = slide_tsunami(length=project_slide. yacaaba_length,146 width=project_slide. yacaaba_width,147 depth=project_slide. yacaaba_depth,148 slope=project_slide. yacaaba_slope,149 thickness=project_slide. yacaaba_thickness,150 x0=project_slide.slide_origin_ yacaaba_a[0],151 y0=project_slide.slide_origin_ yacaaba_a[1],152 alpha=project_slide. yacaaba_alpha,145 tsunami_source = slide_tsunami(length=project_slide.shovel_length, 146 width=project_slide.shovel_width, 147 depth=project_slide.shovel_depth, 148 slope=project_slide.shovel_slope, 149 thickness=project_slide.shovel_thickness, 150 x0=project_slide.slide_origin_shovel_c[0], 151 y0=project_slide.slide_origin_shovel_c[1], 152 alpha=project_slide.shovel_alpha, 153 153 domain=domain) 154 154 -
anuga_work/production/onslow_2006/MOST_timeseries.py
r3514 r4248 49 49 reportname = 'latexoutput_MOST_ANUGA_comparison', 50 50 plot_quantity = ['stage', 'speed'], 51 generate_fig = True, 51 52 surface = False, 52 53 time_min = None, -
anuga_work/production/onslow_2006/compare_parameter_change.py
r3965 r4248 65 65 reportname = 'latexoutputparameterchange', 66 66 plot_quantity = ['stage', 'speed'], 67 generate_fig = True, 67 68 surface = False, 68 69 time_min = None, -
anuga_work/production/onslow_2006/compare_timeseries_data.py
r3514 r4248 45 45 surface = False, 46 46 plot_quantity = plot_quantity, 47 generate_fig = True, 47 48 time_min = None, 48 49 time_max = None, -
anuga_work/production/onslow_2006/make_report.py
r4151 r4248 133 133 reportname = reportname, 134 134 plot_quantity = ['stage', 'momentum'], 135 generate_fig = True, 135 136 surface = False, 136 137 time_min = None, … … 161 162 reportname = reportname, 162 163 plot_quantity = ['stage', 'speed'], 164 generate_fig = True, 163 165 surface = False, 164 166 time_min = None, -
anuga_work/production/sydney_2006/export_results.py
r4186 r4248 7 7 #time_dir = '20061211_071516' #bulli 8 8 #time_dir = '20061212_012705' #shovel 9 time_dir = '20061212_064807' #yacaaba 9 #time_dir = '20061212_064807' #yacaaba 10 11 #time_dir = '20070121_213509' #shovel 12 #time_dir = '20070119_055222' #yacaaba 13 time_dir = '20070121_213444' #bulli 14 10 15 11 16 directory = project_slide.outputdir … … 26 31 27 32 if which_var == 2: # Depth 28 outname = name + '_depth '33 outname = name + '_depth-bulli' 29 34 quantityname = 'stage-elevation' 30 35 -
anuga_work/production/sydney_2006/run_sydney_slide.py
r4186 r4248 163 163 from smf import slide_tsunami 164 164 165 tsunami_source = slide_tsunami(length=project_slide. yacaaba_length,166 width=project_slide. yacaaba_width,167 depth=project_slide. yacaaba_depth,168 slope=project_slide. yacaaba_slope,169 thickness=project_slide. yacaaba_thickness,170 x0=project_slide.slide_origin_ yacaaba_a[0],171 y0=project_slide.slide_origin_ yacaaba_a[1],172 alpha=project_slide. yacaaba_alpha,165 tsunami_source = slide_tsunami(length=project_slide.shovel_length, 166 width=project_slide.shovel_width, 167 depth=project_slide.shovel_depth, 168 slope=project_slide.shovel_slope, 169 thickness=project_slide.shovel_thickness, 170 x0=project_slide.slide_origin_shovel_b[0], 171 y0=project_slide.slide_origin_shovel_b[1], 172 alpha=project_slide.shovel_alpha, 173 173 domain=domain) 174 174 -
anuga_work/production/wollongong_2006/export_results.py
r4186 r4248 5 5 from os import sep 6 6 7 # first run 7 8 #time_dir = '20061211_060105' #bulli 8 9 #time_dir = '20061212_012715' #shovel 9 time_dir = '20061212_064735' #yacaaba 10 #time_dir = '20061212_064735' #yacaaba 11 12 # second run 13 #time_dir = '20070121_213616' #yacaaba 14 #time_dir = '20070121_213550' #bulli 15 #time_dir = '20070119_055620' #shovel 16 17 # timing run - flux limiter in place 18 time_dir = '20070208_045514' # bulli 19 #time_dir = '20070208_044802' # for version without new flux limiter 10 20 11 21 directory = project_slide.outputdir … … 26 36 27 37 if which_var == 2: # Depth 28 outname = name + '_depth '38 outname = name + '_depth-bulli-fluxlimiter' 29 39 quantityname = 'stage-elevation' 30 40 -
anuga_work/production/wollongong_2006/run_gong_slide.py
r4186 r4248 147 147 from smf import slide_tsunami 148 148 149 tsunami_source = slide_tsunami(length=project_slide. yacaaba_length,150 width=project_slide. yacaaba_width,151 depth=project_slide. yacaaba_depth,152 slope=project_slide. yacaaba_slope,153 thickness=project_slide. yacaaba_thickness,154 x0=project_slide.slide_origin_ yacaaba_a[0],155 y0=project_slide.slide_origin_ yacaaba_a[1],156 alpha=project_slide. yacaaba_alpha,149 tsunami_source = slide_tsunami(length=project_slide.bulli_length, 150 width=project_slide.bulli_width, 151 depth=project_slide.bulli_depth, 152 slope=project_slide.bulli_slope, 153 thickness=project_slide.bulli_thickness, 154 x0=project_slide.slide_origin_bulli[0], 155 y0=project_slide.slide_origin_bulli[1], 156 alpha=project_slide.bulli_alpha, 157 157 domain=domain) 158 158
Note: See TracChangeset
for help on using the changeset viewer.