Deform continental polygons in seafloor gridding#414
Draft
jcannon-gplates wants to merge 22 commits into
Draft
Conversation
This naturally deactivates seed points at convergent plate boundaries without having to compare velocity deltas and distances to boundaries with empirical thresholds.
Topological lines can be sections of topological boundaries/networks. New collision detection was recently added in 521b6fe.
Resolving the same current topological boundary/network to the next time might generate different number of intersections between boundary sections. We now detect this so we can generate a topology boundary polygon using a different approach when this happens.
Instead of returning the boundary of the next resolved topology, return the boundary sub-segments of the current resolved topology moved to the next time and joined together.
The consistent sub-segments (resolved at 'next' time) can be kept.
And we can now sample all points together, rather than one by one.
And remove implementation based on TopologicalModel since it's no longer needed (since we now use a different collision detection algorithm and also the new implementation can reconstruct points that are in deforming networks, which the original implementation could not).
And no longer return all the points (active and inactive). Now returns only the active points and their indices into the original points.
More chance of reusing cached resolved topologies.
Due to improved collision detection added in 0582168.
So that subsequent diffs don't show the whole file as changed.
Also merge separate seafloor age and spreading rate plots into a single function.
Also write to save directory (not current working directory).
Contributor
Author
|
This PR still needs more experimentation (so it may or may not make it into GPlately |
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.
Implement continental polygon deformation using deforming networks
This PR is built on top of #413. So that PR should be merged first (and that PR depends on a pyGPlates
1.1release).It is also still experimental. It works okay for some regions (like Andes) but not others (like Canadian Arctic Islands). So it needs some more work. The preference is to include this in the GPlately
2.1release, but it could get pushed to a subsequent release.It essentially deforms the continental masks that are used to mask ocean seed points in the seafloor gridding workflow.
This comment was written with Claude's help. However, the code is all-human (that'll soon change though).
Summary
Implement deformation of continental polygons when masking ocean seed points —
ReconstructContinents.reconstruct_continent_featureswas previously a no-op with a TODO.It now detects whether the plate model contains deforming network features and, if so,
reconstructs and deforms the continent polygon boundaries forward from present day through
the full
[min_time, max_time]time range before the gridding run starts. Rigid-onlymodels fall back to the existing per-request
PlateReconstruction.reconstructpath,unchanged.
Parallelise deformation across continent feature batches — continent features are split
into batches and processed in parallel, with results merged afterward.
Produce a debug GPML containing reconstructed and deforming continent polygons —
the
deformed_continents.gpmlzdebug file can be inspected in GPlates.Algorithm
Point-by-point deformation using attached resolved networks — at each time step,
continental polygon boundary points are reconstructed individually: each point that falls
inside a resolved deforming network attached to its continent is reconstructed using that
network; points outside any attached network are moved with the continent's rigid stage
rotation.
Group continental polygons into rigid aggregates to identify attached networks —
rather than testing every boundary point of a continental polygon against all resolved networks
at every time step, continental polygons are first grouped into aggregates: polygons with
the same stage rotation (within 0.01°) that are touching or overlapping are merged into one
aggregate. Each aggregate then identifies its attached networks by checking whether any
network boundary points fall inside the aggregate and have a velocity that matches the
aggregate's rigid velocity (within 1 km/Myr). Only those attached networks are used when
reconstructing that aggregate's polygon points, avoiding spurious network attachment.