Software Open Access
Mark Wieczorek; MMesch; Ilya Oshchepkov; Elliott Sales de Andrade; xoviat; Benda Xu; Akihisa Hattori; Stefan Schröder; Katrin Leinweber; Andrew Walker; Aaryaman Vasishta
Version 4.6 New extended grids
All grid formats now allow to compute the redundant values at 360 E longitude (GLQ and DH), as well as at 90 S (DH only). These extended grids are now the default in pyshtools, but remain optional in the Fortran 95 routines. The use of extended grids is controlled by the optional argument
extend. The purpose of these extended grids is to better integrate with the plotting routines that require these points (i.e.., Cartopy and pygmt).
The plotting routine
SHGrid.plot() has been refactored to allow support for projections using
colorbarnow takes the options 'top', 'bottom', 'left' or 'right'.
cb_ylabelfor a label on the y axis of the colorbar,
cb_tick_intervalfor specifying the major tick interval,
cb_minor_tick_intervalfor specifying minor tick intervals,
cb_trianglesfor plotting upper/lower limit triangles at the ends of the colorbar,
cb_widthto specify the colorbar width, and
cb_offsetto override the default spacing between the map and colorbar.
cmap_limitsto specify the lower and upper bounds of the data, as well as an interval for constant color intervals, and
cmap_reverseto reverse the colormap.
ticksspecifies which ticks and annotations to show, using a syntax from the generic mapping tools (i.e.,
SHGrid.plotgmt(). This function takes nearly the same arguments as
plot(). As soon as pygmt implements projection classes (https://github.com/GenericMappingTools/pygmt/pull/379), this will be incorporated into the
plotfunction in the same manner as Cartopy was.
SHGrid.from_xarray()to initialize a grid from an xarray DataArray.
SHGeoid.to_xarray()to export an xarray DataArray and
to_netcdf()to export a netcdf object readable by the generic mapping tools.
SHMagGrid.to_xarray()to export all gridded data (radial, theta, phi, total, and potential) as an xarray DataSet.
SHMagTensor.to_xarray()to export all gridded data (Vxx, invariants, eigenvalues) as an xarray DataSet.
SHGravCoeffs.center_of_massto calculate the center of mass of a body.
SHGravCoeffs.inertia_tensor()to calculate the moment of inertia tensor.
read_icgem_gfc()function was extended with the option
encodingas some models in ICGEM are not in UTF-8.
centroid()to the class
SHCoeffs. The centroid is computed as the center of mass of a homogeneous object.
SHGrid.to_imag()return the real and imaginary components of a complex
PlON_d1when calculating the Legendre polynomials at the north and south pole.
requests.get(), and has been implemented in the function
Curve2Mask. As part of this fix, the optional parameter
centralmeridianhas been removed as it is no longer required. The longitudes of the curve can possess values from -360 to 720 degrees, and the routine searches for discontinuities that may occur between two successive points as the longitudes pass from 360 to 0, or -180 to 180 degrees.