salvus.project.configuration.topography.spherical
salvus.project.configuration.topography.spherical salvus project configuration topography spherical Spherical topography.
Classes
MohoTopography
MohoTopographyclass MohoTopography(
salvus.project.configuration.topography.spherical._SphericalBase
):
def __init__(
self, name: str, data: pathlib.Path | str, use_symlink: bool = False
): ...Spherical topography.
Parameters
namestr — Name of the topography.datapathlib.Path | str — Filename with the data.use_symlinkbool — 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
coordinates np.ndarray | tuple[np.ndarray, np.ndarray]
coordinates np.ndarray | tuple[np.ndarray, np.ndarray]Coordinates of the data values.
ds xr.Dataset
ds xr.DatasetThe actual dataset representing the model.
name str
name strName of the topography configuration.
no_deformation_below float | None
no_deformation_below float | NoneDon’t deform below this value.
reference_elevation float
reference_elevation floatReference elevation height.
relative_elevation_model np.ndarray
relative_elevation_model np.ndarrayRelative elevation model.
Methods
from_json()
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_folderpathlib.Path — Path to which the serialized model is relative to.ddict — Dictionary containing its init parameters and a few other things.
Returns _ModelBase
to_json()
to_json()def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...Serialize the model to JSON (and an associated NetCDF file).
Parameters
parent_folderpathlib.Path | str — Parent folder where the JSON + NetCDF files should be stored.
Returns dict
SurfaceTopography
SurfaceTopographyclass SurfaceTopography(
salvus.project.configuration.topography.spherical._SphericalBase
):
def __init__(
self, name: str, data: pathlib.Path | str, use_symlink: bool = False
): ...Spherical topography.
Parameters
namestr — Name of the topography.datapathlib.Path | str — Filename with the data.use_symlinkbool — 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
coordinates np.ndarray | tuple[np.ndarray, np.ndarray]
coordinates np.ndarray | tuple[np.ndarray, np.ndarray]Coordinates of the data values.
ds xr.Dataset
ds xr.DatasetThe actual dataset representing the model.
name str
name strName of the topography configuration.
no_deformation_below float | None
no_deformation_below float | NoneDon’t deform below this value.
reference_elevation float
reference_elevation floatReference elevation height.
relative_elevation_model np.ndarray
relative_elevation_model np.ndarrayRelative elevation model.
Methods
from_json()
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_folderpathlib.Path — Path to which the serialized model is relative to.ddict — Dictionary containing its init parameters and a few other things.
Returns _ModelBase
to_json()
to_json()def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...Serialize the model to JSON (and an associated NetCDF file).
Parameters
parent_folderpathlib.Path | str — Parent folder where the JSON + NetCDF files should be stored.
Returns dict