Skip to content

Commit

Permalink
error with --onlynameddiscon and source at depth, thanks Shubh
Browse files Browse the repository at this point in the history
  • Loading branch information
crotwell committed Aug 30, 2024
1 parent 6ac8663 commit f85a549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/edu/sc/seis/TauP/TauModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public boolean isFluidBranch(int branchNum) {

/**
* Is the given depth a "noDisconDepth"?
* Usually because model was split at the source or receiver depth, or an added depth used by taup pierce.
*/
public boolean isNoDisconDepth(double noDisconDepth) {
for(int i = 0; i < noDisconDepths.length; i++) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/edu/sc/seis/TauP/cmdline/TauP_Find.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ public List<Double> getExcludedDepths(TauModel tMod) {
List<Double> exList = new ArrayList<>(getExcludeDepth(tMod.getVelocityModel()));
double[] branchDepths = tMod.getBranchDepths();
for (double branchDepth : branchDepths) {
if ((onlyNamedDiscon && branchDepth != 0 && !tMod.getVelocityModel().isNamedDisconDepth(branchDepth))) {
if ((onlyNamedDiscon && branchDepth != 0
&& !tMod.isNoDisconDepth(branchDepth)
&& !tMod.getVelocityModel().isNamedDisconDepth(branchDepth))) {
exList.add(branchDepth);
}
}
Expand Down

0 comments on commit f85a549

Please sign in to comment.