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

Slab geojson #395

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Slab geojson #395

wants to merge 23 commits into from

Conversation

kirstybayliss
Copy link
Contributor

@kirstybayliss kirstybayliss commented Feb 29, 2024

This PR adds the option to create profiles for subduction using a geojson file containing manually chosen cross-sections, the dip direction and length. The get_profiles_geojson function fits into the subduction workflow in place of the get_profiles function inside the call to get_profiles_from_slab2pt0, or get_profiles_from_slab2pt0_geojson can be called directly in the workflow as a replacement in the subduction profile, specifying the geojson file in the toml.

Also fixes a minor weirdness with the interpolator, where it would previously fail occasionally for cross-sections that trended along a single x or y coordinate. Instead we call the tesselation step directly and allow it to add a small jitter to account for this if the original tesselation fails (otherwise there will be no change). If this is still failing for a provided geometry, no cross-sections will be generated.

Tests imply that the difference in depths when using the 'jitter' are less than 0.03km.
image

Updated so that the old version is used unless we have an issue like this, in which case we assume that a small difference in depth is acceptable.

@kirstybayliss
Copy link
Contributor Author

kirstybayliss commented Feb 29, 2024

The classification step is giving the dreaded 'Surface does not conform with Aki & Richards' error, even though the 3D plot and cross-sections look fine. We already test that we follow Aki and Richard's convention when making the profiles.

I have made a small PR (gem/oq-engine#9596) to change the Aki and Richard's test in the complex fault part of the hazardlib (it will check that the convention is met at one end of the fault, because it seems unlikely that we would somehow have profiles that switch sides part way through!).

I would also like to have a simple test that runs all the way to the classification step for completeness - this would make sure that we don't break any steps in the workflow for subduction when we make other changes. I can make this from some of the GEESE TR stuff.

However, I am confident that this specific code is actually behaving as we'd like at the moment

@kirstybayliss
Copy link
Contributor Author

kirstybayliss commented Apr 30, 2024

  • Add test for full suduction classification workflow
    Now that the Aki and Richard's test is fixed and the tests are passing, we just need a test that runs all the way to the classification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants