
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%  INSTRUCTIONS
%%%%%%
%%%%%%  Three steps:
%%%%%%  1. Assign values to all the vectors, matrices, scalars
%%%%%%     in the "SPECIFY PARAMETERS LIST" below 
%%%%%%  2. Run setup_friction.m to obtain stress and displacement matrices
%%%%%%     -- Note: this only needs to be run once for any fault geometry
%%%%%%     -- you can save stressG and dispG in a .mat file and call when
%%%%%%     needed for each forward model
%%%%%%  3. Rund the foward model, forward_hotfriction.m -- NOTE: before
%%%%%%     running the forward model you must decide whether or not to include
%%%%%%     distributed viscous flow at depth -- see forward_hotfriction.m


% SPECIFY PARAMETERS LIST:
% 1. pm -- npatches x 7 matrix of fault patch parameters where npatches is
%    number of slip patches
%    pm = [length (km),width (km), depth(km), dip (degrees), strike (degrees),east position (km) (bottom edge),north
%    postition (km) (bottom edge)
% 2. sigAmB -- npatches x 1 vector of sigma*(A-B) where A,B are rate-state
%    parameters and sigma is normal stress (Pa) 
% 3. coslip -- 2*npatches x 1 vector of coseismic slips (meters) (first npatches
%    entries for strike-slip, second npatches entries for dip-slip)
% 4. prerate -- 2*npatches x 1 vector of preseismic sliprate (m/yr) on patches (first npatches
%    entries for strike-slip, second npatches entries for dip-slip)
% 5. stopt -- termination time of afterslip model in years since earthquake
%    -- afterslip is calculated from time=0 to time=stopt
% 6. H -- elast plate thickness (km) (optional, if you include viscous
%    flow)
% 7. tR -- viscoelastic halfspace relaxation time in years (tR=2*eta/mu
%    where eta is viscosity and mu is shear modulus (optional, if you include viscous
%    flow)
% 8. xysites -- numsites x 2 matrix of site coordinates (km) where numsites is
%    the number of sites
% 9. names -- numsites x 4 vector of site names (entries are strings)
% 10. InvertSeries -- cell array of dimension (numsites,3) -- Each of the
%     entries in the cell array are numobs x 3 matrices where numobs is the
%     number of observations (epochs) in each time series -- the first column
%     is the observation times, the second column is positions, and the third
%     column is uncertainties (sigmas) -- InvertSeries{:,1} contain east
%     positions,InvertSeries{:,2} contain north positions, and InvertSeries{:,3} 
%     contain up positions
% 11. inter_east, inter_north, inter_up -- numsites x 1 vectors of
%     interseismic velocities (m/yr) for each of the sites -- NOTE: the
%     model accounts for interseismic creep on the fault -- these
%     parameters account of unmodeled interseismic velocities
% 12. east_pos, north_pos, up_pos -- numsites x 1 vectors of pre-earthquake
%     positions (i.e., the position on the time-series plots just before
%     the earthquake) -- specify NaN if this position is unkown and the
%     program will solve for the pre-earthquake positions
