pyrocko.fomosto.psgrn_pscmp

Functions

distributed_fault_patches_to_config(patches)

Input: List of PsCmpRectangularSource(s)

get_nullification_factor(mu, lame_lambda)

Factor that needs to be multiplied to 2 of the tensile sources to eliminate two of the isotropic components.

get_trace_normalization_factor(mu, ...)

Factor to be multiplied to elementary GF trace to have unit displacement.

Classes

PsCmpArray(**kwargs)

Calculation on a grid.

PsCmpConfig(**kwargs)

Undocumented.

PsCmpConfigFull(**kwargs)

Undocumented.

PsCmpCoulombStress(**kwargs)

Undocumented.

PsCmpCoulombStressMasterFault(**kwargs)

Undocumented.

PsCmpMomentTensor(**kwargs)

Mapping of Moment Tensor components to rectangular faults.

PsCmpObservation(**kwargs)

Undocumented.

PsCmpProfile(**kwargs)

Calculation along observation profile.

PsCmpRectangularSource(**kwargs)

Rectangular Source for the input geometry of the active fault.

PsCmpRunner([tmp, keep_tmp])

Wrapper object to execute the program fomosto_pscmp with the specified configuration.

PsCmpScatter(**kwargs)

Scattered observation points.

PsCmpShearSF(**kwargs)

Shear fault source model component.

PsCmpSnapshots(**kwargs)

Snapshot time series definition.

PsCmpTensileSF(**kwargs)

Compound dislocation of 3 perpendicular, rectangular sources to approximate an opening single force couple.

PsGrnConfig(**kwargs)

Configuration for PSGRN.

PsGrnConfigFull(**kwargs)

Undocumented.

PsGrnPsCmpConfig(**kwargs)

Combined config Object of PsGrn and PsCmp.

PsGrnRunner(outdir)

Wrapper object to execute the program fomosto_psgrn.

PsGrnSpatialSampling(**kwargs)

Definition of spatial sampling for PSGRN.

class PsGrnSpatialSampling(**kwargs)[source]

Bases: Object

Definition of spatial sampling for PSGRN.

Note: attributes in this class use non-standard units [km] to be consistent with PSGRN text file input. Please read the documentation carefully.

n_steps

int, default: 10

start_distance

float, default: 0.0

end_distance

float, default: 100.0

class PsGrnConfig(**kwargs)[source]

Bases: Object

Configuration for PSGRN.

Note: attributes in this class use non-standard units [km] and [days] to be consistent with PSGRN text file input. Please read the documentation carefully.

version

str, default: '2008a'

sampling_interval

float, default: 1.0

Exponential sampling 1.- equidistant, > 1. decreasing sampling with distance

n_time_samples

int, optional

Number of temporal GF samples up to max_time. Has to be equal to a power of 2! If not, next power of 2 is taken.

max_time

float, optional

Maximum time [days] after seismic event.

gf_depth_spacing

float, optional

Depth spacing [km] for the observation points. If not defined depth spacing from the StoreConfig is used

gf_distance_spacing

float, optional

Spatial spacing [km] for the observation points. If not defined distance spacing from the StoreConfig is used

observation_depth

float, default: 0.0

Depth of observation points [km]

class PsGrnConfigFull(**kwargs)[source]

Bases: PsGrnConfig

Undocumented.

earthmodel_1d

pyrocko.cake.LayeredModel (pyrocko.gf.meta.Earthmodel1D), optional

psgrn_outdir

str, default: 'psgrn_green/'

distance_grid

PsGrnSpatialSampling, default: PsGrnSpatialSampling()

depth_grid

PsGrnSpatialSampling, default: PsGrnSpatialSampling()

sw_source_regime

int, default: 1

sw_gravity

int, default: 0

accuracy_wavenumber_integration

float, default: 0.025

displ_filenames

tuple of 3 str objects, default: ('uz', 'ur', 'ut')

stress_filenames

tuple of 6 str objects, default: ('szz', 'srr', 'stt', 'szr', 'srt', 'stz')

tilt_filenames

tuple of 3 str objects, default: ('tr', 'tt', 'rot')

gravity_filenames

tuple of 2 str objects, default: ('gd', 'gr')

class PsGrnRunner(outdir)[source]

Bases: object

Wrapper object to execute the program fomosto_psgrn.

run(config, force=False)[source]

Run the program with the specified configuration.

Parameters:
  • configPsGrnConfigFull

  • force – boolean, set true to overwrite existing output

distributed_fault_patches_to_config(patches)[source]

