TauP DistazΒΆ
TauP Distaz calculates great circle path distances between lat/lon points.
For example:
taup distaz --sta 31 -80 --evt -11 21
gives you spherical distance in degrees, azimuth and back azimuth between latitude longitude points -11/21 and 31/-80.
Degrees Km Azimuth BackAz Source Receiver Description (Spherical)
---------------------------------------------------------------------------------------------
105.00 11675.5 -60.59 93.98 -11.00/21.00 31.00/-80.00 -11.00/21.00 to 31.00/-80.00
If you have a QuakeML file for earthquakes or a StationXML file for stations
and channels, you can use those to calculate the distances directly. It is
often useful to use either --geodist geodetic or
--geodist geocentric when using latitudes and longitudes
so that the distance calculation is more accurate. For
example:
taup distaz --quakeml my_midatlantic.qml --staxml my_stations.staml --geodist geodetic
gives you distances from these earthquakes to those stations.
Degrees Km Azimuth BackAz Source Receiver Description (Geodetic 298.257223563)
---------------------------------------------------------------------------------------------
30.56 3397.8 15.63 -121.77 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km IU_KBS 78.92/11.94 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km to IU_KBS 78.92/11.94
38.51 4281.9 -98.92 46.62 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km CO_JSC 34.28/-81.26 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km to CO_JSC 34.28/-81.26
57.74 6420.6 -77.66 44.65 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km IU_TUC 32.31/-110.78 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km to IU_TUC 32.31/-110.78
157.98 17566.2 -69.92 49.45 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km IU_SNZO_00_H_H_Z -41.31/174.70 91.00 m 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km to IU_SNZO_00_H_H_Z -41.31/174.70 91.00 m
157.98 17566.2 -69.92 49.45 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km IU_SNZO_10_H_H_Z -41.31/174.70 0.00 m 2024-08-30T09:32:19 5.6 mww 52.61/-33.27 10.00 km to IU_SNZO_10_H_H_Z -41.31/174.70 0.00 m
It can also calculate from event, distance and azimuth.
taup distaz --sta -11 21 --baz -135 --deg 30 --geodist geodetic
Degrees Km Azimuth BackAz Source Receiver Description (Geodetic 298.257223563)
---------------------------------------------------------------------------------------------
30.00 3335.8 53.93 -135.00 -30.90/-3.28 -11.00/21.00 baz -135.00 from -11.00/21.00
Or from station, distance and back azimuth.
taup distaz --evt -11 21 --az 35 --km 3000 --geodist geodetic
Degrees Km Azimuth BackAz Source Receiver Description (Geodetic 298.257223563)
---------------------------------------------------------------------------------------------
26.98 3000.0 35.00 -144.95 -11.00/21.00 11.35/36.37 -11.00/21.00 to az 35.00
The usage is:
Usage: taup distaz [--debug] [--geodetic] [--help] [--verbose] [--az=<azimuth>]
[--baz=<backAzimuth>] [--equitorialradius=m]
[--invflattening=f] [-o=<outFile>] [--planet=<planet>]
[--prop=<toolPropsFilename>] [--qml=<quakemlFilename>]
[--staxml=<stationxmlFilename>] [--eid=evt[,evt...]]...
[-h=depth[,depth...]]... [--sid=sta[,sta...]]...
[--stadepth=depth[,depth...]]... [--evt=lat lon]...
[--sta=lat lon]... [--geodist=<geoDistTypes>...]... [--html
| --json | --text] [[--deg=d[,d...]]... [--km=km[,km...]]...
[--degreerange=[step][min max][min max step]]...
[--kilometerrange=[step][min max][min max step]]...]...
[--mod=<modelName> | [--radius=<radiusOfEarth>]]
Calc distance, az and baz for event lat,lon and station lat,lon pairs.
Options:
--az=<azimuth> azimuth in degrees, source to receiver
--baz=<backAzimuth> backazimuth in degrees, receiver to source
--debug enable debugging output
--eid=evt[,evt...] event id, like us7000pn9s, for lookup via USGS
fdsn event web service. Creates a distance if
station is also given.
--equitorialradius=m Equitorial radius in meters for distance
calculations when geodetic or geocentric,
defaults to WGS84 ~ 6378137 meters.
--evt, --event=lat lon event latitude and longitude. Creates a distance
if station is also given.
--geodetic use geodetic latitude for distance calculations,
which implies an ellipticity. Default is
spherical. Note this only affects calculation of
distance from lat/lon pairs, all travel time
calculations are done in a purely spherical
model.
--geodist=<geoDistTypes>...
Type of distance calculation to use for lat,lon
distance calculation, one of spherical,
geocentric, geodetic. Default is spherical. Note
this only affects calculation of distance from
lat/lon pairs, all travel time calculations are
done in a purely spherical model.
-h, --evdepth, --sourcedepth=depth[,depth...]
source depth in km
--help display this help message
--invflattening, --geodeticflattening=f
Inverse Elliptical flattening for distance
calculations when geocentric or geodetic,
defaults to WGS84 ~ 298.257. The distance
calculation uses 1/x.
--mod, --model=<modelName>
use velocity model "modelName" for radius, used
when distance given in km.
-o, --output=<outFile> output to file, default is stdout.
--planet=<planet> Geodesic for planets, for distance calculations
when --geodetic, one of: EARTH, MOON, MARS,
VENUS, MERCURY, CERES, JUPITER, SATURN, URANUS,
NEPTUNE.
--prop=<toolPropsFilename>
load defaults from properties file
--qml, --quakeml=<quakemlFilename>
QuakeML file to load for earthquake origins to use
--radius=<radiusOfEarth>
radius of earth in km, used when distance given in
km
--sid=sta[,sta...] station id, like CO.HAW or FDSN:CO_HAW, for lookup
via fedcat web service. Creates a distance if
event is also given.
--sta, --station=lat lon
station latitude and longitude. Creates a distance
if event is also given.
--stadepth, --receiverdepth=depth[,depth...]
the receiver depth in km for stations not at the
surface
--staxml=<stationxmlFilename>
StationXML file to extract station latitudes and
longitudes from
--verbose enable verbose output
Output Type:
--html outputs as HTML
--json outputs as JSON
--text outputs as Text
Optional distance is given by:
--deg, --degree=d[,d...]
distance in degrees
--degreerange=[step][min max][min max step]
regular distance range in degrees, one of step;
min max or min max step. Default min is 0, max
is 180 and step is 10.
--kilometerrange=[step][min max][min max step]
regular distance range in kilometers, one of step;
min max or min max step. Default min is 0, max
is 1000 and step is 100.
--km, --kilometer=km[,km...]
distance in kilometers along surface.