Add topograhpy infrastructure#848
Conversation
0794ad8 to
bf6d7a5
Compare
|
Sorry I didn't get a chance to look at the older pull request, I ended up getting sick last week! I think this sounds like a good way to do this, I think in the initial pull request we were just focused on getting a simple interface implemented so it was quite basic. One of the main points of discussion if I recall was defining a surface type so that we could tell ASPECT whether it is adding topography by either thickening at the top, or in the case of isostasy, thickening at the bottom so that the entire lithosphere is uplifted. I didn't look through all the code, but was this in here somewhere? |
hmm, I may need to think a bit more about this, but what the world builder currently does is that is just works from depth 0, which is independent of the topography. With that, in gwb-grid I can compute the a depth from the surface and a depth from a reference, that happens here (notice the last two line): WorldBuilder/source/gwb-grid/main.cc Lines 945 to 967 in 4a5fa5d And later I pass in the depth with respect to the surface: WorldBuilder/source/gwb-grid/main.cc Line 1657 in 4a5fa5d So how it is currently setup, the caller (gwb-grid or aspect) is responsible to put in the correct depth. This means that we could make a switch in aspect which depth to put into the world builder. But this would probably require to know the topography in aspect. I don't know whether this is desirable or feasible in aspect since it has been a while since I have looked at the topography and world builder code in aspect. Do you think this would work or not? |
|
I think this sounds good for now, and we can update it later if it is necessary when isostasy is implemented. From the third point on option 2 in #780, I think the idea was that we pass the topography separately and then ASPECT will decide how to apply the topography, but this was something that we still need to implement within ASPECT for it to work. |
4a5fa5d to
6caf2a9
Compare
|
It turns out that the std::cos and std::sin are different enough to generate significant differences between linux, macos and windows. I have replaced these function in gwb-grid with the FT versions of these functions which I had implemented a while ago, and now they all yield the same result. |
aec3069 to
980fe53
Compare
Pull Request Test Coverage Report for Build 22260437828Details
💛 - Coveralls |
2a35f69 to
b2411b1
Compare
b2411b1 to
eb2ba0b
Compare
|
…ilder/utilities.h
eb2ba0b to
b0a36eb
Compare
|
I think this looks ready to me. I will look over it again tomorrow and if everything still looks good, merge it and continue with the release of version 1.1. The increase in run time for the benchmarks is most likely due to the addition of topography in gwb-grid. So it should not affect any other code using the world builder if topography is not used. |
b0a36eb to
74ae6ad
Compare
74ae6ad to
bb77a44
Compare
bb77a44 to
b15adad
Compare
…tures which do not implement topography.
…e polyon_contains_point function in the get_surface function.
537c28a to
6edfcd1
Compare
An alternative implementation to #814 for the topography interface (issue #780). The difference is that this implementation can have different topography models per feature. It is still very much a work in progress, since not all features and geometries are implemented, but is as already workable, as can be seen in the example below. @Djneu would this also work for your use-cases? @alanjyu where you also interested in this, and if so, does this work for you as well?
I am thining of turning the topography input from a single value into a surface, like the min and max depht. That would allow to seamlessly use Litho1.0 data. (as a side-note, I probably want to rework the current implementation of surfaces to be more flexible and in line with the rest, but that is for a different pull request.)
This is made with the following world builder file: