Update seafloor gridding for mid-ocean ridges that are topological lines#412
Merged
jcannon-gplates merged 5 commits intoJun 25, 2026
Conversation
Anchors shifted points in their respective left/right plates, and no longer need to test if shifted point within left/right plate.
This is due to plate ID(s) not existing in rotation tree at 'time + 1' which can happen when MOR only has rotations for the times that it exists (however 'time-of-appearance + 1' used for its velocity at 'time=time-of-appearance' then has no rotation).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update seafloor gridding for mid-ocean ridges that are topological lines
See #364 for a description of why this was needed. Closes #364.
This comment was written with Claude's help. However, the code is all-human (that'll soon change though).
Summary
Switch MOR seed-point generation to
calculate_plate_boundary_statistics— replacesthe old
separate_ridge_transform_segments-based approach with PyGPlates 1.0'scalculate_plate_boundary_statistics. MOR features no longer need pre-computed spreadingproperties (left/right plate IDs in the feature data); spreading rates are now derived
directly from left- and right-plate velocities relative to the ridge velocity at each
uniformly-spaced boundary point.
Support asymmetric spreading — each MOR boundary point produces two seed points: one
shifted into the left plate and one into the right plate, each carrying its own
independently computed spreading rate. The old code assumed symmetric spreading (the same
rate was assigned to both sides).
Suppress anomalous spreading rates caused by missing rotations near MOR appearance
time — MOR velocity is calculated over the interval
[time + 1, time]. If the MORfeature lacks rotations at
time + 1(which can happen when a MOR only has rotationsspanning its active lifetime), the computed velocity can be spuriously large. A new
_could_mor_have_anomalous_velocity()helper detects this condition per MOR sharedsub-segment and sets the spreading rate to NaN for all its points rather than writing bad
values to the grid.
Return NaN spreading rate (not drop the point) when no left/right plate exists — if
a boundary point has no resolved left or right plate (e.g. a gap in plate/network coverage),
the shifted seed point is still emitted but its spreading rate is set to NaN instead of the
point being silently discarded. This preserves the point for age-grid reconstruction while
clearly marking the spreading rate as unknown.
Shift seed points using the boundary normal — the rotation pole used to displace a
boundary point into its plate is now computed from the cross product of the boundary point
and the boundary normal, rather than from the plate velocity vector. The boundary normal is
always perpendicular to the boundary point and well-defined, so the previous
is_zero_magnitude()guard and the post-shift topology containment check are no longerneeded.