Changeset 4320
- Timestamp:
- Mar 23, 2007, 7:29:14 PM (17 years ago)
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
r4312 r4320 1060 1060 comparefile = file_loc[j]+sep+'gauges_maxmins'+'.csv' 1061 1061 fid_compare = open(comparefile, 'w') 1062 file0 = file_loc[j]+'gauges_t0.csv' 1063 fid_0 = open(file0, 'w') 1062 1064 ##### loop over each gauge ##### 1063 1065 for k in gauge_index: … … 1102 1104 s = '%.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f\n' %(t, w, m, vel, z, uh, vh) 1103 1105 fid_out.write(s) 1106 if t == 0: 1107 s = '%.2f, %.2f, %.2f\n' %(g[0], g[1], w) 1108 fid_0.write(s) 1104 1109 if t/60.0 <= 13920: tindex = i 1105 1110 if w > max_stage: max_stage = w … … 1157 1162 depth_axis = axis([time_min/60.0, time_max/60.0, -0.1, max(max_depths)*1.1]) 1158 1163 stage_axis = axis([time_min/60.0, time_max/60.0, min(min_stages), max(max_stages)*1.1]) 1164 #stage_axis = axis([50.0, time_max/60.0, -3.0, 2.0]) 1159 1165 vel_axis = axis([time_min/60.0, time_max/60.0, min(max_speeds), max(max_speeds)*1.1]) 1160 1166 mom_axis = axis([time_min/60.0, time_max/60.0, min(max_momentums), max(max_momentums)*1.1]) … … 1195 1201 axis(depth_axis) 1196 1202 if which_quantity == 'stage': 1197 if elevations[0,k,j] < 0:1203 if elevations[0,k,j] <= 0: 1198 1204 plot(model_time[0:n[j]-1,k,j], stages[0:n[j]-1,k,j], '-', c = cstr[j]) 1199 1205 axis(stage_axis) … … 1273 1279 if title_on == True: 1274 1280 title('%s scenario: %s at %s gauge' %(label_id, which_quantity, gaugeloc2)) 1281 #title('Gauge %s (MOST elevation %.2f, ANUGA elevation %.2f)' %(gaugeloc2, elevations[10,k,0], elevations[10,k,1] )) 1275 1282 1276 1283 savefig(graphname) # save figures with sww file -
anuga_core/source/anuga/shallow_water/eqf.py
r4263 r4320 26 26 """ 27 27 28 def earthquake_tsunami(length, width, strike, d ip, x0=0.0, y0=0.0, slip=1.0, rake=90.,\29 domain=None,30 verbose=False):28 def earthquake_tsunami(length, width, strike, depth, \ 29 dip, x0=0.0, y0=0.0, slip=1.0, rake=90.,\ 30 domain=None, verbose=False): 31 31 32 from math import sin, radians , sqrt32 from math import sin, radians 33 33 34 34 if domain is not None: … … 37 37 x0 = x0 - xllcorner # fault origin (relative) 38 38 y0 = y0 - yllcorner 39 39 40 40 #a few temporary print statements 41 41 if verbose is True: … … 50 50 print '\ty0: ', y0 51 51 52 # warning test 53 test = width*1000.0*sin(radians(dip)) - depth 52 54 53 return Okada(length=length, width=width, dip=dip, \ 54 x0=x0, y0=y0, strike=strike, depth=depth, \ 55 slip=slip, rake=rake) 55 if verbose is True: 56 if test > 0.0: 57 print 'Earthquake source not located below seafloor' 58 print 'Please check depth' 59 60 return Okada_func(length=length, width=width, dip=dip, \ 61 x0=x0, y0=y0, strike=strike, depth=depth, \ 62 slip=slip, rake=rake, test=test) 56 63 57 64 … … 80 87 """ 81 88 82 class Okada :89 class Okada_func: 83 90 84 91 def __init__(self, length, width, dip, x0, y0, strike, \ 85 depth, slip, rake ):92 depth, slip, rake, test): 86 93 self.dip = dip 87 94 self.length = length … … 93 100 self.slip = slip 94 101 self.rake = rake 102 self.test = test 95 103 96 104 97 105 def __call__(self, x, y): 98 """Make Okada a callable object.106 """Make Okada_func a callable object. 99 107 100 108 If called as a function, this object returns z values representing … … 105 113 from math import sin, cos, radians, exp, cosh 106 114 from Numeric import zeros, Float 107 from okada import okada 115 from okada import okadatest 108 116 109 117 #ensure vectors x and y have the same length -
anuga_core/source/anuga/shallow_water/okada.f
r4263 r4320 1 subroutine okada (x,y,z,n,depth,xlength,xwidth,dip,rake,slip)1 subroutine okadatest(x,y,z,n,depth,xlength,xwidth,dip,rake,slip) 2 2 Cf2py intent(out) z 3 3 Cf2py intent(in) x,y,n,depth,dip,rake,slip,xlength,xwidth -
anuga_work/production/pt_hedland_2006/run_building_inundation.py
r4314 r4320 34 34 #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out) 35 35 inundation_damage(swwfile, buildings_filename, buildings_filename_out) 36 #inundation_damage(swwfile, buildings_filename, buildings_filename_out) 36 37 37 38 print '\n Augmented building file written to %s \n' \ -
anuga_work/production/sydney_2006/report/interpretation.tex
r4316 r4320 11 11 \begin{tabular}{cc} 12 12 \includegraphics[scale=0.4]{../report_figures/overallmodelv3.jpg} & 13 \includegraphics[scale=0.4]{../report_figures/detailedmodel.jpg} &13 \includegraphics[scale=0.4]{../report_figures/detailedmodel.jpg} \\ 14 14 (a) & (b) \\ 15 15 \end{tabular}
Note: See TracChangeset
for help on using the changeset viewer.