SHTOOLS/SHTOOLS: Version 4.6
Creators
- 1. Laboratoire Lagrange - Observatoire de la Côte d'Azur
- 2. Center of Geodesy, Cartography and SDI (TsNIIGAiK)
- 3. @TIBHannover
Description
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 Cartopy
and pygmt
.
- An incorrect 0.5 pixel offset was fixed when plotting grids via matplotlib, and grids now correctly plot both 0 and 360 degrees using the new "extended" grids of
SHGrid
. - Support was added for Cartopy projections, by specifying:
SHGrid.plot(projection=ccrs.ProjectionName())
. - The argument
colorbar
now takes the options 'top', 'bottom', 'left' or 'right'. - Improved plotting and placement of colorbars. New optional arguments include
cb_label
for labels,cb_ylabel
for a label on the y axis of the colorbar,cb_tick_interval
for specifying the major tick interval,cb_minor_tick_interval
for specifying minor tick intervals,cb_triangles
for plotting upper/lower limit triangles at the ends of the colorbar,cb_width
to specify the colorbar width, andcb_offset
to override the default spacing between the map and colorbar. - Improved colormap handling: New optional arguments include
cmap_limits
to specify the lower and upper bounds of the data, as well as an interval for constant color intervals, andcmap_reverse
to reverse the colormap. - Improved handling of ticks and annotations: The optional argument
ticks
specifies which ticks and annotations to show, using a syntax from the generic mapping tools (i.e.,'WSen'
). - Experimental support for pygmt using the routine
SHGrid.plotgmt()
. This function takes nearly the same arguments asplot()
. As soon as pygmt implements projection classes (https://github.com/GenericMappingTools/pygmt/pull/379), this will be incorporated into theplot
function in the same manner as Cartopy was. - All gravity, magnetics, tensor, localization windows and slepian function plotting routines incorporate these changes.
- Added a new introductory notebook that shows how to use all features of the
plot()
function.
- Added the methods
to_netcdf()
andfrom_netcdf()
to theSHCoeffs
,SHGravCoeffs
andSHMagCoeffs
classes. - Added the method
SHGrid.from_xarray()
to initialize a grid from an xarray DataArray. - Added improved descriptive attributes for netcdf files that mirror these conventions.
- Added the method
SHGeoid.to_xarray()
to export an xarray DataArray andto_netcdf()
to export a netcdf object readable by the generic mapping tools. - Added the methods
SHGravGrid.to_xarray()
andSHMagGrid.to_xarray()
to export all gridded data (radial, theta, phi, total, and potential) as an xarray DataSet. - Added the methods
SHGravTensor.to_xarray()
andSHMagTensor.to_xarray()
to export all gridded data (Vxx, invariants, eigenvalues) as an xarray DataSet.
- Added the method
SHGravCoeffs.center_of_mass
to calculate the center of mass of a body. - Added the method
SHGravCoeffs.inertia_tensor()
to calculate the moment of inertia tensor. - Added the Earth dynamical flattening constant H (IERS Conventions 2010) to the
constant
module. - The
read_icgem_gfc()
function was extended with the optionencoding
as some models in ICGEM are not in UTF-8. - Addded the method
centroid()
to the classSHCoeffs
. The centroid is computed as the center of mass of a homogeneous object.
- New methods
SHGrid.to_real()
andSHGrid.to_imag()
return the real and imaginary components of a complexSHGrid
instance. - Added an optional argument
copy
toSHCoeffs.pad()
. - Fixed bugs in the Fortran code of
PlBar_d1
andPlON_d1
when calculating the Legendre polynomials at the north and south pole. - Spherical harmonic coefficients can be read remotely by specifying a URL as the filename. This functionality uses
requests.get()
, and has been implemented in the functionshread()
and theSHCoeffs
methodfrom_file()
. - Fixed a bug in the fortran code of
Curve2Mask
. As part of this fix, the optional parametercentralmeridian
has 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.
Files
SHTOOLS/SHTOOLS-v4.6.zip
Files
(61.4 MB)
Name | Size | Download all |
---|---|---|
md5:982d606166a63cc5181be02213fc19b2
|
61.4 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/SHTOOLS/SHTOOLS/tree/v4.6 (URL)