gplately.DataServer
- class gplately.DataServer(file_collection, data_dir=None, verbose=True)[source]
- Bases: - object- Download the plate reconstruction models from the EarthByte server. - The - DataServerobject downloads the model files to the- GPlately cache folder. If the same model is requested again, a new- DataServerinstance will retrieve the files from the cache – provided they haven’t been moved or deleted.- 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 the- GPlately cache folder.
 - __init__(file_collection, data_dir=None, verbose=True)[source]
- Constructor. Create a - DataServerobject.- Example - # create a DataServer object for the Cao2024 model (https://zenodo.org/records/11536686) data_server = gplately.DataServer("Cao2024") 
 - Methods - __init__(file_collection[, data_dir, verbose])- Constructor. - get_age_grid(times)- Download the seafloor age grids for the plate model. - get_feature_data([feature_data_id_string])- Downloads assorted geological feature data from web servers (i.e. GPlates 2.3 sample data) into the "gplately" cache. - 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. - The location of DataServer cache on your computer. - A pygplates.FeatureCollection object containing coastlines. - A pygplates.FeatureCollection object containing continental polygons. - The max age/time of the plate model. - A pygplates.RotationModel object for the plate reconstruction model. - 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 cache_path
- The location of DataServer cache on your computer. 
 - property coastlines
- A pygplates.FeatureCollection object containing coastlines. 
 - property continents
- A pygplates.FeatureCollection object containing continental polygons. 
 - get_age_grid(times: int | list[int])[source]
- Download the seafloor age grids for the plate model. Save the grids in the - GPlately cache folder.- See also - The available seafloor age grids are listed below. - Muller et al. 2019 - file_collection=- Muller2019
- Time range: 0-250 Ma 
- Seafloor age grids in netCDF format. 
 
- Muller et al. 2016 - file_collection=- Muller2016
- Time range: 0-240 Ma 
- Seafloor age grids in netCDF format. 
 
- Seton et al. 2012 - file_collection=- Seton2012
- Time range: 0-200 Ma 
- Seafloor age grids in netCDF format. 
 
 - Parameters:
- times (int, or a list of int) – A reconstruction time or a list of reconstruction times. 
- Return type:
- gplately.Rasteror a list of- gplately.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("Muller2019") 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 Müller et al. (2019) seafloor age grids for 0Ma, 1Ma and 100 Ma: - 1data_server = gplately.DataServer("Muller2019") 2age_grids = data_server.get_age_grid([0, 1, 100]) - See also - 1from gplately import PlateModelManager 2 3model = PlateModelManager().get_model("Muller2019") 4print(model.get_rasters("AgeGrids", times=[10, 20, 30])) 5print(model.get_raster("AgeGrids", time=100)) 
 - get_feature_data(feature_data_id_string=None)[source]
- Downloads assorted geological feature data from web servers (i.e. GPlates 2.3 sample data) into the “gplately” cache. - Currently, - DataServersupports the following feature data:- 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: .gpml 
- 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. 
 
 - Parameters:
- feature_data_id_string (str, default=None) – A string to identify which feature data to download to the cache (see list of supported feature data above). 
- Returns:
- feature_data_filenames – If a single set of feature data is downloaded, a single pyGPlates - FeatureCollectionobject is returned. Otherwise, a list containing multiple pyGPlates- FeatureCollectionobjects is returned (like for- SeafloorFabric). In the latter case, feature reconstruction and plotting may have to be done iteratively.
- Return type:
- instance of <pygplates.FeatureCollection>, or list of instance <pygplates.FeatureCollection> 
- Raises:
- ValueError – If a - feature_data_id_stringis not provided.
 - Examples - For examples of plotting data downloaded with - get_feature_data, see GPlately’s sample notebook 05 - Working With Feature Geometries here.
 - 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 featuresand- static polygonsfiles from the Müller et al. (2019) plate reconstruction model and create a- gplately.PlateReconstructionobject.- 1import gplately 2 3data_server = gplately.DataServer("Muller2019") 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 a- numpy ndarrayor- MaskedArrayvia- gplately.Raster.dataattribute.- For example: - 1graster = gplately.DataServer.get_raster("ETOPO1_tif") 2graster_data = graster.data - where - graster_datais a- numpy ndarray. This array can be visualised using- matplotlib.pyplot.imshow(see example below).
- Return type:
- Raises:
- Exception – Raise - Exceptionwhen- raster_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)[source]
- Download seafloor spreading rate grids from the plate reconstruction model and save the grids in the - GPlately cache folder.- See also - The available seafloor spreading rate grids are listed below. - Clennett et al. 2020 - file_collection = Clennett2020 
- Time range: 0-250 Ma 
- Seafloor spreading rate grids in netCDF format. 
 
 - Parameters:
- time (int, or list of int) – Request spreading grid(s) for one (an integer) or multiple reconstruction times (a list of integers). 
- Return type:
- gplately.Rasteror a list of- gplately.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,- continentsand- COBsfrom the Müller et al. (2019) plate reconstruction model and create a- gplately.PlotTopologiesobject.- 1data_server = gplately.download.DataServer("Muller2019") 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
- A pygplates.RotationModel object for the plate reconstruction model. 
 - 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.