Input: List of PsCmpRectangularSource(s)

class PsCmpObservation(**kwargs)[source]

Bases: Object

Undocumented.

class PsCmpScatter(**kwargs)[source]

Bases: PsCmpObservation

Scattered observation points.

lats

list of float objects, optional, default: [10.4, 10.5]

lons

list of float objects, optional, default: [12.3, 13.4]

class PsCmpProfile(**kwargs)[source]

Bases: PsCmpObservation

Calculation along observation profile.

n_steps

int, default: 10

slat

float, default: 0.0

Profile start latitude

slon

float, default: 0.0

Profile start longitude

elat

float, default: 0.0

Profile end latitude

elon

float, default: 0.0

Profile end longitude

distances

list of float objects, optional

Distances [m] for each point on profile from start to end.

class PsCmpArray(**kwargs)[source]

Bases: PsCmpObservation

Calculation on a grid.

n_steps_lat

int, default: 10

n_steps_lon

int, default: 10

slat

float, default: 0.0

Array start latitude

slon

float, default: 0.0

Array start longitude

elat

float, default: 0.0

Array end latitude

elon

float, default: 0.0

Array end longitude

class PsCmpRectangularSource(**kwargs)[source]

Bases: Location, Cloneable

Rectangular Source for the input geometry of the active fault.

Input parameters have to be in: [deg] for reference point (lat, lon) and angles (rake, strike, dip) [m] shifting with respect to reference position [m] for fault dimensions and source depth. The default shift of the origin (:py:attr`pos_s`, pos_d) with respect to the reference

coordinates

(lat, lon) is zero, which implies that the reference is the center of

the fault plane!

The calculation point is always the center of the fault-plane! Setting :py:attr`pos_s` or :py:attr`pos_d` moves the fault point with

respect to the origin along strike and dip direction, respectively!

length

float, default: 6000.0

width

float, default: 5000.0

strike

float, default: 0.0

dip

float, default: 90.0

rake

float, default: 0.0

torigin

float, default: 0.0

slip

float, optional, default: 1.0

pos_s

float, optional

pos_d

float, optional

opening

float, default: 0.0

update(**kwargs)[source]

Change some of the source models parameters.

Example:

>>> from pyrocko import gf
>>> s = gf.DCSource()
>>> s.update(strike=66., dip=33.)
>>> print(s)
--- !pf.DCSource
depth: 0.0
time: 1970-01-01 00:00:00
magnitude: 6.0
strike: 66.0
dip: 33.0
rake: 0.0
get_nullification_factor(mu, lame_lambda)[source]

Factor that needs to be multiplied to 2 of the tensile sources to eliminate two of the isotropic components.

get_trace_normalization_factor(mu, lame_lambda, nullification)[source]

Factor to be multiplied to elementary GF trace to have unit displacement.

class PsCmpTensileSF(**kwargs)[source]

Bases: Location, Cloneable

Compound dislocation of 3 perpendicular, rectangular sources to approximate an opening single force couple. NED coordinate system!

Warning: Mixed standard [m] / non-standard [days] units are used in this class. Please read the documentation carefully.

length

float, default: 1000.0

Length of source rectangle [m].

width

float, default: 1000.0

Width of source rectangle [m].

torigin

float, default: 0.0

Origin time [days]

idx

str, default: 'nn'

Axis index for opening direction; “nn”, “ee”, or “dd”

class PsCmpShearSF(**kwargs)[source]

Bases: Location, Cloneable

Shear fault source model component.

Warning: Mixed standard [m] / non-standard [days] units are used in this class. Please read the documentation carefully.

length

float, default: 1000.0

Length of source rectangle [m].

width

float, default: 1000.0

Width of source rectangle [m].

torigin

float, default: 0.0

Origin time [days]

idx

str, default: 'ne'

Axis index for opening direction; “ne”, “nd”, or “ed”

class PsCmpMomentTensor(**kwargs)[source]

Bases: Location, Cloneable

Mapping of Moment Tensor components to rectangular faults. Only one component at a time valid! NED coordinate system!

Warning: Mixed standard [m] / non-standard [days] units are used in this class. Please read the documentation carefully.

length

float, default: 1000.0

Length of source rectangle [m].

width

float, default: 1000.0

Width of source rectangle [m].

torigin

float, default: 0.0

Origin time [days]

idx

str, default: 'nn'

Axis index for MT component; “nn”, “ee”, “dd”, “ne”, “nd”, or “ed”.

class PsCmpCoulombStress(**kwargs)[source]

Bases: Object

Undocumented.

