Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tranforms faults to ridges #362

Merged

Conversation

MFraters
Copy link
Member

@MFraters MFraters commented Nov 1, 2021

Up to now you could only specify one ridge per oceanic plate. That means that if you wanted to use tranform faults, you needed to make several oceanic plates. This is very inconvenient and leads to world builder input files which are a lot longer and more complex than needed. A simple solution is to allow multiple ridges per oceanic plate, in an array of ridges instead of a single ridge. This does mean it is a breaking change.

A second advantage is that the mass conservative slab temperature model can now be perfectly fitted to the temperature/age of the connecting oceanic plate. See image below, which shows the model from below:

oceanic_ridges_and_slabs_connecting

There are two main way of approaching this. One is to infer that the transform fault is defined by the offset between the last coordinate of the current ridge and the first coordinate of the next ridge. This is the approach I have taken since it seems to me like the correct choice physically. An other option would be to let the users define the location of the transform fault themselves, by interpreting every odd numbered ridge as a transform fault. This would create a lot more flexibility, but also a lot more complexity in the code and the writing the input file. I can't think of a good use case for that so I don't see the value of taking that approach.

I will leave this pull request open for a few days to allow others to think about this as well and provide input on this or other choices.

I am planning to also implement this for the plate model in this pull request, to make sure ridge coordinates are consistent throughout the world builder. Since this is a breaking change it is going to break a few tests, but the fix should be simple.

@alarshi, @lhy11009,@rfildes, @mibillen and @danieldouglas92 if/when this pull request is merged, it will break any model which uses a ridge, but the fix is simple: change [[1,2],[3,4],[5,6]] to [[[1,2],[3,4],[5,6]]] and you will get the same results as before.

@MFraters MFraters added input/help wanted Extra attention is needed add/change user functionality Requests or proposes a new or improved user functionality breaking change: input labels Nov 1, 2021
@github-actions
Copy link

github-actions bot commented Nov 1, 2021

Benchmark Main Feature Difference (99.9% CI)
Slab interpolation simple none 1.206 ± 0.003 (s=377) 1.207 ± 0.004 (s=371) +0.1% .. +0.2%
Slab interpolation curved simple none 1.230 ± 0.005 (s=365) 1.230 ± 0.005 (s=369) -0.2% .. +0.0%
Spherical slab interpolation simple none 1.561 ± 0.047 (s=299) 1.557 ± 0.043 (s=281) -1.1% .. +0.5%
Slab interpolation simple curved CMS 1.869 ± 0.095 (s=248) 1.848 ± 0.096 (s=239) -2.6% .. +0.4%
Spherical slab interpolation simple CMS 2.988 ± 0.026 (s=139) 2.979 ± 0.023 (s=165) -0.6% .. +0.0%
Spherical fault interpolation simple none 1.635 ± 0.164 (s=270) 1.629 ± 0.163 (s=284) -3.2% .. +2.5%

@mibillen
Copy link
Contributor

mibillen commented Nov 1, 2021

@MFraters, one question about the shape of the transform boundary that is assumed between the two offset points. On a sphere, I think the transform boundary should be small circle paths between the two end ridge points, whereas in cartesian coordinates the transform is just a straight line. Is this already taken into account in spherical coordinates?

@MFraters
Copy link
Member Author

MFraters commented Nov 1, 2021

@mibillen Thanks for the question. This part of the computation is all done in natural coordinates (i.e. cartesian for a box and spherical for a sphere, chunk, etc.) In cartesian coordinates this is just a line. In spherical coordinates, the straight line is also straight in spherical coordinates. This creates the small circle path between the two end points of the ridges.

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #362 (b216c89) into main (053cde8) will decrease coverage by 1.08%.
The diff coverage is 49.49%.

❗ Current head b216c89 differs from pull request most recent head ca684e8. Consider uploading reports for the commit ca684e8 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   98.86%   97.77%   -1.09%     
==========================================
  Files          77       77              
  Lines        4476     4548      +72     
==========================================
+ Hits         4425     4447      +22     
- Misses         51      101      +50     
Impacted Files Coverage Δ
...ucting_plate_models/temperature/mass_conserving.cc 87.65% <38.46%> (-9.63%) ⬇️
...eanic_plate_models/temperature/half_space_model.cc 75.32% <40.74%> (-19.51%) ⬇️
...es/oceanic_plate_models/temperature/plate_model.cc 80.68% <40.74%> (-17.87%) ⬇️
source/parameters.cc 99.17% <89.47%> (-0.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 053cde8...ca684e8. Read the comment docs.

@MFraters MFraters changed the title [WIP] Add tranforms faults to ridges Add tranforms faults to ridges Nov 3, 2021
@MFraters
Copy link
Member Author

MFraters commented Nov 3, 2021

The pull request is now almost done. I just need to improve the coverage for multiple ridges. If not further comments are made about this pull request it will probably be merged on Friday.

@MFraters MFraters force-pushed the add_tranforms_faults_to_ridges branch 2 times, most recently from 9b57ba0 to 3118062 Compare November 5, 2021 23:36
@MFraters MFraters force-pushed the add_tranforms_faults_to_ridges branch 3 times, most recently from 9f27d94 to 6904ad0 Compare November 6, 2021 00:56
@MFraters MFraters force-pushed the add_tranforms_faults_to_ridges branch from 6904ad0 to ca684e8 Compare November 6, 2021 00:59
@MFraters
Copy link
Member Author

MFraters commented Nov 6, 2021

The coverage is fixed now, even though the codcov post doesn't show it. All new lines are covered and there are now new misses. All tests have passed and the benchmarks show no significant difference (some benchmarks seem to be, if anything, consistently on the faster side even though more works needs to be done). This is ready to merge now.

@MFraters MFraters merged commit 788a59c into GeodynamicWorldBuilder:main Nov 6, 2021
MFraters added a commit to GeodynamicWorldBuilder/geodynamicworldbuilder.github.io that referenced this pull request Nov 6, 2021
@lhy11009
Copy link
Contributor

lhy11009 commented Nov 8, 2021 via email

@MFraters
Copy link
Member Author

MFraters commented Nov 8, 2021

Yes, that is correct. For example, [[10,20],[30,40]] becomes [[[10,20],[30,40]]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add/change user functionality Requests or proposes a new or improved user functionality breaking change: input input/help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants