; ; Procedure SLIPMAP_3D.PRO ; ; This procedure plots a 3-d map of the slip superposed on the ; fault map ; ; ; 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) ; db(i) - Depth to bottom, segment i (km) ; dt(i) - Depth to top, segment i (km) ; xfe(i) - x-component of easternmost point of fault segment i ; yfe(i) - y-component of easternmost point of fault segment i ; xfw(i) - x-component of westernmost point of fault segment i ; yfw(i) - y-component of westernmost point of fault segment i ; 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 slipmap_3d, nfault, xfe, xfw, yfe, yfw, db, dt, islip, $ tslip, dslip, cfric, dfric, hplate, tauast, flen, tstep, tmin, $ ntime, ntm ; ; **************************************************************** ; ; ; **************************************************************** 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_vector = fltarr(num_faults_to_plot) sense_of_slip = fltarr(num_faults_to_plot) print, ' ' read, 'Enter time of slip event to plot: ', time_of_slip for fault_index = 0L,num_faults_to_plot-1 do begin slip_vector(fault_index) = -1. 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_vector(fault_index) = abs(dslip(fault_index,time_index)) sense_of_slip(fault_index) = 1. if (dslip(fault_index,time_index) lt 0.) then $ sense_of_slip(fault_index) = -1. endif endfor endfor ; Find maximum slip and normalize maximum_slip = max(slip_vector) slip_vector(*) = slip_vector(*)/maximum_slip ; ; Now set up fault map ; ; XL = fltarr(NF,/no) XR = fltarr(NF,/no) YL = fltarr(NF,/no) YR = fltarr(NF,/no) XINT = fltarr(NF,/no) YINT = fltarr(NF,/no) ; ; Locate east, west, north, south limits on faults ; xmin1 = min(xfe, nminx1) xmin2 = min(xfw, nminx2) xmin = xmin1 nminx = nminx1 if (xmin2 lt xmin1) then begin xmin = xmin2 nminx = nminx2 endif ; xmax1 = max(xfe, nmaxx1) xmax2 = max(xfw, nmaxx2) xmax = xmax1 nmaxx = nmaxx1 if (xmax2 gt xmax1) then begin xmax = xmax2 nmaxx = nmaxx2 endif ; ymin1 = min(yfe, nminy1) ymin2 = min(yfw, nminy2) ymin = ymin1 nminy = nminy1 if (ymin2 lt ymin1) then begin ymin = ymin2 nminy = nminy2 endif ; ymax1 = max(yfe, nmaxy1) ymax2 = max(yfw, nmaxy2) ymax = ymax1 nmaxy = nmaxy1 if (ymax2 gt ymax1) then begin ymax = ymax2 nmaxy = nmaxy2 endif ; ; ; Find Center of Picture ; xcenter = (xmin + xmax)/2. ycenter = (ymin + ymax)/2. ; ; xlong = 1.25*(xcenter - xmin) ; ylong = 1.25*(ycenter - ymin) xlong = .9*(xcenter - xmin) ylong = .9*(ycenter - ymin) axlen = max(xlong,ylong) xleft = -axlen xright = axlen yup = axlen ydown = -axlen ; XL = xfw - xcenter XR = xfe - xcenter YL = yfw - ycenter YR = yfe - ycenter XINT = .5*(XL + XR) YINT = .5*(YL + YR) loadct, 39 ; rainbow + white !P.MULTI = [0, 1, 1] !P.POSITION = [0., 0., 1., 1.] ; ; Loop over faults ; x1 = fltarr(5,/no) y1 = fltarr(5,/no) z1 = fltarr(5,/no) x2 = fltarr(2) y2 = fltarr(2) z2 = fltarr(2) if (nfault eq 215) then num_major_faults = long(12) if (nfault eq 450) then num_major_faults = long(20) for i=0L,NF-1 do begin if (i ge 0 and i le 61) then jfault = 1 if (i ge 62 and i le 90) then jfault = 2 if (i ge 91 and i le 114) then jfault = 3 if (i ge 115 and i le 132) then jfault = 4 if (i ge 133 and i le 142) then jfault = 5 if (i ge 143 and i le 166) then jfault = 6 if (i ge 167 and i le 173) then jfault = 7 if (i ge 174 and i le 178) then jfault = 8 if (i ge 179 and i le 188) then jfault = 9 if (i ge 189 and i le 193) then jfault = 10 if (i ge 194 and i le 204) then jfault = 11 if (i ge 205 and i le 214) then jfault = 12 color_value = 250 if(sense_of_slip(i) le 0.) then color_value = 80 zup = slip_vector(i) zdown = 0. x1(0) = XL(i) y1(0) = YL(i) z1(0) = zdown x1(1) = XR(i) y1(1) = YR(i) z1(1) = zdown x1(2) = XR(i) y1(2) = YR(i) z1(2) = zup x1(3) = XL(i) y1(3) = YL(i) z1(3) = zup x1(4) = XL(i) y1(4) = YL(i) z1(4) = zdown x2(0) = XL(i) y2(0) = YL(i) z2(0) = 0. x2(1) = XR(i) y2(1) = YR(i) z2(1) = 0. ; This part plots the slips if (slip_vector(i) gt 0.) then begin plot_3dbox, x1, y1, z1, $ ; dummies xstyle=4,ystyle=4, zstyle = 4,$ ; surpress axes xrange=[xleft,xright], $ yrange=[ydown,yup], $ zrange = [0.,.5], $ ; ax = 85., az = 10., $ ; For S. CA model ax = 85., az = 5., $ ; For All CA model /noerase, linestyle = 0, $ thick = 3.0, color = color_value endif xs = -.975*axlen ys = -.75*axlen astr0 = 'Event Time: ' astr = astr0 + strcompress(string(time_of_slip)) + ' Years' xyouts, xs, ys, z=0., astr, charsize = 1.5, color = 0 max_slip_meters = maximum_slip/100. xs = -.975*axlen ys = -.85*axlen astr0 = 'Maximum Slip: ' astr = astr0 + strmid(strcompress(string(max_slip_meters)),0,6) + $ ' Meters' xyouts, xs, ys, z=0., astr, charsize = 1.5, color = 0 xs = -.975*axlen ys = -.95*axlen astr = ' RED => RIGHT Lateral Slip xyouts, xs, ys, z=0., astr, charsize = 1., color = 250 xs = -.975*axlen ys = -1.025*axlen astr = ' BLUE => LEFT Lateral Slip xyouts, xs, ys, z=0., astr, charsize = 1., color = 80 ; This next bit plots the faults plot_3dbox, x2, y2, z2, $ ; dummies xstyle=4,ystyle=4, zstyle = 4,$ ; surpress axes xrange=[xleft,xright], $ yrange=[ydown,yup], $ zrange = [0.,.5], $ ; ax = 85., az = 10., $ ; For S. CA model ax = 85., az = 5., $ ; For All CA model /noerase, linestyle = 0, $ ; thick = 4.0, color = 100 thick = 8., color = 0 if (NF eq 215 ) then begin ; if (i eq 30) then begin xs = XL(i) ys = YL(i)- 70. astr = 'SA' xyouts, xs, ys, z = 0., astr, charsize = 1.15 , color = 0 endif if (i eq 62) then begin xs = XL(i) ys = YL(i)- 52.5 astr = 'SJ' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 100) then begin xs = XL(i)-30. ys = YL(i)- 35. astr = 'ELS' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 122) then begin xs = XL(i) + 10. ys = YL(i) astr = 'IV' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 135) then begin xs = XL(i) ys = YL(i) - 20. astr = 'LS' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 160) then begin xs = XL(i) ys = YL(i) -65. astr = 'GAR' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 170) then begin xs = XL(i) ys = YL(i) -50. astr = 'PV' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 178) then begin xs = XL(i) ys = YL(i) -65. astr = 'SCI' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 180) then begin xs = XL(i) + 40. ys = YL(i) -70. astr = 'PISG' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 190) then begin xs = XL(i) ys = YL(i) + 5. astr = 'BR' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 196) then begin xs = XL(i) - 10. ys = YL(i) -57.5 astr = 'SM' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif if (i eq 212) then begin xs = XL(i) - 55. ys = YL(i) -30. astr = 'LAN' xyouts, xs, ys, z = 0., astr, charsize = 1. , color = 0 endif ; ; endif for the fault names ; endif endfor x1(0) = 1000. y1(0) = 1000. z1(0) = 0. x1(1) = 1000. y1(1) = 1000. z1(1) = 0. x1(2) = 1000. y1(2) = 1000. z1(2) = 0. x1(3) = 1000. y1(3) = 1000. z1(3) = 0. x1(4) = 1000. y1(4) = 1000. z1(4) = 0. ; Get rid of those annoying weird axes left over, the stuff I don't want by ; overplotting them in white!!! plot_3dbox, x1, y1, z1, $ ; dummies xstyle=4,ystyle=4, zstyle = 4,$ ; surpress axes xrange=[xleft,xright], $ yrange=[ydown,yup], $ zrange = [0.,.5], $ ; ax = 85., az = 10., $ ; For S. CA model ax = 85., az = 5., $ ; For All CA model /noerase, linestyle = 0, $ thick = 8.0, color = 255 ; ; end