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 distance in degrees, azimuth and back azimuth between latitude longitude points -11/21 and 31/-80.

Degrees      Km     Azimuth  BackAzimuth  Description   (Spherical)  
----------------------------------------------------------------------
  105.00  11675.5   -60.59     93.98      -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 the --geodetic 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 --geodetic

gives you distances from these earthquakes to those stations.

Degrees      Km     Azimuth  BackAzimuth  Description   (Geodetic 298.257223563)  
----------------------------------------------------------------------
   30.61   3403.4    15.65   -121.79      2024-08-30T09:32:19 5.6 mww 52.61/-33.27 to IU.KBS 78.92/11.94
   38.53   4284.3   -98.98     46.68      2024-08-30T09:32:19 5.6 mww 52.61/-33.27 to CO.JSC 34.28/-81.26
   57.78   6424.9   -77.76     44.74      2024-08-30T09:32:19 5.6 mww 52.61/-33.27 to IU.TUC 32.31/-110.78
  157.96  17564.7   -70.34     49.67      2024-08-30T09:32:19 5.6 mww 52.61/-33.27 to IU.SNZO -41.31/174.70
  157.96  17564.7   -70.34     49.67      2024-08-30T09:32:19 5.6 mww 52.61/-33.27 to IU.SNZO -41.31/174.70

It can also calculate from either event and azimuth, or station and back azimuth, but this is limited to spherical, not geodetic.

taup distaz --sta -11 21 --baz -135 --deg 30
Degrees      Km     Azimuth  BackAzimuth  Description   (Spherical)  
----------------------------------------------------------------------
   30.00   3335.8    53.92   -135.00      -30.82/-3.31 to -11.00/21.00

The usage is:

Usage: taup distaz [--debug] [--geodetic] [--help] [--verbose] [--az=<azimuth>]
                   [--baz=<backAzimuth>] [--geodeticflattening=f]
                   [-o=<outFile>] [--prop=<toolPropsFilename>]
                   [--qml=<quakemlFilename>] [--radius=<radiusOfEarth>]
                   [--staxml=<stationxmlFilename>] [--eid=evt[,evt...]]...
                   [--sid=sta[,sta...]]... [--evt=lat lon]... [--sta=lat
                   lon]... [--json | --text] [[--deg=d[,d...]]... [--km=km[,
                   km...]]... [--degreerange=[step][min max][min max step]]...
                   [--kilometerrange=[step][min max][min max step]]...]...
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.
      --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.
      --geodeticflattening=f
                            Inverse Elliptical flattening for distance
                              calculations when --geodetic, defaults to WGS84 ~
                              298.257. The distance calculation uses 1/x.
      --help                display this help message
  -o, --output=<outFile>    output to file, default is stdout.
      --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.
      --staxml=<stationxmlFilename>
                            StationXML file to extract station latitudes and
                              longitudes from
      --verbose             enable verbose output
Output Type:
      --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.