gplately.DataServer
- class gplately.DataServer(model_name, data_dir=None)[source]
Bases:
objectAccess, download, and cache plate-model data and related geospatial datasets.
DataServeris a convenience interface overplate_model_manager. It downloads requested assets into the local GPlately cache directory and reuses cached files when available.Main capabilities include:
Loading rotation/topology/static-polygon inputs for plate reconstruction.
Loading optional topology geometries (coastlines, continents, COBs).
Fetching time-dependent rasters (for example age and spreading-rate grids).
Fetching supported present-day rasters and curated feature datasets.
Notes
Cache reuse is automatic. Repeated calls generally avoid re-downloading unchanged files.
Example
import gplately data_server = gplately.DataServer("Muller2025") rotation_model, topology_features, static_polygons = ( data_server.get_plate_reconstruction_files() )
See also
This table provides a list of available plate reconstruction models.
Visit this EarthByte web page for more information about these plate models.
Call
gplately.auxiliary.get_data_server_cache_path()to see the path to theGPlately cache folder.
- __init__(model_name, data_dir=None)[source]
Initialize a data server for a plate model .
- Parameters:
model_name (str) – Plate model name (for example
"Muller2025").data_dir (str or os.PathLike, optional) – Local directory used by
plate_model_managerto store or read model data. If not provided, the default GPlately cache path is used.
- Raises:
Exception – If the requested model collection cannot be resolved.
Example
import gplately data_server = gplately.DataServer("Muller2025")
Methods
__init__(model_name[, data_dir])Initialize a data server for a plate model .
The location of DataServer cache on your computer.
get_age_grid(times[, reference_frame, ...])Download the seafloor age grids for the plate model.
get_feature_data(feature_data_id_string)Download and load supported geological feature datasets.
Download and return a tuple of rotation_model, topology_features and static_polygons.
get_raster(raster_name)Download rasters that are not associated with any plate reconstruction models.
get_spreading_rate_grid(times[, ...])Download seafloor spreading rate grids from the plate reconstruction model and save the grids in the
GPlately cache folder.Download and return coastlines, continental polygons and COBs (continent-ocean boundary).
Deprecated!!! Use
DataServer.valid_timesinstead.Attributes
A pygplates.FeatureCollection object containing continent-ocean boundaries.
A pygplates.FeatureCollection object containing coastlines.
A pygplates.FeatureCollection object containing continental polygons.
The max age/time of the plate model.
Return the model rotation tree as a
pygplates.RotationModel.A pygplates.FeatureCollection object containing static polygons.
Deprecated!!! Use
DataServer.valid_timeinstead.The min age/time of the plate model.
A pygplates.FeatureCollection object containing topology features.
The period of time the plate model are valid.
Deprecated!!! Use
DataServer.valid_timeinstead.- property COBs
A pygplates.FeatureCollection object containing continent-ocean boundaries.
- property coastlines
A pygplates.FeatureCollection object containing coastlines.
- property continents
A pygplates.FeatureCollection object containing continental polygons.
- get_age_grid(times: int | list[int], reference_frame: ReferenceFrame | None = None, generated_from: GenerationMethod | None = None)[source]
Download the seafloor age grids for the plate model. Save the grids in the
GPlately cache folder.See also
- Parameters:
times (int, or a list of int) – A reconstruction time or a list of reconstruction times.
- Return type:
gplately.Rasteror a list ofgplately.Raster
Note
The age grid data can be accessed as a numpy ndarray or MaskedArray via the
gplately.Raster.dataattribute.For example:
1data_server = gplately.DataServer("zahirovic2022") 2graster = data_server.get_age_grid(100) 3graster_data = graster.data
where
graster_datais a numpy ndarray.- Raises:
ValueError – If the
timesparameter contains invalid reconstruction time.
Example
To download Zahirovic et al. (2022) seafloor age grids for 0Ma, 1Ma and 100 Ma:
1data_server = gplately.DataServer("zahirovic2022") 2age_grids = data_server.get_age_grid([0, 1, 100])
See also
1from gplately import PlateModelManager 2 3model = PlateModelManager().get_model("zahirovic2022") 4print(model.get_rasters("AgeGrids", times=[10, 20, 30])) 5print(model.get_raster("AgeGrids", time=100))
- static get_feature_data(feature_data_id_string: str)[source]
Download and load supported geological feature datasets.
This method fetches a dataset from the EarthByte GPlates sample-data server, caches it under the GPlately cache directory, and returns one or more
pygplates.FeatureCollectionobjects from matching files.Supported dataset identifiers:
SeafloorFabric: Seafloor tectonic fabric data (Matthews et al., 2011).Johansson2018: Large igneous provinces (Johansson et al., 2018).Whittaker2015: Igneous province products interpreted as plume products (Whittaker et al., 2015).Hotspots: Present-day hotspot/plume locations (Whittaker et al., 2013).
Detailed descriptions can be found below:
Large igneous provinces from Johansson et al. (2018)
- Information:
Formats: .gpmlz
feature_data_id_string = Johansson2018
- Citations:
Johansson, L., Zahirovic, S., and Müller, R. D., In Prep, The interplay between the eruption and weathering of Large Igneous Provinces and the deep-time carbon cycle: Geophysical Research Letters.
Large igneous province products interpreted as plume products from Whittaker et al. (2015)
- Information:
Formats: .gpmlz, .shp
feature_data_id_string = Whittaker2015
- Citations:
Whittaker, J. M., Afonso, J. C., Masterton, S., Müller, R. D., Wessel, P., Williams, S. E., & Seton, M. (2015). Long-term interaction between mid-ocean ridges and mantle plumes. Nature Geoscience, 8(6), 479-483. doi:10.1038/ngeo2437.
Seafloor tectonic fabric (fracture zones, discordant zones, V-shaped structures, unclassified V-anomalies, propagating ridge lineations and extinct ridges) from Matthews et al. (2011)
- Information:
Formats: .gpmlz
feature_data_id_string = SeafloorFabric
- Citations:
Matthews, K.J., Müller, R.D., Wessel, P. and Whittaker, J.M., 2011. The tectonic fabric of the ocean basins. Journal of Geophysical Research, 116(B12): B12109, DOI: 10.1029/2011JB008413.
Present day surface hotspot/plume locations from Whittaker et al. (2013)
- Information:
Formats: .gpmlz
feature_data_id_string = Hotspots
- Citation:
Whittaker, J., Afonso, J., Masterton, S., Müller, R., Wessel, P., Williams, S., and Seton, M., 2015, Long-term interaction between mid-ocean ridges and mantle plumes: Nature Geoscience, v. 8, no. 6, p. 479-483, doi:10.1038/ngeo2437.
For examples of plotting downloaded feature data, see notebook 05.
- Parameters:
feature_data_id_string (str) – Dataset identifier to download and load.
- Returns:
A single feature collection if exactly one matching file is found, otherwise a list of feature collections (one per matching file).
- Return type:
pygplates.FeatureCollection or list[pygplates.FeatureCollection]
- Raises:
ValueError – If
feature_data_id_stringis empty or not supported.Exception – If no files matching the dataset pattern are found after download.
Note
Files are only downloaded when local cached data are missing or stale.
- get_plate_reconstruction_files()[source]
Download and return a tuple of rotation_model, topology_features and static_polygons. These objects can then be used to create
gplately.PlateReconstructionobject.- Returns:
rotation_model (pygplates.RotationModel) – A rotation model to query equivalent and/or relative topological plate rotations from a time in the past relative to another time in the past or to present day.
topology_features (pygplates.FeatureCollection) – Topological features including ridges, transforms, subduction zones, etc. These features can be used to build topological plate boundaries and networks.
static_polygons (pygplates.FeatureCollection) – Static polygons which can be used to assign plate IDs for other geometries. The plate IDs are essential to tectonic plate reconstruction.
Note
The example code below downloads
rotation model,topology featuresandstatic polygonsfiles from the Muller et al. (2019) plate reconstruction model and create agplately.PlateReconstructionobject.1import gplately 2 3data_server = gplately.DataServer("Muller2025") 4rotation_model, topology_features, static_polygons = ( 5 data_server.get_plate_reconstruction_files() 6) 7 8# create a PlateReconstruction object using the returned objects 9model = gplately.PlateReconstruction( 10 rotation_model, topology_features, static_polygons 11)
If the requested plate model does not have certain file(s), warning messages will alert user of the missing file(s).
- static get_raster(raster_name: str)[source]
Download rasters that are not associated with any plate reconstruction models. Store the rasters in the
GPlately cache.The available present-day rasters are listed below.
- ETOPO1
Filetypes available : TIF, netCDF (GRD)
raster_name =
ETOPO1_grd,ETOPO1_tif(depending on the requested format)A 1-arc minute global relief model combining lang topography and ocean bathymetry.
Citation: doi:10.7289/V5C8276M
- Parameters:
raster_name (
str) – The raster name of interest.- Returns:
A
gplately.Rasterobject containing the raster data which can be accessed as anumpy ndarrayorMaskedArrayviagplately.Raster.dataattribute.For example:
1graster = gplately.DataServer.get_raster("ETOPO1_tif") 2graster_data = graster.data
where
graster_datais anumpy ndarray. This array can be visualised usingmatplotlib.pyplot.imshow(see example below).- Return type:
- Raises:
Exception – Raise
Exceptionwhenraster_nameis invalid.
Example
Download ETOPO1 and plot it on a map with Mollweide projection.
1import cartopy.crs as ccrs 2import matplotlib.pyplot as plt 3 4import gplately 5 6etopo1 = gplately.DataServer.get_raster("ETOPO1_tif") 7fig = plt.figure(figsize=(18, 14), dpi=300) 8ax = fig.add_subplot(111, projection=ccrs.Mollweide(central_longitude=-150)) 9ax.imshow(etopo1.data, extent=(-180, 180, -90, 90), transform=ccrs.PlateCarree())
- get_spreading_rate_grid(times, reference_frame: ReferenceFrame | None = None, generated_from: GenerationMethod | None = None)[source]
Download seafloor spreading rate grids from the plate reconstruction model and save the grids in the
GPlately cache folder.See also
- Parameters:
time (int, or list of int) – Request spreading grid(s) for one (an integer) or multiple reconstruction times (a list of integers).
reference_frame (ReferenceFrame, optional) – The reference frame used to build the returned rotation model.
generated_from (GenerationMethod, optional) – The generation method used to generate the spreading rate grid.
- Return type:
gplately.Rasteror a list ofgplately.Raster
- get_topology_geometries()[source]
Download and return coastlines, continental polygons and COBs (continent-ocean boundary). These feature collections can be used to create
gplately.PlotTopologiesobject and plot paleomaps.- Returns:
coastlines (pygplates.FeatureCollection) – Global coastlines. These coastlines have been assigned plate IDs using static polygons and are ready to be reconstructed to a particular geological time.
continents (pygplates.FeatureCollection) – Continental polygons containing continental crust and volcanically-modified oceanic crust (including island arcs).
COBs (pygplates.FeatureCollection) – Continent-ocean boundary. The COBs are represented as lines along passive margins and does not include data from active margins.
Note
The example code below will attempt to download
coastlines,continentsandCOBsfrom the Muller et al. (2025) plate reconstruction model and create agplately.PlotTopologiesobject.1data_server = gplately.download.DataServer("Muller2025") 2rotation_model, topology_features, static_polygons = ( 3 data_server.get_plate_reconstruction_files() 4) 5model = gplately.PlateReconstruction( 6 rotation_model, topology_features, static_polygons 7) 8 9coastlines, continents, COBs = data_server.get_topology_geometries() 10 11# create a gplately.PlotTopologies object at 100Ma 12gPlot = gplately.PlotTopologies(model, 100, continents, coastlines, COBs)
If the requested plate model does not have certain geometries, warning messages will be printed to alert the user.
- get_valid_times()[source]
Deprecated!!! Use
DataServer.valid_timesinstead. Return a tuple (max_time, min_time) representing the valid time range of the plate model.
- property rotation_model
Return the model rotation tree as a
pygplates.RotationModel.The rotation model is created lazily and cached on first access. By default, rotations are loaded in the mantle reference frame. If
reference_frameisReferenceFrame.PmagReferenceFrame, the model is loaded with the paleomagnetic reference frame and its corresponding anchor plate ID fromplate_model_manager.- Parameters:
reference_frame (ReferenceFrame, default=ReferenceFrame.MantleReferenceFrame) – Reference frame used to build the returned rotation model.
- Returns:
Rotation model for the selected plate model collection.
- Return type:
pygplates.RotationModel
- Raises:
Exception – If the underlying plate model manager object is not initialized.
- property static_polygons
A pygplates.FeatureCollection object containing static polygons.
- property time_range
Deprecated!!! Use
DataServer.valid_timeinstead. Keep consistent with GML naming.
- property topology_features
A pygplates.FeatureCollection object containing topology features.
- property valid_time
The period of time the plate model are valid. Return a tuple of (max time, min time).
- property valid_times
Deprecated!!! Use
DataServer.valid_timeinstead. Keep consistent with GML naming.