{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from scipy import integrate" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Lecture 16\n", "# Travel Time Curves and Earthquake Detection" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "## Background" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Videos:\n", "\n", "http://www.iris.edu/hq/inclass/animation/earthquakes_scattered_across_the_globe_recorded_by_one_station\n", "\n", "http://www.iris.edu/hq/inclass/animation/1component_seismogram_building_responds_to_p_s_surface_waves\n", "\n", "http://www.iris.edu/hq/inclass/animation/4station_seismograph_network_records_a_single_earthquake\n", "\n", "http://www.iris.edu/hq/inclass/animation/seismic_wave_motions\n", "\n", "http://www.iris.edu/hq/inclass/video/travel_time_curves_described\n", "\n", "http://www.iris.edu/hq/inclass/video/types_of_seismic_wave_paths_through_the_earth\n", "\n", "\n", "Specifically, we are going to explore the seismic waves produced by the August 24, 2016 earthquake in Italy.\n", "\n", "http://www.iris.edu/hq/files/programs/education_and_outreach/retm/tm_160824_italy/160824italy.pdf" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Reference Earth Model\n", "\n", "There are several reconstructions of the interior of the Earth. These are called Earth Models.\n", "http://ds.iris.edu/spud/earthmodel\n", "\n", "To first order, the Earth is radially symmetric and so we can use a 1D Reference Earth Model. These models give the density and velocites of P- and S-Waves as a function of radius.\n", "\n", "In this lab, we will use the IASP91 model (Kennett B.L.N. and Engdahl E.R., 1991. \"Travel times for global earthquake location and phase association.\" Geophysical Journal International, 105:429-465.)\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Our Earth Reference Model:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model_z = np.array([-2, -1, 0,19,20,34,35,77.5,120,165,209,210,260,310,360,409,410,460,510,560,610,659,660,710,760,809.5,859,908.5,958,1007.5,1057,1106.5,1156,1205.5,1255,1304.5,1354,1403.5,1453,1502.5,1552,1601.5,1651,1700.5,1750,1799.5,1849,1898.5,1948,1997.5,2047,2096.5,2146,2195.5,2245,2294.5,2344,2393.5,2443,2492.5,2542,2591.5,2641,2690.5,2740,2740,2789.67,2839.33,2888,2889,2939.33,2989.66,3039.99,3090.32,3140.66,3190.99,3241.32,3291.65,3341.98,3392.31,3442.64,3492.97,3543.3,3593.64,3643.97,3694.3,3744.63,3794.96,3845.29,3895.62,3945.95,3996.28,4046.62,4096.95,4147.28,4197.61,4247.94,4298.27,4348.6,4398.93,4449.26,4499.6,4549.93,4600.26,4650.59,4700.92,4751.25,4801.58,4851.91,4902.24,4952.58,5002.91,5053.24,5103.57,5153.9,5153.9,5204.61,5255.32,5306.04,5356.75,5407.46,5458.17,5508.89,5559.6,5610.31,5661.02,5711.74,5762.45,5813.16,5863.87,5914.59,5965.3,6016.01,6066.72,6117.44,6168.15,6218.86,6269.57,6320.29,6371])\n", "model_Vp = np.array([0, 0, 5.8,5.8,6.5,6.5,8.04,8.045,8.05,8.175,8.3,8.3,8.4825,8.665,8.8475,9.03,9.36,9.528,9.696,9.864,10.032,10.2,10.79,10.9229,11.0558,11.144,11.23,11.314,11.396,11.4761,11.5543,11.6308,11.7056,11.7787,11.8504,11.9205,11.9893,12.0568,12.1231,12.1881,12.2521,12.3151,12.3772,12.4383,12.4987,12.5584,12.6174,12.6759,12.7339,12.7915,12.8487,12.9057,12.9625,13.0192,13.0758,13.1325,13.1892,13.2462,13.3034,13.361,13.419,13.4774,13.5364,13.5961,13.6564,13.6564,13.6679,13.6793,13.6908,8.0088,8.0963,8.1821,8.2662,8.3486,8.4293,8.5083,8.5856,8.6611,8.735,8.8072,8.8776,8.9464,9.0134,9.0787,9.1424,9.2043,9.2645,9.323,9.3798,9.4349,9.4883,9.54,9.59,9.6383,9.6848,9.7297,9.7728,9.8143,9.854,9.892,9.9284,9.963,9.9959,10.0271,10.0566,10.0844,10.1105,10.1349,10.1576,10.1785,10.1978,10.2154,10.2312,10.2454,10.2578,11.0914,11.1036,11.1153,11.1265,11.1371,11.1472,11.1568,11.1659,11.1745,11.1825,11.1901,11.1971,11.2036,11.2095,11.215,11.2199,11.2243,11.2282,11.2316,11.2345,11.2368,11.2386,11.2399,11.2407,11.2409])\n", "model_Vs = np.array([0, 0, 3.36,3.36,3.75,3.75,4.47,4.485,4.5,4.509,4.518,4.522,4.609,4.696,4.783,4.87,5.07,5.176,5.282,5.388,5.494,5.6,5.95,6.0797,6.2095,6.2474,6.2841,6.3199,6.3546,6.3883,6.4211,6.453,6.4841,6.5143,6.5438,6.5725,6.6006,6.628,6.6547,6.6809,6.7066,6.7317,6.7564,6.7807,6.8046,6.8282,6.8514,6.8745,6.8972,6.9199,6.9423,6.9647,6.987,7.0093,7.0316,7.054,7.0765,7.0991,7.1218,7.1449,7.1681,7.1917,7.2156,7.2398,7.2645,7.2645,7.2768,7.2892,7.3015,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.4385,3.4488,3.4587,3.4681,3.477,3.4856,3.4937,3.5013,3.5085,3.5153,3.5217,3.5276,3.533,3.5381,3.5427,3.5468,3.5505,3.5538,3.5567,3.5591,3.561,3.5626,3.5637,3.5643,3.5645])\n", "model_ρ = np.array([0, 0, 2.72,2.72,2.92,2.92,3.3198,3.3455,3.3713,3.3985,3.4258,3.4258,3.4561,3.4864,3.5167,3.547,3.7557,3.8175,3.8793,3.941,4.0028,4.0646,4.3714,4.401,4.4305,4.4596,4.4885,4.5173,4.5459,4.5744,4.6028,4.631,4.6591,4.687,4.7148,4.7424,4.7699,4.7973,4.8245,4.8515,4.8785,4.9052,4.9319,4.9584,4.9847,5.0109,5.037,5.0629,5.0887,5.1143,5.1398,5.1652,5.1904,5.2154,5.2403,5.2651,5.2898,5.3142,5.3386,5.3628,5.3869,5.4108,5.4345,5.4582,5.4817,5.4817,5.5051,5.5284,5.5515,9.9145,9.9942,10.0722,10.1485,10.2233,10.2964,10.3679,10.4378,10.5062,10.5731,10.6385,10.7023,10.7647,10.8257,10.8852,10.9434,11.0001,11.0555,11.1095,11.1623,11.2137,11.2639,11.3127,11.3604,11.4069,11.4521,11.4962,11.5391,11.5809,11.6216,11.6612,11.6998,11.7373,11.7737,11.8092,11.8437,11.8772,11.9098,11.9414,11.9722,12.0001,12.0311,12.0593,12.0867,12.1133,12.1391,12.7037,12.7289,12.753,12.776,12.798,12.8188,12.8387,12.8574,12.8751,12.8917,12.9072,12.9217,12.9351,12.9474,12.9586,12.9688,12.9779,12.9859,12.9929,12.9988,13.0036,13.0074,13.01,13.0117,13.0122])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This model is given use the velocity (in km/s) for P-waves and S-waves at different depths (in km)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Re = 6372 # km" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notices that this Reference Earth Model gives the values in terms of **depth** (called $z$) (in km) from the Earth's surface. We will need the **radius** (called $r$) from the centre of the Earth.\n", "\n", "$$ r = R_E - z$$\n", "\n", "and\n", "\n", "$$ z = R_E - r $$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To use this Referece Earth Model, we can use the `scipy` module to calculate interpolations functions so that given a radius, $r$, the function `Vp(r)` and `Vs(r)` will give use the velocity of the P-wave and S-wave, respectively." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from scipy import interpolate\n", "Vp = interpolate.interp1d(Re - model_z, model_Vp, fill_value='extrapolate')\n", "Vs = interpolate.interp1d(Re - model_z, model_Vs, fill_value='extrapolate')\n", "ρ = interpolate.interp1d(Re - model_z, model_ρ, fill_value='extrapolate')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To understand how this interpolation works, consider the following plot of velocity vs radius." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots()\n", "r = np.arange(0, Re, 10)\n", "plt.plot(Vp(r), r, label = 'Vp')\n", "plt.plot(Vs(r), r, label = 'Vs')\n", "plt.xlabel('velocity (km/s)')\n", "plt.ylabel('radius (km)')\n", "plt.legend(loc='upper left')\n", "plt.xlim(-1, 15)\n", "plt.title('Seismic Velocities Depending on Depth')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For S-waves, the velocity is zero between $r = 1200$ and $r = 3400$. Why?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Polar plots\n", "\n", "While these 1D plots are a good way of representing the velocity structure of the Earth, it can also be helpful to draw it a polar plot." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def plot_background():\n", " # set up a polar projection plot\n", " fig, ax = plt.subplots(figsize=(8,8), \n", " subplot_kw=dict(projection='polar'))\n", " # define a grid for all angles then (60 divisions around the circle)\n", " ntheta = 60\n", " θ = np.radians(np.linspace(0, 360, ntheta))\n", " r = np.arange(0, Re, 10)\n", " # define a 2D grid in radius and theta \n", " r_plt, theta_plt = np.meshgrid(r, θ)\n", " # the density needs to the same for all values of theta\n", " ρ_plt = ρ(r)*np.ones((ntheta, 1)) \n", " # choose a colour map\n", " plt.set_cmap('viridis_r')\n", " # make a contour plot of 200 levels\n", " cax = ax.contourf(theta_plt, r_plt, ρ_plt, 200, vmax=20)\n", " # add a colorbar\n", " cb = fig.colorbar(cax)\n", " cb.set_label(\"Density (10$^3$ kg/m$^3$)\")\n", " \n", " return ax\n", "\n", "plot_background()\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ray tracing equations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\\begin{align}\n", "\\frac{dx}{dt} &= v \\cos \\phi \\\\\n", "\\frac{dy}{dt} &= v \\sin \\phi \\\\\n", "\\frac{d\\phi}{dt} &= \\sin \\phi \\frac{\\partial v}{\\partial x} - \\cos \\phi \\frac{\\partial v}{\\partial y} \\\\\n", "\\end{align}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "These the ray tracing equations introduced in Lecture 15. We need to make one change in notation: let now $\\phi$ will represent the direction of the ray (as an angle to the horizontal). We do this so that we can plot our results in polar coordinates: $r$ and $\\theta$.\n", "\n", "For simplicity, let's define $x$ and $y$ to have an origin at the centre of the Earth. Then the coordinate transforms needed are\n", "\n", "\\begin{align}\n", "r &= \\sqrt{x^2 + y^2} \\\\\n", "\\theta &= \\arctan(y/x) \n", "\\end{align}\n", "\n", "and\n", "\n", "\\begin{align}\n", "x &= r\\cos(\\theta) \\\\\n", "y &= r\\sin(\\theta) \\\\\n", "\\end{align}\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# to make the code easier to read\n", "sin = np.sin\n", "cos = np.cos\n", "arctan2 = np.arctan2\n", "π = np.pi" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Centered difference scheme \n", "def NDc(f, x0, dx):\n", " return (f(x0+dx) - f(x0-dx)) / (2*dx)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# define the right hand side, F(q)\n", "def F( q, t, velocity_model):\n", " \"\"\"\n", " velocity_model is the velocity from the Reference Earth Model to use\n", " \"\"\"\n", " \n", " # separate out the variables\n", " x, y, ϕ = q\n", " \n", " # need a function which gives v from x, y\n", " # we need to first get the radius\n", " v = lambda x, y: velocity_model(np.sqrt(x**2 + y**2))\n", " \n", " # evaluate the right hand side of the ODE\n", " dxdt = v(x,y)*cos(ϕ)\n", " dydt = v(x,y)*sin(ϕ)\n", "\n", " dvdx = NDc(lambda x: v(x,y), x, 1)\n", " dvdy = NDc(lambda x: v(x,y), y, 1)\n", " dϕdt = sin(ϕ)*dvdx - cos(ϕ)*dvdy\n", "\n", " dqdt = np.array([dxdt, dydt, dϕdt])\n", "\n", " return dqdt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Solve our ray equations." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# define initial values (x0, y0, ϕ0)\n", "x0 = 0\n", "y0 = Re\n", "\n", "# ray travel into the ground at an angle to the horizontal\n", "ϕ0 = -π/4\n", "\n", "q0 = [x0, y0, ϕ0]\n", "\n", "tmax = 800\n", "dt = 10\n", "\n", "# create an array for the time variables\n", "t = np.arange(0, tmax, dt)\n", "\n", "sol = integrate.odeint(F, q0, t, args = (Vp,))\n", "x, y, ϕ = sol.T\n", "\n", "fig, axes = plt.subplots()\n", "plt.plot(x, y)\n", "plt.xlabel('x (km)')\n", "plt.ylabel('y (km)')\n", "plt.title('Ray Trace')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It helps to understand what this really means by looking at the time series; plot each variable against time." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots()\n", "r = np.sqrt(x**2 + y**2)\n", "plt.plot(t, x, label='x')\n", "plt.plot(t, y, label='y')\n", "plt.plot(t, r, label='r')\n", "\n", "plt.ylabel('x, y, r(km)')\n", "plt.xlabel('t (s)')\n", "\n", "plt.legend(loc='lower right')\n", "plt.title('Ray Trace')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This particular ray, heading a direction 45$^\\circ$ to the vertical into the ground, reaches the Earth surface again just before $t=600$ s (about 10 minutes)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It also good to visualize the rays not in only Cartesian coordinates ($x$ and $y$) but also in polar coordinates ($\\theta$ and $r$). Let's write a helper that computes the ray path and then converts the results to polar coordinates.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def compute_ray(dϕ = 0.1, tmax = 1200, dt = 1, velocity_model=Vp):\n", " \"\"\"\n", " Propagate a ray starting at θ = 90 deg and the surface r=Re, \n", " into the ground at an angle dϕ to the vertical.\n", " \n", " returns the ray path in polar coordinates.\n", " \"\"\"\n", " x0 = 0 \n", " y0 = Re\n", " ϕ0 = -π/2 + dϕ # always send waves into the ground\n", "\n", " q0 = [x0, y0, ϕ0]\n", "\n", " # create an array for the time variable\n", " t = np.arange(0, tmax, dt)\n", " \n", " sol = integrate.odeint(F, q0, t, args=(velocity_model,))\n", " x, y, ϕ = sol.T\n", "\n", " r = np.sqrt(x**2 + y**2)\n", " θ = arctan2(y, x)\n", " \n", " return θ, r, t" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### A note on arctan2\n", "\n", "When converting from Cartesian to polar coordinates, special attention has to be given to which quadrant we require. As well, if $x = 0$ and $y$ is non-zero, we want $\\theta$ to take on a value of $\\theta = -\\pi/2$ even though $y/x$ would technical be undefined. \n", "\n", "There is a special variation of the arctan function, called `arctan2`, that has exactly this behaviour. Notice this is not the square of arctan but just a different version of arctan. See https://en.wikipedia.org/wiki/Atan2 for more information." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example\n", "\n", "Send a P-wave into the Earth." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "θ, r, t = compute_ray(dϕ = π/4, tmax=800, dt=10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can superimpose the ray path on our background." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot_background()\n", "plt.plot(θ, r, color='r')\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The other way to visualize this wave is by its time series." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def plot_timeseries(θ, r, t, axes = None):\n", " if axes is None:\n", " fig, axes = plt.subplots(2,1, figsize=(8,6))\n", " \n", " plt.sca(axes[0])\n", " plt.plot(t, r)\n", " plt.xlabel('t (s)')\n", " plt.ylabel('r (km)')\n", " \n", " plt.sca(axes[1])\n", " plt.plot(t, np.degrees(θ))\n", " plt.xlabel('t (s)')\n", " plt.ylabel(r'$\\theta$')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot_timeseries(θ, r-Re, t)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Travel time\n", "\n", "From the time series plot we can read off that the ray took about 560 s to travel from $\\theta=90^\\circ$ to $\\theta=35^\\circ$ or about $55^\\circ$. Rather than just reading this off the graph, let's try and write a function to find these values automatically." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def travel_time(θ, r, t):\n", " \"\"\"\n", " Determine the travel time and distance (in degrees) for a ray to again reach the surface\n", " \"\"\"\n", " # start search beyond the initial condition\n", " for i in range(1,len(r)):\n", " if r[i] >= Re:\n", " # if we beyond the radius of the Earth, stop.\n", " break\n", " \n", " if r[i] < Re:\n", " print ('Warning: ray did not reach the surface of the Earth')\n", " \n", " time = t[i]\n", " distance = np.degrees(θ[0] - θ[i])\n", " \n", " return time, distance\n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "travel_time(θ, r, t)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice that the results are consistent with our qualitative estimates." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Travel Time Curves" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we can put all the pieces together to create a travel time curve." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Start by generating rays for many different initial angles. Since it takes some time to calcuate each ray path, an information message is printed at the start of every calculation." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot_background()\n", "\n", "for dϕ in np.arange(0.1, 1.0, 0.2):\n", " print(\"Calculating for dϕ = \", dϕ)\n", " θ, r, t = compute_ray(dϕ=dϕ, dt=10)\n", " plt.plot(θ, r, color='r')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice that it appears waves never get seem to make it to between $θ = 315^\\circ$ to $350^\\circ$. This is the P-Wave shadow zone. Compare with this figure here (from [Wikipedia - Shadow zone](https://en.wikipedia.org/wiki/Shadow_zone)):\n", "\n", "![](https://upload.wikimedia.org/wikipedia/commons/1/10/Earthquake_wave_shadow_zone.svg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To compute the travel times we need consider the time series" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots(2,1, figsize=(8,6))\n", "\n", "for dϕ in np.arange(0.1, 1.0, 0.2):\n", " print(\"Calculating for dϕ = \", dϕ)\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax=1200)\n", " plot_timeseries(θ, r, t, axes=axes)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It is important that each one of the above rays actually reaches the Earth's surface for the `travel_time` routine to work. If the ray stops short of the reaching the Earth's surface, you need to use a larger value of `tmax`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "times = []\n", "distances = []\n", "\n", "for dϕ in np.arange(0.1, 1.0, 0.2):\n", " print(\"Calculating for dϕ = \", dϕ)\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax=1300) \n", " time, distance = travel_time(θ, r, t)\n", " times.append(time)\n", " distances.append(distance)\n", " \n", "times = np.array(times)\n", "distances = np.array(distances)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The final step would be to plot a travel time curve." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots()\n", "\n", "# plot travel time for Vp\n", "plt.plot(times / 60, distances, 'o-', label='Vp')\n", "\n", "plt.ylabel('Distance (degrees)')\n", "plt.xlabel('Travel Time (minutes)')\n", "plt.title('Travel Time Curve')\n", "plt.legend(loc='upper left')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Application to Earthquake Detection\n", "\n", "In the slides on the August 24, 2016 earthquake in Italy, there was a seismograph showing **\"the record of the earthquake in Bend, Oregon (BNOR) is illustrated below. Bend is 9365 km (5819 miles, 84.4°) from the location of this earthquake.\"**\n", "\n", "\n", "http://www.iris.edu/hq/files/programs/education_and_outreach/retm/tm_160824_italy/160824italy.pdf" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Task 1: P Wave Travel Time Curve\n", "\n", "Improve the resolution of the Travel Time Curve for the P wave. Specifically, can you use this curve to justify the statement from the slides on the August 24, 2016 earthquake in Italy that said: **\"Following the earthquake, it took 12 minutes and 31 seconds for the compressional P waves to travel a curved path through the mantle to Bend\"**. Adjust the line of code that says\n", " \n", " for dϕ in np.arange(0.1, 1.0, 0.2):\n", " \n", "so that you are able to get a better estimate of the travel time from Italy to Oregon **USING THE REFERENCE EARTH MODEL IN THIS LAB**." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot_background()\n", "\n", "times = []\n", "distances = []\n", "for dϕ in np.arange(0.1, 1.0, 0.2):\n", " print(\"Calculating for dϕ = \", dϕ)\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax = 1300)\n", " plt.plot(θ, r, color='r')\n", "\n", " time, distance = travel_time(θ, r, t)\n", " times.append(time)\n", " distances.append(distance)\n", " \n", "times = np.array(times)\n", "distances = np.array(distances)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots()\n", "plt.plot(times / 60, distances, 'o', label='Vp')\n", "\n", "plt.axhline(84.4, color='k')\n", "plt.ylabel('Distance (degrees)')\n", "plt.xlabel('Travel Time (minutes)')\n", "plt.title('Travel Time Curve')\n", "plt.legend(loc='upper left')\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Our model predicts that a P wave would travel the distance to Bend, Oregon (84.4$^\\circ$) in 12.66 minutes (about 12 minutes and 40 seconds). This is about 9 seconds longer than the actual observation.\n", "\n", "_Answer: (0.56, 0.61, 0.01), tmax=14*60_" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "### Task 2: S Wave Travel Time Curve\n", "Construct a travel time curve for an S-wave. Notice that the routine `compute_ray` is already set up to use a velocity model for S waves as well as for P waves. \n", "\n", "The important line of code that needs to change is\n", "\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax=1300) \n", "\n", "to\n", "\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax=1300, velocity_model=Vs) \n", " \n", "You should then be able compare your result with the statement **\"S waves are shear waves that follow the same path through the mantle as P waves. S waves took 22 minutes and 55 seconds to travel from the earthquake to Bend.**\"\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot_background()\n", "\n", "times = []\n", "distances = []\n", "for dϕ in np.arange(0.1, 1.0, 0.2):\n", " print(\"Calculating for dϕ = \", dϕ)\n", " θ, r, t = compute_ray(dϕ=dϕ, tmax = 1300, velocity_model=Vp)\n", " plt.plot(θ, r, color='r')\n", "\n", " time, distance = travel_time(θ, r, t)\n", " times.append(time)\n", " distances.append(distance)\n", " \n", "times = np.array(times)\n", "distances = np.array(distances)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, axes = plt.subplots()\n", "plt.plot(times / 60, distances, 'o', label='Vs')\n", "\n", "plt.axhline(84.4, color='k')\n", "plt.ylabel('Distance (degrees)')\n", "plt.xlabel('Travel Time (minutes)')\n", "plt.title('Travel Time Curve')\n", "plt.legend(loc='upper left')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Our model predicts about 23 minutes for an S Wave to travel to Bend, Oregon from Italy which is consistent with the observation from the seismograph.\n", "\n", "_Answer: (0.50, 0.64, 0.03), tmax=27*60, Vs_" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 1 }