Add reference frames (OPT, NNR, TPW, PMAG) to un-optimised rotation files#3
Add reference frames (OPT, NNR, TPW, PMAG) to un-optimised rotation files#3jcannon-gplates wants to merge 7 commits into
Conversation
a92a6c0 to
4e86bf4
Compare
This adds an extra file containing the reference frames, including optimised mantle (6), no-net rotation (7) and an approximation to true polar wander (8) which is paleomag minus optimised mantle reference frames. Plate ID 0 gives the original un-optimised reference frame.
- Changed plate IDs of OPT, NNR and TPW from 6, 7, 8 to 15, 16, 17 to reduce potential conflict with existing IDs (eg, hotspots). - Added plate ID 014 for PMAG. - Output rotation files match input files except 000 is changed to 014. - We still keep reference frames (14, 15, 16, 17) in extra file. - Can specify default 000 to be equivalent to any reference frame.
Because paleomag includes a mantle reference frame and true polar wander (PMAG=OPT+TPW). We were using the old 005-000 which is OPT-PMAG.
You can’t have 000-015, 000-016, 000-017 rotation sequences (ie, with 000 as a shared moving plate) since they’ll overlap in time (which GPlates complains about). This was causing issues when anchoring to 015 and 016 (but 017 was fine).
Instead of in a separate 'reference_frames<suffix>.rot' file. Otherwise users might have thought they could exclude it if they didn't want the reference frames because only using 000 (but 000 is part of the reference frames and so always needed inclusion).
No longer really need a supplementary directory.
…to_unoptimised.py, and add optimised_max_NNR frame (016). - Optimised_config.py: add Merdith_etal_plate_model_1Ga-present_rev6-2 (rotation file, topologies, continental polygons, diagnostics) and fix Zahirovic_etal_2022_GDJ continental polygons path and reference params (seeds from paleomagnetic pole via Africa 701701 / GAPWAP). - add_ref_frames_to_unoptimised.py: refactor to read all input/output paths from Optimised_config.py automatically (no manual editing required); add optimised_max_NNR reference frame (plate ID 016, from the nr_max run), shifting NNR to 017 and TPW to 018; add unoptimised_input_is_in_pmag_frame guard that aborts rather than silently mislabelling frames; extract helper functions for the frame calculations; add a module docstring. - README.md: rewrite to reflect current capabilities (laptop runtime, GPlately PMM, 5 reference frames, updated installation and running instructions). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4e86bf4 to
50c8b0b
Compare
|
Gosh, Dietmar's Claude modifications re-arranged my How does it re-arrange so much and still get it right! Claude probably did this in a few minutes, but it's taken me many hours to convince myself it's correct (partly because I had to reload all the work I'd done a year ago back into my mind in order to check this). The new code is actually cleaner and better. It's just hard to compare and verify. In situations like this (and probably for any ...probably easiest to just add directly to the chat prompt (a more permanent solution depends on whether using Claude Code or Claude Projects; eg, Also, Dietmar has been trying this out on some plate models, so would probably notice when anchoring different reference frames looks weird. So I'll go ahead and merge this. If something looks suspect in the future we can come back and revisit this. |
Summary
Adds
add_ref_frames_to_unoptimised.py, a post-processing step that assembles asingle comprehensive rotation model containing all available absolute reference frames
as distinct (high-numbered) plate IDs:
bestrun)nr_maxrun)Anchoring to any of 014–018 in GPlates/pyGPlates reconstructs the model in that
reference frame; anchoring 000 uses whichever frame
default_reference_frame_plate_idis set to (paleomag by default). Reference-frame features are bundled into the first
output rotation file so plate 000 is always defined.
Key implementation details:
Optimised_config.py— thescript needs no manual editing for a standard run.
unoptimised_input_is_in_pmag_frameguard aborts rather than silentlymislabelling reference frames if the input is not in its paleomagnetic frame.
R(000→frame)(fixed 000, moving frame) so GPlatesdoes not see conflicting sequences with 000 as the moving plate.
Merdith_etal_plate_model_1Ga-present_rev6-2and fixesZahirovic_etal_2022_GDJ(PMAG seeding via Africa 701701 / GAPWAP, corrected filepaths).
5 reference frames, updated installation and run instructions).
🤖 Generated with Claude Code