SHTOOLS/SHTOOLS: Version 4.6.2
Authors/Creators
- 1. Laboratoire Lagrange - Observatoire de la Côte d'Azur
- 2. Center of Geodesy, Cartography and SDI (TsNIIGAiK)
- 3. Universität Bonn
- 4. @TIBHannover
- 5. University of Tokyo
Description
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
colorbarnow takes the options 'top', 'bottom', 'left' or 'right'. - Improved plotting and placement of colorbars. New optional arguments include
cb_labelfor labels,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, andcb_offsetto override the default spacing between the map and colorbar. - Improved colormap handling: New optional arguments include
cmap_limitsto specify the lower and upper bounds of the data, as well as an interval for constant color intervals, andcmap_reverseto reverse the colormap. - Improved handling of ticks and annotations: The optional argument
ticksspecifies 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 theplotfunction 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,SHGravCoeffsandSHMagCoeffsclasses. - 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_massto 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
constantmodule. - The
read_icgem_gfc()function was extended with the optionencodingas 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 complexSHGridinstance. - Added an optional argument
copytoSHCoeffs.pad(). - Fixed bugs in the Fortran code of
PlBar_d1andPlON_d1when 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 theSHCoeffsmethodfrom_file(). - Fixed a bug in the fortran code of
Curve2Mask. As part of this fix, the optional parametercentralmeridianhas 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.2.zip
Files
(61.4 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:bf3776fe37cdc3b9810f4dcb972e7b77
|
61.4 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/SHTOOLS/SHTOOLS/tree/v4.6.2 (URL)