class PsCmpCoulombStressMasterFault(**kwargs)[source]

Bases: PsCmpCoulombStress

Undocumented.

friction

float, default: 0.7

skempton_ratio

float, default: 0.0

master_fault_strike

float, default: 300.0

master_fault_dip

float, default: 15.0

master_fault_rake

float, default: 90.0

sigma1

float, default: 1000000.0

[Pa]

sigma2

float, default: -1000000.0

[Pa]

sigma3

float, default: 0.0

[Pa]

class PsCmpSnapshots(**kwargs)[source]

Bases: Object

Snapshot time series definition.

Note: attributes in this class use non-standard units [days] to be consistent with PSCMP text file input. Please read the documentation carefully.

tmin

float, default: 0.0

Time [days] after source time to start temporal sample snapshots.

tmax

float, default: 1.0

Time [days] after source time to end temporal sample f.

deltatdays

float, default: 1.0

Sample period [days].

class PsCmpConfig(**kwargs)[source]

Bases: Object

Undocumented.

version

str, default: '2008a'

observation

PsCmpObservation, default: PsCmpScatter()

rectangular_fault_size_factor

float, default: 1.0

The size of the rectangular faults in the compound MT PsCmpMomentTensor is dependend on the horizontal spacing of the GF database. This factor is applied to the relationship in i.e. fault length & width = f * dx.

snapshots

PsCmpSnapshots, optional

rectangular_source_patches

list of PsCmpRectangularSource objects, default: []

class PsCmpConfigFull(**kwargs)[source]

Bases: PsCmpConfig

Undocumented.

pscmp_outdir

str, default: './'

psgrn_outdir

str, default: './psgrn_functions/'

los_vector

tuple of 3 float objects, optional

sw_los_displacement

int, default: 0

sw_coulomb_stress

int, default: 0

coulomb_master_field

PsCmpCoulombStress, optional, default: PsCmpCoulombStressMasterFault()

displ_sw_output_types

tuple of 3 int objects, default: (0, 0, 0)

stress_sw_output_types

tuple of 6 int objects, default: (0, 0, 0, 0, 0, 0)

tilt_sw_output_types

tuple of 3 int objects, default: (0, 0, 0)

gravity_sw_output_types

tuple of 2 int objects, default: (0, 0)

indispl_filenames

tuple of 3 str objects, default: ('uz', 'ur', 'ut')

instress_filenames

tuple of 6 str objects, default: ('szz', 'srr', 'stt', 'szr', 'srt', 'stz')

intilt_filenames

tuple of 3 str objects, default: ('tr', 'tt', 'rot')

ingravity_filenames

tuple of 2 str objects, default: ('gd', 'gr')

outdispl_filenames

tuple of 3 str objects, default: ('un', 'ue', 'ud')

outstress_filenames

tuple of 6 str objects, default: ('snn', 'see', 'sdd', 'sne', 'snd', 'sed')

outtilt_filenames

tuple of 3 str objects, default: ('tn', 'te', 'rot')

outgravity_filenames

tuple of 2 str objects, default: ('gd', 'gr')

snapshot_basefilename

str, default: 'snapshot'

class PsGrnPsCmpConfig(**kwargs)[source]

Bases: Object

Combined config Object of PsGrn and PsCmp.

Note: attributes in this class use non-standard units [days] to be consistent with PSCMP text file input. Please read the documentation carefully.

tmin_days

float, default: 0.0

Min. time in days

tmax_days

float, default: 1.0

Max. time in days

gf_outdir

str, default: 'psgrn_functions'

psgrn_config

PsGrnConfig, default: PsGrnConfig()

pscmp_config

PsCmpConfig, default: PsCmpConfig()

class PsCmpRunner(tmp=None, keep_tmp=False)[source]

Bases: object

Wrapper object to execute the program fomosto_pscmp with the specified configuration.

Parameters:
  • tmp – string, path to the temporary directy where calculation results are stored

  • keep_tmp – boolean, if True the result directory is kept

run(config)[source]

Run the program!

Parameters:

configPsCmpConfigFull

get_results(component='displ')[source]

Get the resulting components from the stored directory. Be careful: The z-component is downward positive!

Parameters:

component – string, the component to retrieve from the

result directory, may be:

“displ”: displacement, n x 3 array “stress”: stresses n x 6 array “tilt’: tilts n x 3 array, “gravity’: gravity n x 2 array “all”: all the above together

get_traces(component='displ')[source]

Load snapshot data array and return specified components. Transform array component and receiver wise to list of pyrocko.trace.Trace