interpolate_moho_depths
Script to create linear interpolation of the moho depths. And then get values with the surface. Meta aftes tis times mporoun na dior8w8oun mia mia…
Location: Chavannes-pres-renens, CH Date: Feb 2023 Author: Konstantinos Michailos
Attributes
Functions
|
Gives the 2-D interpolated surface of exhumation rates. |
|
Module Contents
- interpolate_moho_depths.interp_surf(x_, y_, z_, plot=False, **kwargs)[source]
Gives the 2-D interpolated surface of exhumation rates.
Use scipy interpolate to create a 2-D surface of a grid of observations.
- Parameters:
x (list) – list of coordinates (longitude)
y (list) – list of coordinates (latitutes)
z (list) – list of values to be interpolated
kwargs – Any other arguments accepted by scipy.interpolate
- Returns:
interpolated surface
- Return type:
function
Example fig = plt.figure(figsize=(10, 6)) ax = axes3d.Axes3D(fig) ax.plot_wireframe(x, y, z) ax.plot_surface(x, y, z, cmap=cm.viridis, alpha=0.2) ax.scatter3D(x, y, z, c=’r’) ax.set_zlim(.0, 12.0) ax.zaxis.set_major_locator(LinearLocator(10)) ax.zaxis.set_major_formatter(FormatStrFormatter(‘%.02f’)) plt.show()
>>> f = interp_surf(x,y,z) >>> znew = f(xnew, ynew)