edu.sc.seis.TauP
Class TauModel

java.lang.Object
  extended by edu.sc.seis.TauP.TauModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TauModel
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

provides storage all of the TauBranch's comprising a model.

Version:
1.1.3 Wed Jul 18 15:00:35 GMT 2001
Author:
H. Philip Crotwell
See Also:
Serialized Form

Field Summary
protected  int cmbBranch
          Branch with the cmb at its top.
protected  double cmbDepth
          Depth of the cmb.
 boolean DEBUG
          True to enable debugging output.
protected  int iocbBranch
          Branch with the iocb at its top.
protected  double iocbDepth
          Depth of the iocb.
protected  int mohoBranch
          Branch with the moho at its top.
protected  double mohoDepth
          Depth of the moho.
protected  double[] noDisconDepths
          Depths that should not have reflections or phase conversions.
protected  double radiusOfEarth
          Radius of the Earth in km, usually input from the velocity model.
protected  double[] rayParams
          ray parameters used to construct the tau branches.
 SlownessModel sMod
          The slowness model that was used to generate the tau model.
protected  int sourceBranch
          Branch with the source at its top.
protected  double sourceDepth
          Depth for which tau model was constructed.
 boolean spherical
          True if this is a spherical slowness model.
 TauBranch[][] tauBranches
          2D Array containing a TauBranch object corresponding to each "branch" of the tau model, 0 is P and 1 is S.
 
Constructor Summary
TauModel()
           
 
Method Summary
 void appendNoDisconDepth(double noDisconDepth)
           
 void calcTauIncFrom(SlownessModel sMod)
          Calculates tau for each branch within a slowness model.
 java.lang.Object clone()
          Returns a clone of the tau model so that changes to the clone do not affect the original.
 TauModel depthCorrect(double depth)
          Computes a new tau model for a source at depth using the previously computed branches for a surface source.
 int findBranch(double depth)
          Finds the branch that either has the depth as its top boundary, or strictly contains the depth.
 double findDepth(double rayParam, boolean isPWave)
          returns the turning depth for a ray of given ray parameter.
 double[] getBranchDepths()
          returns an array of the depths that are boundaries between branches
 int getCmbBranch()
           
 double getCmbDepth()
           
 int getIocbBranch()
           
 double getIocbDepth()
           
 java.lang.String getModelName()
           
 int getMohoBranch()
           
 double getMohoDepth()
           
 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.
 int getNumBranches()
           
 double getOneRayParam(int i)
           
 double getRadiusOfEarth()
           
 double[] getRayParams()
           
 SlownessModel getSlownessModel()
           
 int getSourceBranch()
           
 double getSourceDepth()
           
 TauBranch getTauBranch(int branchNum, boolean isPWave)
           
 VelocityModel getVelocityModel()
           
 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.
 boolean isNoDisconDepth(double noDisconDepth)
          Is the given depth a "noDisconDepth"?
static void main(java.lang.String[] args)
           
 void print()
           
static TauModel readModel(java.lang.String filename)
           
static TauModel readModelFromStream(java.io.InputStream inStream)
           
 void setNoDisconDepths(double[] noDisconDepths)
           
 TauModel splitBranch(double depth)
          returns a new TauModel with the branches containing depth split at depth.
 java.lang.String toString()
           
 boolean validate()
           
 void writeModel(java.lang.String filename)
           
 void writeModelToStream(java.io.OutputStream outStream)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public transient boolean DEBUG
True to enable debugging output.


spherical

public boolean spherical
True if this is a spherical slowness model. False if flat.


sourceDepth

protected double sourceDepth
Depth for which tau model was constructed.


sourceBranch

protected int sourceBranch
Branch with the source at its top.


noDisconDepths

protected double[] noDisconDepths
Depths 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.


mohoDepth

protected double mohoDepth
Depth of the moho.


mohoBranch

protected int mohoBranch
Branch with the moho at its top.


cmbDepth

protected double cmbDepth
Depth of the cmb.


