Add initial topography from World Builder - #7155
Conversation
MFraters
left a comment
There was a problem hiding this comment.
Thanks for working on this coupling. I will review it fully later, but I think it would make sense to add the functionality to the world builder in the contrib folder, and increase the version number to 1.1.1. I don't think having a "temporary" fallback parameter is the way to go.
|
Ready for review ! @MFraters :) |
MFraters
left a comment
There was a problem hiding this comment.
Generally looks good to me, just a few small comments.
| const Objects::NaturalCoordinate &position_in_natural_coordinates, | ||
| double topography) const override final; | ||
|
|
||
| double maximum_topography() const override final; |
There was a problem hiding this comment.
Some of them you already have documentation, but could you also add documentation for the rest these new functions?
| AssertThrow(maximum_topography >= 0.0, | ||
| ExcMessage("World Builder returned a negative maximum " | ||
| "topography, but this value must be a " | ||
| "nonnegative upper bound.")); |
There was a problem hiding this comment.
why do you require a larger than 0 maximum topography? What if you make a model of the ocean part of a larger model (or Schiphol in the Netherlands, which is below 0)?
There was a problem hiding this comment.
right lets remove that
|
|
||
| namespace aspect | ||
| { | ||
| #ifdef ASPECT_WITH_WORLD_BUILDER |
There was a problem hiding this comment.
I think you should also check here whether the gwb version is larger than 1.1.1 with something like:
#if WORLD_BUILDER_VERSION_GTE(1,1,1)
|
@MFraters is this ready? @Minerallo you will have to rebase this one more time to trigger the tests. |
Added thanks |
82d57ec to
b4d35bb
Compare
I rebased @gassmoeller @MFraters. :) |
MFraters
left a comment
There was a problem hiding this comment.
one small question left. I am not sure what the best approach is. Let me know what you think.
| double | ||
| SubductingPlate::maximum_topography() const | ||
| { | ||
| return 0.0; |
There was a problem hiding this comment.
I am thinking whether it would make sense to leave it like this, or not. The topography implementation of the slab is currently just directly returning, leaving the value of the topography unchanged. I think the equivalent of that would be to return -infinity. Another option would be to just use the feature min depth here. This is also relevant for the other places where you return 0 at the moment.
|
You need to rebase onto the newest master, and re-run make indent. Can you also squash your commits down a bit into logical blocks? |
d0db9c6 to
300c158
Compare
okay done @MFraters thanks ! |

Hi everyone,
Here is a plugin for the initial topography from World Builder. It allows ASPECT to read the initial surface topography directly from the same World Builder file used for temperature and composition.
ASPECT normally needs to know the lower and upper bounds of the model to build the geometry, such as the distance between the bottom and top of the model. Therefore, if we want to use initial topography, we also need to take into account the initial maximum topography when defining the “box” or sphere.
I opened a PR in GWB to retrieve the maximum topography automatically (GeodynamicWorldBuilder/WorldBuilder#945), but if this does not work, I provide a fallback option that allows the user to set it manually. It only needs to be a value greater than the expected topography of the model.
I also added box and spherical-shell tests.
@MFraters
Cheers,
Michael
For all pull requests:
helped in replacing similar documentation/text in multiple files.
If yes, please describe your usage of AI models in the creation of this pull request
For new features/models or changes of existing features: