Command Line Interface (CLI)ο
GPlately comes with a collection of useful command-line tools, each designed as a subcommand of GPlately.
Note
Run
gplately -h
to see a list of available subcommands.Run
gplately one-of-the-subcommands -h
to see the usage of the given subcommand. For example,gplately list -h
.
listο
Show a list of available plate reconstruction models. If a model name is given, show the details about this model.
π list all available plate reconstruction models
$ gplately list
π show details about model merdith2021
$ gplately list -m merdith2021
If you are using GPlately Docker image, run these commands.
$ docker run gplates/gplately gplately list
$ docker run gplates/gplately gplately list -m merdith2021
combineο
Combine multiple feature collections into one.
π combine three feature collections into one file output_file.gpmlz
$ gplately combine input_file_1.shp input_file_2.gpmlz input_file_3.gpml output_file.gpmlz
filterο
Filter feature collection by various criteria and save the result to the output_file.
π only keep features whose name contains βAfricaβ or βNorth Americaβ
$ gplately filter input_file output_file -n Africa "North America"
π only keep features whose plate ID is one of β701 714 715 101β
$ gplately filter input_file output_file -p 701 714 715 101
π only keep features whose birth age is older than 500Myr
$ gplately filter input_file output_file --min-birth-age 500
π only keep features whose birth age is younger than 500Myr
$ gplately filter input_file output_file --max-birth-age 500
π only keep features whose name contains βAfricaβ or βNorth Americaβ and plate ID is one of β701 714 715 101β and birth age is older than 500Myr
$ gplately filter input_file output_file -n Africa "North America" -p 701 714 715 101 --min-birth-age 500
π only keep gpml:Basin features
$ gplately filter input_file output_file -t gpml:Basin
π only keep gpml:Basin and gpml:IslandArc features
$ gplately filter input_file output_file -t "gpml:IslandArc|gpml:Basin"
Note
If you are using Docker, prefix docker run gplates/gplately
to the command, such as docker run gplates/gplately gplately filter input_file output_file -t gpml:Basin
.
See also
Check out this shell script for more βgplately filterβ examples.
reset_feature_typeο
Reset the feature type for the selected features.
π change all gpml:ClosedContinentalBoundary to gpml:UnclassifiedFeature
$ gplately reset_feature_type -s gpml:ClosedContinentalBoundary -t gpml:UnclassifiedFeature input_file output_file
π change all gpml:ContinentalFragment and gpml:Coastline to gpml:UnclassifiedFeature
$ gplately reset_feature_type -s "gpml:ContinentalFragment|gpml:Coastline" -t gpml:UnclassifiedFeature input_file output_file
π change all feature types to gpml:UnclassifiedFeature
$ gplately reset_feature_type -s ".*" -t gpml:UnclassifiedFeature input_file output_file
Note
If you are using Docker, prefix docker run gplates/gplately
to the command, such as docker run gplates/gplately gplately reset_feature_type -s ".*" -t gpml:UnclassifiedFeature input_file output_file
.
See also
Check out this shell script for more βgplately reset_feature_typeβ examples.
agegrid (ag)ο
Generate age grids for a plate reconstruction model.
π create age grids from 10Ma to 0Ma with 1Myr increment for the merdith2021 reconstruction mode
$ gplately ag output -m merdith2021 -e 0 -s 10
π create age grids from 10Ma to 0Ma with 1Myr increment using the specified reconstruction files
$ gplately ag rotations.rot topologies.gpmlz output -c continental_polygons.gpmlz -e 0 -s 10
fix_crossoversο
Fixes crossovers in rotation file(s).
π fix crossovers in two rotation files with a threshold 0.01 degree and ignore plate ID 201 and 701
$ gplately fix_crossovers -d -c 0.01 -i 201 701 -- input_rotations1.rot input_rotations2.rot
remove_rotationsο
Remove one or more plate IDs from a rotation model (consisting of one or more rotation files).
π remove plate IDs 70,4,3 and 1 from a rotation file
$ gplately remove_rotations -p 70 4 3 1 -o removed_ref_frames_ -- rotations.rot
cleanup_topologiesο
Remove any regular features not referenced by topological features.
π remove all features which are not referenced by any topological feature from topologies.gpml
$ gplately cleanup_topologies -o cleanup_topologies_ -- topologies.gpml
convert_xy_to_gplatesο
Converts geometry in one or more input ascii files (such as β.xyβ files) to output files suitable for loading into GPlates.
π convert two .xy file into a shapefile
$ gplately convert_xy_to_gplates -e shp -- input1.xy input2.xy
diagnose_rotationsο
Diagnose one or more rotation files to check for inconsistencies.
π check two rotation files and print the diagnostic results on screen
$ gplately diagnose_rotations input_rotations1.rot input_rotations2.rot
resolve_topologiesο
Resolve topological plate polygons (and deforming networks) and saves (to separate files) the resolved topologies, and their boundary sections as subduction zones, mid-ocean ridges (ridge/transform) and others (not subduction zones or mid-ocean ridges).
π resolve topologies at 10Ma
$ gplately resolve_topologies -r rotations1.rot rotations2.rot -m topologies1.gpml topologies2.gpml -t 10
rotation_toolsο
Calculate stage rotations between consecutive finite rotations in plate pairs.
π calculate stage rotations for moving plate 701 relative to the fixed plate 0
$ gplately rotation_tools -p 701 0 -o stage_ -- rotations.rot
separate_ridge_transform_segmentsο
Split the geometries of isochrons and mid-ocean ridges into ridge and transform segments.
π pick out ridge and transform features from the file spreading_features.gpml
$ gplately separate_ridge_transform_segments -r rotations.rot -d 45 -s _ridges -t _transforms -- spreading_features.gpml
subduction_convergenceο
Find the convergence rates along trenches (subduction zones) over time.
π calculate the convergence rates along subduction zones from 200Ma to 0Ma
$ gplately subduction_convergence -r rotations.rot -m topologies.gpml -t 0 200 -i 1 -v 1 -d 0.5 -e xy -- convergence
gpmdbο
Retrieve the paleomagnetic data from the GPMDB website, create GPlates-compatible VGP features and save them in a .gpmlz file.
π download the paleomagnetic data and generate GPlates-compatible VGP features using the zahirovic2022 reconstruction model
$ gplately gpmdb -m zahirovic2022 -o vgp.gpmlz