; Procedure SLIPDIS.pro ; ; This procedure plots the slip of events vs. the ; location along a model fault for a given event, ; a "Slip-Distance" plot. ; ; We also plot the "Friction vs. Distance" along the bottom ; ; ; Primary Variables: ; ; ntime - Number of time steps ; tstep - Size of time steps in yr. ; tmin - Starting time of data file ; ntm - Used in continuation from previous simulations ; nfault - number of fault segments ; tauast - Viscoelastic relaxation time (yr) ; hplate - Elastic plate thickness (km) ; flen(i) - Array of fault segment lengths ; dfric(i) - Dynamic friction coefficient, fault segment i ; cfric(i) - Static friction coefficient, fault segment i ; tslip(i,j) - Time at which segment i slipped for jth time (yr) ; dslip(i,j) - Slip of segment i at jth time (cm) ; islip(i) - Number of times segment i slipped (# of earthquakes) ; ; ; ************************************************************* ; pro SLIPDIS, nfault, hplate, tauast, flen, tstep, tmin, $ ntime, ntm, islip, tslip, dslip, cfric, dfric ; ; ************************************************************* ; NF = long(nfault) first_fault = 0L last_fault = NF -1 num_faults_to_plot = last_fault - first_fault + 1 fault_indices = lindgen(num_faults_to_plot) + first_fault ; num_faults_to_plot = n_elements(fault_indices) ; Compute total fault length total_fault_length = total(flen(fault_indices)) ; ; Get the time at which to plot the slip ; resp_time = 'y' while (resp_time eq 'y') do begin print, '' read, ' Check event times for a fault patch? (y/n): ', resp_time if (resp_time eq 'y') then begin print, '' print, '(Note: Zero times & events are used as internal storage)' read, ' Enter fault patch: ', fault_patch for time_index = 0L, islip(fault_patch)-1 do begin print, ' Event, Time, Total Slip: ', time_index, $ tslip(fault_patch,time_index), $ dslip(fault_patch,time_index) endfor endif endwhile slip_mat = fltarr(num_faults_to_plot,/no) print, ' ' read, 'Enter time of slip event to plot: ', time_of_slip for fault_index = 0L,num_faults_to_plot-1 do begin slip_mat(fault_index) = 0. for time_index = 0L,islip(fault_index) -1 do begin time_test = abs(tslip(fault_index,time_index) - time_of_slip) if (time_test le .001) then begin slip_mat(fault_index) = .01* dslip(fault_index,time_index) slip_mat(fault_index) = abs(slip_mat(fault_index)) endif endfor endfor for fault_index =0L, num_faults_to_plot-1 do begin print, ' Fault, Slip(Meters): ', fault_index, slip_mat(fault_index) endfor ; Find minimum and maximum slips maximum_slip = 1.5*abs(max(slip_mat)) maximum_slip = 20. ; print,'' ; print_fault_numbers = '' ; read, 'Print the fault numbers? (y/n) ', print_fault_numbers ; Set up the window loadct, 13 ; rainbow !P.MULTI = [0, 1, 2] ; ; FIRST PLOT: SLIP-DISTANCE !P.POSITION = [.09, .3, .99, .65] plot,[0],[0], $ ; put something here... xstyle=1,ystyle=1, $ ; suppress axis extension xrange=[0,total_fault_length], $ yrange=[0.,maximum_slip], $ title='Slip Vs. Distance', $ ytitle='Slip, meters', $ xticklen = 0., $ xticks = 0, $ yticks = 0 xs = .025*total_fault_length ys = .85*maximum_slip astr = 'Event Time =' astr = astr + strcompress(string(time_of_slip)) xyouts, xs, ys, astr, charsize = 1.25 ; Plot the stuff fault_left_end = 0. for fault_index = 0L,num_faults_to_plot-1 do begin fault_right_end = fault_left_end + flen(fault_index) ; Plot the slip for this fault splot = slip_mat(fault_index) X1 = [fault_left_end, fault_left_end, fault_right_end, fault_right_end] Y1 = [0., splot, splot, 0.] polyfill,X1,Y1, color = 210 oplot, X1, Y1, linestyle=0, color = 250 fault_left_end = fault_right_end endfor ; ; SECOND PLOT: FRICTION-DISTANCE ; fricdiffmax = max(cfric) fricmin = min(dfric) fricmin = 0. fricmax = 1. print, 'fricmax, fricmin, fricdiffmax', fricmax, fricmin, fricdiffmax !P.POSITION = [.09, .1, .99, .2] plot,[0],[0], $ ; put something here... xstyle=1, ystyle=1, $ ; suppress axis extension xrange=[0.,total_fault_length], $ ; yrange=[.099,fricmax], $ yrange=[fricmin,fricmax], $ title='Fault Friction Coefficients (Scaled)', $ xtitle='Distance, km', $ ytitle='Friction', $ xticklen = .06, $ yticks = 1 ; Plot the stuff xr = fltarr(5) yr = fltarr(5) faultnumber = '' for i = 0L,num_faults_to_plot-1 do begin fault_number = fault_indices(i) if (i eq 0) then begin xleft = 0. endif else begin xleft = xleft + flen(fault_indices(i-1)) endelse xright = xleft + flen(fault_indices(i)) ; yup = cfric(i) + dfric(i) ; ydown = dfric(i) yup = cfric(i)/fricdiffmax ydown = 0. xr(0) = xleft yr(0) = yup xr(1) = xleft yr(1) = ydown xr(2) = xright yr(2) = ydown xr(3) = xright yr(3) = yup xr(4) = xleft yr(4) = yup X11 = xleft X12 = xright Y11 = yup Y12 = ydown X1 = [X11, X11, X12, X12] Y1 = [Y11, Y12, Y12, Y11] polyfill,X1,Y1, color = 100 oplot, xr, yr, linestyle = 150 xs = (xleft + xright)/2. ys = (yup + ydown)/2. endfor ; ; ; opportunity to stop while in this environment dummy = '' & read,'Press Return to continue... ',dummy end ; procedure TIMDIS, hplate, tauast, flen, tstep, ntime, isltot