pyrocko.client.globalcmt¶
Client to get earthquake catalog information from GlobalCMT.
Functions
|
Parse GlobalCMT NDK formatted text into Pyrocko events. |
|
Parse GlobalCMT NDK formatted text into |
Classes
|
Client to get the GlobalCMT catalog from its NDK files. |
|
Parsed GlobalCMT NDK record. |
- class GlobalCMT[source]¶
Bases:
EarthquakeCatalogClient to get earthquake catalog information from GlobalCMT.
- class NDKRecord(**kwargs)[source]¶
Bases:
objectParsed GlobalCMT NDK record.
The
Eventobject 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
NDKRecordobjects.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 withGlobalCMT. The solution type ('Q': quick,'S': standard,'O': old) is stored inextras['catalog_version'], the time the solution has been computed, if available, inextras['catalog_time_modified'].
- class GlobalCMTNDK(cache_dir=None, max_age=3600.0)[source]¶
Bases:
EarthquakeCatalogClient 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’sextras, seeparse_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.