Package edu.sc.seis.TauP
Class TauModel
java.lang.Object
edu.sc.seis.TauP.TauModel
- All Implemented Interfaces:
Serializable
provides storage all of the TauBranch's comprising a model.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intBranch with the cmb at its top.protected doubleDepth of the cmb.static booleanTrue to enable debugging output.protected intBranch with the iocb at its top.protected doubleDepth of the iocb.protected intBranch with the moho at its top.protected doubleDepth of the moho.protected double[]Depths that should not have reflections or phase conversions.protected doubleRadius of the Earth in km, usually input from the velocity model.protected double[]ray parameters used to construct the tau branches.protected intBranch with the source at its top.protected doubleDepth for which tau model was constructed.protected booleanTrue if this is a spherical slowness model.protected doubleTauBranch[][]2D Array containing a TauBranch object corresponding to each "branch" of the tau model, 0 is P and 1 is S. -
Constructor Summary
ConstructorsConstructorDescriptionTauModel(boolean spherical, double sourceDepth, int sourceBranch, double[] noDisconDepths, double mohoDepth, int mohoBranch, double cmbDepth, int cmbBranch, double iocbDepth, int iocbBranch, double radiusOfEarth, SlownessModel mod, double[] rayParams, TauBranch[][] tauBranches) TauModel(SlownessModel sMod) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendNoDisconDepth(double noDisconDepth) depthCorrect(double depth) Computes a new tau model for a source at depth using the previously computed branches for a surface source.intfindBranch(double depth) Finds the branch that either has the depth as its top boundary, or strictly contains the depth.doublefindDepth(double rayParam, boolean isPWave) returns the turning depth for a ray of given ray parameter.getAboveCmbTauBranch(boolean isPWave) getAboveIocbTauBranch(boolean isPWave) getAboveMohoTauBranch(boolean isPWave) getBelowCmbTauBranch(boolean isPWave) getBelowIocbTauBranch(boolean isPWave) getBelowMohoTauBranch(boolean isPWave) double[]returns an array of the depths that are boundaries between branchesintdoubleintdoubleintdoubledouble[]Branches, such as the branch with the source at its top, that are not allowed to have reflections and phase conversions at their tops.intdoublegetOneRayParam(int i) doubledouble[]intdoublegetTauBranch(int branchNum, boolean isPWave) getTauBranchAtDepth(double depth, boolean isPWave) Gets the branch that either has the depth as its top boundary, or strictly contains the depth.booleanisBranchDepth(double depth) Checks to see if the given depth is a boundary depth.booleanCheck if crust is missing, moho at surfacebooleanCheck if mantle is missing, model is only core, cmb at surfacebooleanCheck if inner core is missing, iocb at center of earthbooleanCheck if outer core is missing, iocb at cmbbooleanisDiffractionBranch(int branchNum, boolean isPWave) True if a boundary can generate a diffracted wave, currently just ensure a discontinuity and not surface.booleanisDiscontinuityBranch(int branchNum, boolean isPWave) True if a boundary at top of branch is a discontinuity for the given phase type in the velocity model.booleanisFluidBranch(int branchNum) booleanisHeadWaveBranch(int branchNum, boolean incidentIsPWave, boolean isPWave) True if a boundary can generate a head wave, must be a discontinuity, not surface and an increase in velocity with depth.booleanisNoDisconBranch(int branchNum) Does the given branch number have a noDisconDepth at its top? We test against PWave Tau branches (ie true) since S is the same.booleanisNoDisconDepth(double noDisconDepth) 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.booleanprotected TauModelloadFromDepthCache(Double depth) voidprint()static TauModelstatic TauModelreadModelFromStream(InputStream inStream) voidsetNoDisconDepths(double[] noDisconDepths) splitBranch(double depth) returns a new TauModel with the branches containing depth split at depth.toString()booleanvalidate()voidwriteModel(String filename) voidwriteModelToStream(OutputStream outStream)
-
Field Details
-
DEBUG
public static boolean DEBUGTrue to enable debugging output. -
spherical
protected boolean sphericalTrue if this is a spherical slowness model. False if flat. -
sourceDepth
protected double sourceDepthDepth for which tau model was constructed. -
sourceBranch
protected int sourceBranchBranch with the source at its top. -
noDisconDepths
protected double[] noDisconDepthsDepths that should not have reflections or phase conversions. For instance, if the source is not at a branch boundary then noDisconDepths contains source depth and reflections and phase conversions are not allowed at this branch boundary. If the source happens to fall on a real discontinuity then then it is not included. -
surfaceDepth
protected double surfaceDepth -
mohoDepth
protected double mohoDepthDepth of the moho. -
mohoBranch
protected int mohoBranchBranch with the moho at its top. -
cmbDepth
protected double cmbDepthDepth of the cmb. -
cmbBranch
protected int cmbBranchBranch with the cmb at its top. -
iocbDepth
protected double iocbDepthDepth of the iocb. -
iocbBranch
protected int iocbBranchBranch with the iocb at its top. -
radiusOfEarth
protected double radiusOfEarthRadius of the Earth in km, usually input from the velocity model. -
rayParams
protected double[] rayParamsray parameters used to construct the tau branches. This may only be a subset of the slownesses/ray parameters saved in the slowness model due to high slowness zones (low velocity zones). -
tauBranches
2D Array containing a TauBranch object corresponding to each "branch" of the tau model, 0 is P and 1 is S. Branches correspond to depth regions between discontinuities or reversals in slowness gradient for a wave type. Each branch contains time, distance, and tau increments for each ray parameter in rayParams for the layer. Rays that turn above the branch layer are assigned 0.0 time, distance, and tau increments.
-
-
Constructor Details
-
TauModel
-
TauModel
public TauModel(boolean spherical, double sourceDepth, int sourceBranch, double[] noDisconDepths, double mohoDepth, int mohoBranch, double cmbDepth, int cmbBranch, double iocbDepth, int iocbBranch, double radiusOfEarth, SlownessModel mod, double[] rayParams, TauBranch[][] tauBranches)
-
-
Method Details
-
isSpherical
public boolean isSpherical() -
getModelName
- Returns:
- the name of the earth model used to construct the tau model.
-
getSlownessModel
-
getVelocityModel
-
getSourceDepth
public double getSourceDepth()- Returns:
- depth for which tau model was constructed.
-
getSourceBranch
public int getSourceBranch()- Returns:
- branch number with the source at its top.
-
getNoDisconDepths
public double[] getNoDisconDepths()Branches, such as the branch with the source at its top, that are not allowed to have reflections and phase conversions at their tops. -
isNoDisconBranch
public boolean isNoDisconBranch(int branchNum) Does the given branch number have a noDisconDepth at its top? We test against PWave Tau branches (ie true) since S is the same. -
isFluidBranch
public boolean isFluidBranch(int branchNum) -
isHeadWaveBranch
public boolean isHeadWaveBranch(int branchNum, boolean incidentIsPWave, boolean isPWave) throws NoSuchLayerException True if a boundary can generate a head wave, must be a discontinuity, not surface and an increase in velocity with depth.- Parameters:
branchNum- branch layer numberincidentIsPWave- pwave incident above boundary, true for P, false for SisPWave- in the below layer, true for P, false for S- Returns:
- head wave possible
- Throws:
NoSuchLayerException
-
isDiffractionBranch
public boolean isDiffractionBranch(int branchNum, boolean isPWave) True if a boundary can generate a diffracted wave, currently just ensure a discontinuity and not surface.- Parameters:
branchNum- branch layer number below the discontinuityisPWave- true for P, false for S- Returns:
- diffracted wave possible
-
isDiscontinuityBranch
public boolean isDiscontinuityBranch(int branchNum, boolean isPWave) True if a boundary at top of branch is a discontinuity for the given phase type in the velocity model. Branch 0 is always a discontinuity, free surface. Center of earth is never a discon, so we do not need to search the bottom of a branch.- Parameters:
branchNum- branch layer numberisPWave- true for P, false for S- Returns:
- if a velocity discontinuity
-
isNoDisconDepth
public boolean isNoDisconDepth(double noDisconDepth) 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. -
setNoDisconDepths
public void setNoDisconDepths(double[] noDisconDepths) -
appendNoDisconDepth
public void appendNoDisconDepth(double noDisconDepth) -
getMohoDepth
public double getMohoDepth()- Returns:
- depth of the moho.
-
getMohoBranch
public int getMohoBranch()- Returns:
- branch number with the moho at its top.
-
getAboveMohoTauBranch
- Returns:
- tau branch with the moho at its top.
-
getBelowMohoTauBranch
- Returns:
- tau branch with the moho at its top.
-
getCmbDepth
public double getCmbDepth()- Returns:
- depth of the cmb.
-
getCmbBranch
public int getCmbBranch()- Returns:
- branch number with the cmb at its top.
-
getAboveCmbTauBranch
- Returns:
- tau branch with the iocb at its top.
-
getBelowCmbTauBranch
- Returns:
- tau branch with the iocb at its top.
-
getIocbDepth
public double getIocbDepth()- Returns:
- depth of the iocb.
-
getIocbBranch
public int getIocbBranch()- Returns:
- branch number with the iocb at its top.
-
getAboveIocbTauBranch
- Returns:
- tau branch with the iocb at its bottom.
-
getBelowIocbTauBranch
- Returns:
- tau branch with the iocb at its top.
-
isDegenerateCrust
public boolean isDegenerateCrust()Check if crust is missing, moho at surface- Returns:
-
isDegenerateCrustMantle
public boolean isDegenerateCrustMantle()Check if mantle is missing, model is only core, cmb at surface- Returns:
-
isDegenerateInnerCore
public boolean isDegenerateInnerCore()Check if inner core is missing, iocb at center of earth- Returns:
-
isDegenerateOuterCore
public boolean isDegenerateOuterCore()Check if outer core is missing, iocb at cmb- Returns:
-
getRadiusOfEarth
public double getRadiusOfEarth()- Returns:
- the radius of the Earth in km, usually input from the velocity model.
-
getRayParams
public double[] getRayParams()- Returns:
- an array, cloned, of the ray parameters used to construct the tau branches. This may only be a subset of the slownesses/ray parameters saved in the slowness model due to high slowness zones (low velocity zones).
-
getOneRayParam
public double getOneRayParam(int i) -
getNumBranches
public int getNumBranches() -
getTauBranchAtDepth
Gets the branch that either has the depth as its top boundary, or strictly contains the depth. Also, we allow the bottommost branch to contain its bottom depth, so that the center if the earth is contained within the bottom branch.- Throws:
TauModelException
-
getTauBranch
-
getBranchDepths
public double[] getBranchDepths()returns an array of the depths that are boundaries between branches -
findDepth
returns the turning depth for a ray of given ray parameter. Note this is for a surface source, and so converted phases my give incorrect results, e.g. SKS for certain ray parameters turns within the upper part of the outer core that is a low velocity zone for P so no P wave of that ray parameter could reach the core. For layer specific turning points, see the other SlownessModel.findDepth.- Throws:
TauModelException
-
findBranch
Finds the branch that either has the depth as its top boundary, or strictly contains the depth. Also, we allow the bottommost branch to contain its bottom depth, so that the center if the earth is contained within the bottom branch.- Throws:
TauModelException
-
depthCorrect
Computes a new tau model for a source at depth using the previously computed branches for a surface source. No change is needed to the branches above and below the branch containing the depth, except for the addition of a slowness sample. The branch containing the source depth is split into 2 branches, and up going branch and a downgoing branch. Additionally, the slowness at the source depth must be sampled exactly as it is an extremal point for each of these branches. See Buland and Chapman p 1290.- Throws:
TauModelException
-
isBranchDepth
public boolean isBranchDepth(double depth) Checks to see if the given depth is a boundary depth. This could be because it is a discontinuity in the velocity model, or because the layer has been split for the source or reciever.- Parameters:
depth-- Returns:
-
splitBranch
returns a new TauModel with the branches containing depth split at depth. Used for putting a source at depth since a source can only be located on a branch boundary.- Throws:
TauModelException
-
writeModel
- Throws:
IOException
-
writeModelToStream
- Throws:
IOException
-
readModel
- Throws:
IOExceptionClassNotFoundException
-
readModelFromStream
public static TauModel readModelFromStream(InputStream inStream) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
validate
public boolean validate() -
print
public void print() -
toString
-
branchesToString
-
dumpToString
-
loadFromDepthCache
-