geodezyx.geodyn package¶
Submodules¶
geodezyx.geodyn.emsgfz_load_interp module¶
Created on Fri Jun 25 16:43:48 2021
@author: psakicki
- geodezyx.geodyn.emsgfz_load_interp.ESMGFZ_DataFrame_reader(path_in, contribution='auto')¶
Reader for CSV files downloaded from EMS’s website
- Parameters
path_in (str) – path of the input CSV file.
contribution (str, optional or None) – add a column for the loading contribution name. ‘auto’ will determine the contribution based on the filename None will not generate such column ‘<contribution name>’: manual name The default is ‘auto’.
- Returns
DF – output DataFrame.
- Return type
DataFrame
- geodezyx.geodyn.emsgfz_load_interp.ESMGFZ_downloader(latitude, longitude, output_dir, components=['NTAL', 'NTOL', 'HYDL', 'SLEL'], CM_CF='CF', outputformat='csv', formatvariables='duNS,duEW,duV', startdate=datetime.datetime(2010, 1, 1, 0, 0), enddate=datetime.datetime(2020, 1, 1, 0, 0), outfile_prefix='')¶
Download loading contribution values for a specific point from ESM’s website
- Parameters
latitude (float) – latitude in degrees.
longitude (float) – longitude in degrees.
output_dir (str) – ouput directory for the downloaded files.
components (list of str, optional) – list of the wished loading contributions. The default is [“NTAL”,”NTOL”,”HYDL”,”SLEL”].
CM_CF (str, optional) – Center of Figure (CF) or Center of Mass (CM). The default is “CF”.
outputformat (str, optional) – choose the output format. CSV is strongly recommended. ‘netcdf’ and ‘timeseries’ is also supported The default is “csv”.
formatvariables (str, optional) – outputed variables. The default is “duNS,duEW,duV”.
startdate (datetime, optional) – start date. The default is dt.datetime(2010,1,1).
enddate (datetime, optional) – start end. The default is dt.datetime(2020,1,1).
outfile_prefix (str, optional) – A custo. The default is “”.
- Returns
output_path – DESCRIPTION.
- Return type
TYPE
- geodezyx.geodyn.emsgfz_load_interp.ESMGFZ_extrapolator(path_or_netcdf_object_in, time_xtrp, lat_xtrp, lon_xtrp, wished_values=('duV', 'duNS', 'duEW'), output_type='DataFrame', debug=False, verbose=True, time_smart=True, interp_method='splinef2d')¶
Extrapolate loading values from the EMSGFZ models esmdata.gfz-potsdam.de:8080/
- Parameters
path_or_netcdf_object_in (string, list of strings or NetCDF object) – Input can be a file path (string), a list of string (will be concatenated) or direcly the NetCDF object (faster).
time_xtrp (float or float iterable) – time for the wished extrapolated values for daily files: hours of day [0..23]. for yearly files: day of years [0..364].
lat_xtrp (float or float iterable) – latitude component for the wished extrapolated values ranging from [-90..90]
lon_xtrp (float or float iterable) – longitude component for the wished extrapolated values. ranging from [-180..180]
wished_values (tuple of string, optional) – the components of the extrapolated values. The default is (“duV”,”duNS”,”duEW”).
output_type (str, optional) – Choose the output type. “DataFrame”,”dict”,”array”,”tuple”,”list” The default is “DataFrame”.
debug (bool, optional) – returns the NetCDF object for debug purposes
- Returns
Points_out – The extrapolated values.
- Return type
see output_type
geodezyx.geodyn.euler_pole_calc module¶
@author: psakic
This sub-module of geodezyx.geodyn contains functions to determine the Euler pole of a tectonic plate.
it can be imported directly with: from geodezyx import geodyn
The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License
Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4
This module is based on the work of : Goudarzi, M. A., Cocard, M., & Santerre, R. (2014). EPC: Matlab software to estimate Euler pole parameters. GPS Solutions, 18(1), 153–162. https://doi.org/10.1007/s10291-013-0354-4
- geodezyx.geodyn.euler_pole_calc.covarvec2wtmat(covars)¶
Internal fuction for euler_pole_calc
- geodezyx.geodyn.euler_pole_calc.euler_pole_calc(lat_ref, long_ref, vn_ref, ve_ref, incvn_ref=None, incve_ref=None, Rt=6371008.8)¶
Compute the Euler pole of a set of reference points
- Parameters
lat_ref (list or numpy.array) – latitude and longitude of the reference points (deg)
long_ref (list or numpy.array) – latitude and longitude of the reference points (deg)
vn_ref (list or numpy.array) – north and east velocities of the reference points (m/yr)
ve_ref (list or numpy.array) – north and east velocities of the reference points (m/yr)
incvn_ref (list or numpy.array) – uncertainties on north and east velocities of the reference points (m/yr)
incve_ref (list or numpy.array) – uncertainties on north and east velocities of the reference points (m/yr)
Rt (float) – Earth Radius IUGG value = 6.3710088e6 IAU value = 6.378e6
- Returns
w (numpy.array) – Euler vector (rad/yr)
wratedeg (float) – Rate of rotation (deg/Myr)
wlat,wlong (float) – latitude and longitude of the Euler pole (deg)
wwmat (numpy.array) – weight matrix (for debug)
desmat (numpy.array) – design matrix (for debug)
nrmatinv (2-tuple) – output of scipy’s lstsq fct (for debug)
Source
——
based on
Goudarzi, M. A., Cocard, M., & Santerre, R. (2014). EPC (Matlab software to estimate Euler pole parameters. GPS Solutions, 18(1), 153–162. https://doi.org/10.1007/s10291-013-0354-4)
Notes
w is the common element for all Euler pole functions
Should remains in rad/yr
Written by C. Geisert (ENSTA/LIENSs) - 2017
- geodezyx.geodyn.euler_pole_calc.euler_pole_quality(w, vn_ref, ve_ref, nrmatinv, desmat, wwmat, pretty_output=True)¶
Compute the uncertainties of the Euler pole determination
- Parameters
w (numpy.array) – Pole of rotation vector computed by euler_pole_calc
vn_ref (list or numpy.array) – north and east velocities of the reference points (m/yr)
ve_ref (list or numpy.array) – north and east velocities of the reference points (m/yr)
nrmatinv (2-tuple) – output of scipy’s lstsq fct from euler_pole_calc
wwmat (numpy.array) – weight matrix from euler_pole_calc
desmat (numpy.array) – design matrix from euler_pole_calc
pretty_output (bool) – if True, convert sigma_ww_latlon to pertinent units directly, returns raw units instead
- Returns
sigma_ww (numpy.array) – Uncertainty on the Euler vector
sigma_ww_latlon (numpy.array) – Uncertainty on the Euler pole : [rateSigma, latSigma, longSigma] if pretty_output == True : [deg/Myr,deg,deg] if pretty_output == False : [rad/yr,rad,rad]
dV_topo3 (numpy.array) – Residual velocities for the references points
wrmse (float) – weigthed RMS on Residual velocities (m)
wrmse_norm (float) – nomalized weigthed RMS on Residual velocities (m)
rmse (float) – unweigthed RMS on Residual velocities (m)
apost_sigma (float) – a-posteriori sigma (m)
Notes
w is the common element for all Euler pole functions
Should remains in rad/yr
- geodezyx.geodyn.euler_pole_calc.euler_pole_vector_from_latlongrate(wlat, wlong, wrate, return_w_in_deg_per_Myr=False)¶
Compute the Euler vector from the pole latitude, longitude and rate
- Parameters
wlat (float) – latitude and longitude of the Euler pole (deg)
wlong (float) – latitude and longitude of the Euler pole (deg)
wrate (float) – rate of the Euler pole (rad/Myr)
- Returns
w – Pole of rotation vector (rad/yr)
- Return type
numpy.array
Notes
w is the common element for all Euler pole functions
Should remains in rad/yr per default
Written by C. Geisert (ENSTA/LIENSs) - 2017
- geodezyx.geodyn.euler_pole_calc.euler_pole_vector_to_latlongrate(w)¶
Convert Euler pole vector to latitude longitude and rate
- Parameters
w (numpy.array) – Pole of rotation vector computed by euler_pole_calc (rad/yr)
- Returns
wlat,wlong (float) – latitude and longitude of the Euler pole (deg)
wrate (float) – Rate of rotation (rad/Myr)
wratedeg (float) – Rate of rotation (deg/Myr)
Notes
w is the common element for all Euler pole functions
Should remains in rad/yr
Written by P. Sakic based on C. Geisert’s work
- geodezyx.geodyn.euler_pole_calc.euler_vels_relative_to_ref(w, lat_ITRF, long_ITRF, vn_ITRF, ve_ITRF, incvn_ITRF=None, incve_ITRF=None, Rt=6378000.0)¶
Compute relative velocities of points with respect to a reference plate/Euler pole
- Parameters
w (numpy.array) – Pole of rotation vector computed by euler_pole_calc (rad/yr)
lat_ITRF (list or numpy.array) – latitude and longitude of the points (deg)
long_ITRF (list or numpy.array) – latitude and longitude of the points (deg)
vn_ITRF (list or numpy.array) – north and east velocities of the points (m/yr)
ve_ITRF (list or numpy.array) – north and east velocities of the points (m/yr)
incvn_ITRF (list or numpy.array) – uncertainties on north and east velocities of the points (m/yr)
incve_ITRF (list or numpy.array) – uncertainties on north and east velocities of the points (m/yr)
- Returns
vel_reltoref – relative velocities of points with respect to the Euler pole w
- Return type
numpy.array
Notes
w is the common element for all Euler pole functions
Should remains in rad/yr
Written by C. Geisert (ENSTA/LIENSs) - 2017
- geodezyx.geodyn.euler_pole_calc.topo2dm(coords)¶
Internal fuction for euler_pole_calc
geodezyx.geodyn.velo_field_map_plt module¶
@author: psakic
This sub-module of geodezyx.geodyn contains functions to plot velocity vectors on a map.
it can be imported directly with: from geodezyx import geodyn
The GeodeZYX Toolbox is a software for simple but useful functions for Geodesy and Geophysics under the GNU GPL v3 License
Copyright (C) 2019 Pierre Sakic et al. (GFZ, pierre.sakic@gfz-postdam.de) GitHub repository : https://github.com/GeodeZYX/GeodeZYX-Toolbox_v4
- geodezyx.geodyn.velo_field_map_plt.LevelColormap(levels, cmap=None)¶
Make a colormap based on an increasing sequence of levels
- geodezyx.geodyn.velo_field_map_plt.area(lo, la, grid, minla, maxla, minlo, maxlo, type_long='0-180')¶
- geodezyx.geodyn.velo_field_map_plt.draw_map(station_etude, latm, latM, lonm, lonM, path, all_pos, hw, vn_ITRF, ve_ITRF, plot_vertical_ITRF, incvn_ITRF, incve_ITRF, incplot_vertical_ITRF, plot_GEBCO=False, plot_vertical=False, plot_topo=True, plot_ellipses=True, coarse_lines=False, legend_arrow_length=('1 cm/yr', 0.01), legend_ellipse_size=('2 mm/yr', 0.002), legend_position=(0.5, 0.9), scale_arrow=15000000, scale_ellipse=10000000, name_stats=True, name_stats_font_size=8, name_stats_offset=(0.005, 0.01), shorten_oversized_arrows=True, exclude_points_out_of_range=True, adjust_text=False, pixels_hires_backgrnd=2000, draw_borders=True, full_return=False, draw_latlon_lines=True)¶
- geodezyx.geodyn.velo_field_map_plt.landmask(M, color='0.8')¶
- geodezyx.geodyn.velo_field_map_plt.split_grid(lo, la, gr, fact)¶