cmbBranch

protected int cmbBranch
Branch with the cmb at its top.


iocbDepth

protected double iocbDepth
Depth of the iocb.


iocbBranch

protected int iocbBranch
Branch with the iocb at its top.


radiusOfEarth

protected double radiusOfEarth
Radius of the Earth in km, usually input from the velocity model.


sMod

public SlownessModel sMod
The slowness model that was used to generate the tau model. This in needed in order to modify the tau branches from a surface focus event to an event at depth. This is normally be set when the tau model is generated to be a clone of the slowness model.


rayParams

protected double[] rayParams
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).


tauBranches

public TauBranch[][] 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 Detail

TauModel

public TauModel()
Method Detail

getModelName

public java.lang.String getModelName()

getSlownessModel

public SlownessModel getSlownessModel()

getVelocityModel

public VelocityModel getVelocityModel()

getSourceDepth

public double getSourceDepth()

getSourceBranch

public int getSourceBranch()

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.


isNoDisconDepth

public boolean isNoDisconDepth(double noDisconDepth)
Is the given depth a "noDisconDepth"?


setNoDisconDepths

public void setNoDisconDepths(double[] noDisconDepths)

appendNoDisconDepth

public void appendNoDisconDepth(double noDisconDepth)

getMohoDepth

public double getMohoDepth()

getMohoBranch

public int getMohoBranch()

getCmbDepth

public double getCmbDepth()

getCmbBranch

public int getCmbBranch()

getIocbDepth

public double getIocbDepth()

getIocbBranch

public int getIocbBranch()

getRadiusOfEarth

public double getRadiusOfEarth()

getRayParams

public double[] getRayParams()

getOneRayParam

public double getOneRayParam(int i)

getNumBranches

public int getNumBranches()

getTauBranch

public TauBranch getTauBranch(int branchNum,
                              boolean isPWave)

getBranchDepths

public double[] getBranchDepths()
returns an array of the depths that are boundaries between branches


findDepth

public double findDepth(double rayParam,
                        boolean isPWave)
                 throws TauModelException
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

calcTauIncFrom

public void calcTauIncFrom(SlownessModel sMod)
                    throws SlownessModelException,
                           NoSuchLayerException,
                           TauModelException,
                           NoSuchMatPropException
Calculates tau for each branch within a slowness model.

Throws:
SlownessModelException - occurs if getNumLayers() < 1 as we cannot compute a distance without a layer.
NoSuchLayerException
TauModelException
NoSuchMatPropException

findBranch

public int findBranch(double depth)
               throws TauModelException
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

public TauModel depthCorrect(double depth)
                      throws TauModelException
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

splitBranch

public TauModel splitBranch(double depth)
                     throws TauModelException
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

public void writeModel(java.lang.String filename)
                throws java.io.IOException
Throws:
java.io.IOException

writeModelToStream

public void writeModelToStream(java.io.OutputStream outStream)
                        throws java.io.IOException
Throws:
java.io.IOException

readModel

public static TauModel readModel(java.lang.String filename)
                          throws java.io.FileNotFoundException,
                                 java.io.IOException,
                                 java.io.StreamCorruptedException,
                                 java.lang.ClassNotFoundException,
                                 java.io.OptionalDataException
Throws:
java.io.FileNotFoundException
java.io.IOException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.OptionalDataException

readModelFromStream

public static TauModel readModelFromStream(java.io.InputStream inStream)
                                    throws java.io.InvalidClassException,
                                           java.io.IOException,
                                           java.io.StreamCorruptedException,
                                           java.lang.ClassNotFoundException,
                                           java.io.OptionalDataException
Throws:
java.io.InvalidClassException
java.io.IOException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.OptionalDataException

validate

public boolean validate()

print

public void print()

clone

public java.lang.Object clone()
Returns a clone of the tau model so that changes to the clone do not affect the original.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)


Copyright © 1999-2006 Seismology at the University of South Carolina. All Rights Reserved.