Citation

Conder, J.A. and C.A. Arciniegas, Conjugate faulting in the Wabash Valley Fault Zone exhibited by the Nov 20, 2012 M3.6 earthquake, a Mt. Carmel late aftershock, Seismological Research Letters, 2017

Usage:

>> focalmech(M,centerX,center,diam,{varagin})

Required inputs are:

M: 3x3 moment tensor or 1x6 vector of 6 independent components

(Mrr, Mtt, Mff, Mrt, Mrf, Mtf)

CenterX, CenterY: location to center beachball on active plot

Diam: diameter to make beachball in active plot units

Optional inputs {varargin}:

Change fill color. E.g., ‘r’ for red, [0.5 0.5 0.5] for gray.

Aspect ratio of width to height (useful if axes are not equal)

Scalar input. ‘map’ will auto scale for Mercator projection

Force double-couple beachball with ‘dc’.

Add label to beachball with ‘title’, followed by string

Example:

% Ryukyu Islands earthquake 4/18/2008 (from globalcmt.org) M = [4.070 -1.830 -2.240 1.500 1.410 -1.110]; Mw = 5.0; figure(1) clf focalmech(M,0,0,Mw) axis equal % Mt. Carmel aftershock 4/18/2008 M = [ -0.754 2.250 -1.490 -0.435 -0.094 0.730 ]; Mw = 4.6; focalmech(M,5.2,0,Mw) set(gca,'Visible','off')

April 17, 2017

James A. Conder

]]>Conder, J.A., Fitting multiple bell curves stably and accurately to a time series as applied to Hubbert cycles or other phenomena, Mathematical Geosciences, DOI: 10.1007/s11004-014-9557-7, 2014

This function will fit multiple Gaussians or logistic derivatives (“Hubbert curves”) to a time series. It jointly fits them in a least squares sense, using the algorithm explained in the above manuscript. This is a more robust and accurate (and somewhat easier to use) function than the previously published function for Anderson and Conder, 2011. The function was written in Matlab ver. R20131 (Mac).

Usage:

*>> **[Ppre, p, RMSE, pseed] = multibells(t,P,n);*

The function requires three inputs: *t* is time (or other independent variable). *P* is the data to be fit by *n* bell curves. The function defaults to Gaussians, but will fit logistic derivatives by including the argument ‘Hubbert’ or ‘logistic’ as an additional input.

Up to 4 outputs: *Ppre* is a vector of predicted data. *p* contains the parameters (*mu, sigma, A*) of the best fitting *n* curves. *RMSE* is the root mean squared error and *pseed* contains the parameters of the seed curves. An example script, *fit_bells_example.m*, is included.

Jan 3, 2014

James Conder

]]>Anderson and Conder, 2011, Discussion of Multicyclic Hubbert modeling as a method for forecasting future petroleum production, Energy and Fuels, dx.doi.org/10.1021/ef1012648.

This function uses a statistical F-test to determine the likelihood that an observed improvement of a fit to data warrants the use of additional parameters. The function was written in Matlab ver. R2010b (Mac). The “.txt” extension is for ease of distribution and should be removed for use.

Usage:

*>> [ p ] = ftest(n,np1,np2,chi1,chi2)** *

The function requires five inputs: *n* is the number of data to be fit. *np1 *&* np2* are the numbers of free parameters used in the two models. *chi1* and *chi2* are (normalized) sums of the squares of the misfits to the data for the two models.

One output, *p*, is returned*.* *p* is the probability (between 0 and 1) that the improvement of the fit is due to chance. Therefore a small value of *p* means a high confidence that the additional parameters are warranted.

Caveat emptor.

March 10, 2011

James Conder

]]>Usage:

>> [Ppred params rmse] = fit_multicycle(time,prod,nk,nseeds)

The function requires four inputs: time, prod, nk, nseeds. prod and time are vectors of production and associated time stamps. nk is the number of desired curves. nseeds is the number of random seed trials. The greater number of trials, the more likely the program will find a global minimum, but at the expense of time. More curves will generally require a non-linearly increasing number of seeds.

Three outputs are returned: 1) Ppred: predicted production having the same number of data as actual production. Predicted production is the sum of the curves. 2) params: nk x 3 matrix containing the best fitting parameters, tmax (col.1), pmax (col.2), and a (col.3), for each curve. 3) rmse: root mean square error for the model production curve relative to the actual production.

Note: It is not only possible but, quite likely for physically unrealistic parameters (e.g., negative production) to arise when asking for more curves than the data warrant.

For a quick comparison of actual and model production:

>> plot(time,prod,time,Ppre)

Caveat emptor. James Conder

]]>