Mondaic

salvus.project.configuration.bathymetry.spherical

salvus.project.configuration.bathymetry.spherical salvus project configuration bathymetry spherical

Spherical bathymetry.

Classes

OceanLayer

class OceanLayer(
    salvus.project.configuration.bathymetry.spherical._SphericalBase
):
    def __init__(
        self,
        name: str,
        data: pathlib.Path | str,
        ocean_layer_vp: float = 1450.0,
        ocean_layer_density: float = 1020.0,
        ocean_layer_cutoff: float | None = None,
        shore_smoothing_factor: float | None = None,
        use_symlink: bool = False,
    ): ...

Approximate the effect of Earth’s oceans using a water layer.

While the “ocean loading” approximation produces good results when considering lower-frequency waves, it cannot model ocean-rebverbarated phases. When an ocean layer is added to the simulation, true acoustic elements are placed in ocean regions, and these elements are coupled to the crust via a standard fluid-solid coupling algorithm. When the ocean gets to thin (near the shore), the ocean loading approximation is then used.

Parameters
  • name str — Name of the bathymetry model.
  • data pathlib.Path | str — Path to the bathymetry data file.
  • ocean_layer_vp float — The (constant) velocity of water in the ocean layer. Defaults to 1450.0 m/s.
  • ocean_layer_density float — The (constant) density of water in the ocean layer. Defaults to 1020 kg/m**3.
  • ocean_layer_cutoff float | None — Use the ocean loading approximation once the ocean becomes shallower than this value in meters. Defaults to None, in which case an appropriate value will be computed using the period of the mesh.
  • shore_smoothing_factor float | None — “Smooth” the shoreline to a second-order discontinuity. Defaults to None, in which case a value of 0.3 will be used.
  • use_symlink bool — Don’t copy the data to the project but only symlink it. The downside of symlinking is that the project is no longer fully self-contained. The upside is that very large external files that could be used for multiple projects don’t get copied.
Attributes
ds xr.Dataset

The actual dataset representing the model.

name str

Model name.

ocean_layer_cutoff float | None

Ocean layer cutoff.

ocean_layer_density float

Density of the ocean layer.

ocean_layer_style str

Style of ocean layer.

ocean_layer_vp float

P-wave velocity of the ocean layer.

shore_smoothing_factor float | None

Shore smoothing factor.

Methods
from_json()
def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • parent_folder pathlib.Path — Path to which the serialized model is relative to.
  • d dict — Dictionary containing its init parameters and a few other things.
Returns _ModelBase
to_json()
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...

Serialize the model to JSON (and an associated NetCDF file).

Parameters
  • parent_folder pathlib.Path | str — Parent folder where the JSON + NetCDF files should be stored.
Returns dict

OceanLoad

class OceanLoad(
    salvus.project.configuration.bathymetry.spherical._SphericalBase
):
    def __init__(
        self,
        name: str,
        data: pathlib.Path | str,
        ocean_layer_density: float = 1020.0,
        use_symlink: bool = False,
    ): ...

Approximate the effect of Earth’s oceans using a boundary condition.

The “ocean loading” approximation uses a boundary condition to approximate the effect of the oceans on seismic waveforms. This boundary condition essentially accounts for the effect of the weight of the oceans, but any oceanic “phases” will not be modelled.

Parameters
  • name str — Name of the bathymetry model.
  • data pathlib.Path | str — Path to the bathymetry data file.
  • ocean_layer_density float — The (constant) density of water in the ocean layer. Defaults to 1020 kg/m**3.
  • use_symlink bool — Don’t copy the data to the project but only symlink it. The downside of symlinking is that the project is no longer fully self-contained. The upside is that very large external files that could be used for multiple projects don’t get copied.
Attributes
ds xr.Dataset

The actual dataset representing the model.

name str

Model name.

ocean_layer_cutoff float | None

Ocean layer cutoff.

ocean_layer_density float

Density of the ocean layer.

ocean_layer_style str

Style of ocean layer.

ocean_layer_vp float

P-wave velocity of the ocean layer.

shore_smoothing_factor float | None

Shore smoothing factor.

Methods
from_json()
def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • parent_folder pathlib.Path — Path to which the serialized model is relative to.
  • d dict — Dictionary containing its init parameters and a few other things.
Returns _ModelBase
to_json()
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...

Serialize the model to JSON (and an associated NetCDF file).

Parameters
  • parent_folder pathlib.Path | str — Parent folder where the JSON + NetCDF files should be stored.
Returns dict

Used in tutorials