Displacement_strain_planet.Displacement_strain module

Functions for calculating Legendre polynomial derivatives, stresses and strains and plotting the Knapmeyer et al. (2006) tectonic dataset.

Displacement_strain_planet.Displacement_strain.Displacement_strains(A_lm, w_lm, E, v, R, Te, lmax, depth=0, colat_min=0, colat_max=180, lon_min=0, lon_max=360, grid='DH', lmaxgrid=None, Y_lm_d1_t=None, Y_lm_d1_p=None, Y_lm_d2_t=None, Y_lm_d2_p=None, Y_lm_d2_tp=None, y_lm=None, path=None, quiet=True)

Computes the Banerdt (1986) equations to determine strains and stresses from the displacements.

Returns:

  • stress_theta (array, size(2*lmax+2,2*(2*lmax+2))) – Array with the stress field with respect to colatitude. This is equation A12 from Banerdt (1986).

  • stress_phi (array, size(2,lmax+1,lmax+1)) – Array with the stress field with respect to longitude. This is equation A13 from Banerdt (1986).

  • stress_theta_phi (array, size(2,lmax+1,lmax+1)) – Array with the stress field with respect to colatitude and longitude. This is equation A14 from Banerdt (1986).

  • eps_theta (array, size(2,lmax+1,lmax+1)) – Array with the elongation with respect to colatitude. This is equation A16 from Banerdt (1986).

  • eps_phi (array, size(2,lmax+1,lmax+1)) – Array with the elongation with respect to longitude. This is equation A17 from Banerdt (1986).

  • omega (array, size(2,lmax+1,lmax+1)) – Array with the shearing deformation. This is equation A18 from Banerdt (1986).

  • kappa_theta (array, size(2,lmax+1,lmax+1)) – Array with the bending deformation with respect to colatitude. This is equation A19 from Banerdt (1986).

  • kappa_phi (array, size(2,lmax+1,lmax+1)) – Array with the bending deformation with respect to longitude. This is equation A20 from Banerdt (1986).

  • tau (array, size(2,lmax+1,lmax+1)) – Array with the twisting deformation. This is equation A21 from Banerdt (1986).

  • tot_theta (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to colatitude.

  • tot_phi (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to longitude.

  • tot_thetaphi (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to colatitude and longitude.

Parameters:
  • A_lm (array, float, size(2,lmax+1,lmax+1)) – Array with the spherical harmonic coefficients of the poloidal term of the tangential displacement.

  • w_lm (array, float, size(2,lmax+1,lmax+1)) – Array with the spherical harmonic coefficients of the upward displacement.

  • E (float) – Young’s modulus.

  • v (float) – Poisson’s ratio.

  • R (float) – Mean radius of the planet.

  • Te (float) – Elastic thickness of the lithosphere.

  • lmax (int) – Maximum spherical harmonic degree for computations.

  • depth (float, optional, default = 0) – The depth at which stresses are estimated.

  • colat_min (float, optional, default = 0) – Minimum colatitude for grid computation of strains and stresses.

  • colat_max (float, optional, default = 180) – Maximum colatitude for grid computation of strains and stresses.

  • lon_min (float, optional, default = 0) – Minimum longitude for grid computation of strains and stresses.

  • lon_max (float, optional, default = 360) – Maximum longitude for grid computation of strains and stresses.

  • grid (string, optional, default = 'DH') – Either ‘DH’ or ‘GLQ’ for Driscoll and Healy grids or Gauss-Legendre Quadrature grids following the convention of SHTOOLs.

  • lmaxgrid (int, optional, default = None) – The maximum spherical harmonic degree resolvable by the grid. If None, this parameter is set to lmax. When grid==’GLQ’, the gridshape is (lmaxgrid+1, 2*lmaxgrid+1) and (2*lmaxgrid+2, 2*(2*lmaxgrid+2)) when grid==’DH’.

  • Y_lm_d1_t (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array with the first derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d1_p (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array with the first derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_t (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array with the second derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d2_p (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array with the second derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_tp (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array with the first derivative of Legendre polynomials with respect to colatitude and longitude.

  • y_lm (array, float, size(2,lmax+1,lmax+1), optional, default = None) – Array of spherical harmonic functions.

  • path (string, optional, default = None) – path where to find the stored Legendre polynomials.

  • quiet (bool, optional, default = True) – If True, suppress printing output.

Displacement_strain_planet.Displacement_strain.Displacement_strains_shtools(A_lm, w_lm, E, v, R, Te, lmax, depth=0, lmaxgrid=None, quiet=True)

Computes the Banerdt (1986) equations to determine strains and stresses from the displacements. This function uses SHTOOLS to derive the spherical harmonic gradients. This does not support GLQ grids.

Returns:

  • stress_theta (array, size(2*lmax+2,2*(2*lmax+2))) – Array with the stress field with respect to colatitude. This is equation A12 from Banerdt (1986).

  • stress_phi (array, size(2,lmax+1,lmax+1)) – Array with the stress field with respect to longitude. This is equation A13 from Banerdt (1986).

  • stress_theta_phi (array, size(2,lmax+1,lmax+1)) – Array with the stress field with respect to colatitude and longitude. This is equation A14 from Banerdt (1986).

  • eps_theta (array, size(2,lmax+1,lmax+1)) – Array with the elongation with respect to colatitude. This is equation A16 from Banerdt (1986).

  • eps_phi (array, size(2,lmax+1,lmax+1)) – Array with the elongation with respect to longitude. This is equation A17 from Banerdt (1986).

  • omega (array, size(2,lmax+1,lmax+1)) – Array with the shearing deformation. This is equation A18 from Banerdt (1986).

  • kappa_theta (array, size(2,lmax+1,lmax+1)) – Array with the bending deformation with respect to colatitude. This is equation A19 from Banerdt (1986).

  • kappa_phi (array, size(2,lmax+1,lmax+1)) – Array with the bending deformation with respect to longitude. This is equation A20 from Banerdt (1986).

  • tau (array, size(2,lmax+1,lmax+1)) – Array with the twisting deformation. This is equation A21 from Banerdt (1986).

  • tot_theta (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to colatitude.

  • tot_phi (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to longitude.

  • tot_thetaphi (array, size(2,lmax+1,lmax+1)) – Array with the total deformation with respect to colatitude and longitude.

Parameters:
  • A_lm (array, float, size(2,lmax+1,lmax+1)) – Array with the spherical harmonic coefficients of the poloidal term of the tangential displacement.

  • w_lm (array, float, size(2,lmax+1,lmax+1)) – Array with the spherical harmonic coefficients of the upward displacement.

  • E (float) – Young’s modulus.

  • v (float) – Poisson’s ratio.

  • R (float) – Mean radius of the planet.

  • Te (float) – Elastic thickness of the lithosphere.

  • lmax (int) – Maximum spherical harmonic degree for computations.

  • depth (float, optional, default = 0) – The depth at which stresses are estimated.

  • lmaxgrid (int, optional, default = None) – The maximum spherical harmonic degree resolvable by the grid. If None, this parameter is set to lmax. When grid==’GLQ’, the gridshape is (lmaxgrid+1, 2*lmaxgrid+1) and (2*lmaxgrid+2, 2*(2*lmaxgrid+2)) when grid==’DH’. Quadrature grids following the convention of SHTOOLs. If None, the grid is set to ‘GLQ’.

  • quiet (bool, optional, default = True) – If True, suppress printing output.

Displacement_strain_planet.Displacement_strain.Plt_tecto_Mars(path, compression=False, extension=True, ax=None, compression_col='k', extension_col='purple', lw=1, legend_show=True, legend_loc='upper left')

Plot the Knampeyer et al. (2006) dataset of extensional and compressional tectonic features on Mars.

Parameters:
  • path (string) – path for the location of the Knameyer et al (2006) dataset.

  • compression (bool, optional, default = False) – If True, plot compressive tectonic features.

  • extension (bool, optional, default = True) – If True, plot extensive tectonic features.

  • ax (array of object, optional, default = None) – Matplotlib axes.

  • compression_col (string, optional, default = "k") – Color of compressive tectonic features.

  • extension_col (string, optional, default = "purple") – Color of extensive tectonic features.

  • lw (int, optional, default = 1) – Linewidth for the tectonic features

  • legend_show (bool, optional, default = True) – If True, add a legend to the plot.

  • legend_loc (string, optional, default = "upper left") – Determine the legend position.

Displacement_strain_planet.Displacement_strain.Principal_strainstress_angle(s_theta, s_phi, s_theta_phi)

Calculate principal strains, stresses, and their principal angles.

Returns:

  • min_strain (array, size same as input arrays) – Array with the minimum principal horizontal strain or stress.

  • max_strain (array, size same as input arrays) – Array with the maximum principal horizontal strain or stress.

  • sum_strain (array, size same as input arrays) – Array with the sum of the principal horizontal strain or stress.

  • principal_angle (array, size same as input arrays) – Array with the principal strain or stress direction in degrees.

Parameters:
  • s_theta (array, float, size(nlat, nlon)) – Array of the colatitude component of the stress or strain field.

  • s_phi (array, float, size(nlat, nlon)) – Array of the longitude component of the stress or strain field.

  • s_theta_phi (array, float, size(nlat, nlon)) – Array of the colatitude and longitude component of the stress or strain field.

Displacement_strain_planet.Displacement_strain.SH_deriv(theta, phi, lmax)

Compute spherical harmonic derivatives at a given location (first and second order).

Returns:

  • Y_lm_d1_theta_a (array, size(2,lmax+1,lmax+1)) – Array with the first derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d1_phi_a (array, size(2,lmax+1,lmax+1)) – Array with the first derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_theta_a (array, size(2,lmax+1,lmax+1)) – Array with the second derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d2_phi_a (array, size(2,lmax+1,lmax+1)) – Array with the second derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_thetaphi_a (array, size(2,lmax+1,lmax+1)) – Array with the first derivative of Legendre polynomials with respect to colatitude and longitude.

  • y_lm (array, size(2,lmax+1,lmax+1)) – Array of spherical harmonic functions.

Parameters:
  • theta (float) – Colatitude in radian.

  • phi (float) – Longitude in radian.

  • lmax (int) – Maximum spherical harmonic degree to compute for the derivatives.

Displacement_strain_planet.Displacement_strain.SH_deriv_store(lmax, path, colat_min=0, colat_max=180, lon_min=0, lon_max=360, grid='DH', dtype=<class 'numpy.float64'>, lmaxgrid=None, save=True, compressed=False, quiet=True)

Compute and store or load spherical harmonic derivatives (first and second order) over the entire sphere or given a set of colatiudes/longitudes bounds. The spherical harmonic degree and order correspond to the index l*(l+1)/2+m. This routine supports both Driscoll and Healy (DH) and Gauss-Legendre Quadrature (GLQ) grids.

Returns:

  • Y_lm_d1_theta_a (array, size(2,(lmax+1)*(lmax+2)/2)) – Array with the first derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d1_phi_a (array, size(2,(lmax+1)*(lmax+2)/2)) – Array with the first derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_theta_a (array, size(2,(lmax+1)*(lmax+2)/2)) – Array with the second derivative of Legendre polynomials with respect to colatitude.

  • Y_lm_d2_phi_a (array, size(2,(lmax+1)*(lmax+2)/2)) – Array with the second derivative of Legendre polynomials with respect to longitude.

  • Y_lm_d2_thetaphi_a (array, size(2,(lmax+1)*(lmax+2)/2)) – Array with the first derivative of Legendre polynomials with respect to colatitude and longitude.

  • y_lm_save (array, size(2,(lmax+1)*(lmax+2)/2)) – Array of spherical harmonic functions.

Parameters:
  • lmax (int) – Maximum spherical harmonic degree to compute for the derivatives.

  • path (string) – Path to store or load spherical harmonic derivatives.

  • colat_min (float, optional, default = 0) – Minimum colatitude for grid computation of SH derivatives.

  • colat_max (float, optional, default = 180) – Maximum colatitude for grid computation of SH derivatives.

  • lon_min (float, optional, default = 0) – Minimum longitude for grid computation of SH derivatives.

  • lon_max (float, optional, default = 360) – Maximum longitude for grid computation of SH derivatives.

  • grid (string, optional, default = 'DH') – Either ‘DH’ or ‘GLQ’ for Driscoll and Healy grids or Gauss-Legendre Quadrature grids following the convention of SHTOOLs.

  • dtype (data-type, optional, default = numpy.float64) – The desired data-type for the arrays (default is that of numpy). This can help reducing the size of the stored array.

  • lmaxgrid (int, optional, default = None) – The maximum spherical harmonic degree resolvable by the grid. If None, this parameter is set to lmax. The gridshape is (2*lmaxgrid+2, 2*(2*lmaxgrid+2)), DH2 grid. If None, the grid is set to ‘GLQ’.

  • save (bool, optional, default = True) – If True, save the data at the given path location.

  • compressed (bool, optional, default = False) – If True, the data is saved in compressed .npz format instead of npy, which decreases the file size by about a factor 2. This is recommended when lmax > 75.

  • quiet (bool, optional, default = True) – If True, suppress printing output.

Displacement_strain_planet.Displacement_strain.Strainstress_from_principal(min_strain, max_strain, sum_strain, principal_angle)

Calculate strains or stresses, from their principal values.

Returns:

  • s_theta (array, float, size same as input arrays) – Array of the colatitude component of the stress or strain field.

  • s_phi (array, float, size same as input arrays) – Array of the longitude component of the stress or strain field.

  • s_theta_phi (array, float, size same as input arrays) – Array of the colatitude and longitude component of the stress or strain field.

Parameters:
  • min_strain (array, size(nlat, nlon)) – Array with the minimum principal horizontal strain or stress.

  • max_strain (array, size(nlat, nlon)) – Array with the maximum principal horizontal strain or stress.

  • sum_strain (array, size(nlat, nlon)) – Array with the sum of the principal horizontal strain or stress.

  • principal_angle (array, size(nlat, nlon)) – Array with the principal strain or stress direction in degrees.