pyrocko.client.globalcmt

Client to get earthquake catalog information from GlobalCMT.

Functions

parse_ndk(data)

Parse GlobalCMT NDK formatted text into Pyrocko events.

parse_ndk_records(data)

Parse GlobalCMT NDK formatted text into NDKRecord objects.

Classes

GlobalCMT()

GlobalCMTNDK([cache_dir, max_age])

Client to get the GlobalCMT catalog from its NDK files.

NDKRecord(**kwargs)

Parsed GlobalCMT NDK record.

class GlobalCMT[source]

Bases: EarthquakeCatalog

Client to get earthquake catalog information from GlobalCMT.

class NDKRecord(**kwargs)[source]

Bases: object

Parsed GlobalCMT NDK record.

The Event object is only created on demand, as setting up the moment tensor is comparatively expensive.

parse_ndk_records(data)[source]

Parse GlobalCMT NDK formatted text into NDKRecord objects.

See parse_ndk().

parse_ndk(data)[source]

Parse GlobalCMT NDK formatted text into Pyrocko events.

Fixed column positions are used, as given in the NDK format description (https://www.ldeo.columbia.edu/~gcmt/projects/CMT/catalog/allorder.ndk_explained). Events are named by the CMT event name without its leading source type character, e.g. '201001122153A', consistent with GlobalCMT. The solution type ('Q': quick, 'S': standard, 'O': old) is stored in extras['catalog_version'], the time the solution has been computed, if available, in extras['catalog_time_modified'].

Parameters:

data (str) – NDK file content.

Returns:

List of Event objects.

class GlobalCMTNDK(cache_dir=None, max_age=3600.0)[source]

Bases: EarthquakeCatalog

Client to get the GlobalCMT catalog from its NDK files.

Instead of querying the GlobalCMT web search, the catalog files are downloaded and cached locally: the bulk file for 1976-2020 (about 23 MB), monthly files with standard solutions since 2021, and the file of quick solutions for recent events. For months without a published monthly file, quick solutions are used.

Unlike GlobalCMT, quick and standard solutions share the catalog name 'gCMT', so that a standard solution can be recognized as an update of a quick one. The solution type and time are available in the event’s extras, see parse_ndk().

Parameters:
  • cache_dir – Directory where downloaded files are kept. Default is a subdirectory of Pyrocko’s cache directory.

  • max_age – Time [s] after which files which may change (quick solutions, not yet published monthly files) are checked for updates.