Required
parent_folder| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
class GenericTopography(
salvus.project.configuration.topography.cartesian._CartesianBase
):
def __init__(self) -> None: ...np.ndarray | tuple[np.ndarray, np.ndarray])-Coordinates of the data values.xr.Dataset)-The actual dataset representing the model.str)-Name of the topography configuration.float)-Don't deform above this values.float | None)-Don't deform below this value.float)-Reference elevation height.np.ndarray)-Relative elevation model.def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
| Type: | dict |
| Description: | Dictionary containing its init parameters and a few other things. |
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + NetCDF files should be stored. |
class SurfaceTopography(
salvus.project.configuration.topography.cartesian._CartesianBase
):
def __init__(
self,
name: str,
data: pathlib.Path | str | xr.Dataset,
no_deformation_below: float | None = None,
no_deformation_above: float | None = None,
use_symlink: bool = False,
) -> None: ...| Type: | str |
| Description: | Name for this topography model. |
| Type: | pathlib.Path | str | xr.Dataset |
| Description: | xarray dataset, or path to a NetCDF file saved by xarray, which contains the digital elevation model (DEM). |
| Type: | float | None |
| Default value: | None |
| Description: | Do not deform the mesh below this value. |
| Type: | float | None |
| Default value: | None |
| Description: | Usually not necessary for the users to set, as it will be auto-derived from the topography model in most cases. However, if special requirements are present (for instance: the presence of an atmospheric layer above the surface topography), one may benefit from setting this value. |
| Type: | bool |
| Default value: | False |
| Description: | Don't copy the data to the project but only use a symlink. Only works if the data is passed as a filename or path. |
np.ndarray | tuple[np.ndarray, np.ndarray])-Coordinates of the data values.xr.Dataset)-The actual dataset representing the model.str)-Name of the topography configuration.float)-Don't deform above this values.float | None)-Don't deform below this value.float)-Reference elevation height.np.ndarray)-Relative elevation model.def from_appeears_request(
name: str,
data: pathlib.Path,
utm: pyproj.CRS,
resample_topo_nx: int = 100,
decimate_topo_factor: int = 1,
gaussian_std_in_meters: float = 100.0,
no_deformation_below: float | None = None,
no_deformation_above: float | None = None,
dem_variable_name: str | None = None,
) -> SurfaceTopography: ...| Type: | str |
| Description: | Name for this topography model. |
| Type: | pathlib.Path |
| Description: | Path to the APPEEARS NetCDF file. |
| Type: | pyproj.CRS |
| Description: | A pyproj.CRS object describing the UTM projection to which the elevation data should be transformed. The APPEEARS data is assumed to be referenced to the WGS84 ellipsoid by convention. This can usually be gathered from the target UtmDomain object. |
| Type: | int |
| Default value: | 100 |
| Description: | The elevation model is re-sampled onto a regular grid in UTM coordinate. This parameter controls the number of points per dimension in the re-sampled dataset. Resample the elevation model to this many points. If the interpolation stage is taking very long, you can consider decreasing this value. |
| Type: | int |
| Default value: | 1 |
| Description: | Decimate the provided topography model this factor (before conversion to UTM). If the interpolation stage is taking very long, you can consider increasing this value. |
| Type: | float |
| Default value: | 100.0 |
| Description: | Apply a Gaussian filter to the topography model once it has been transformed into UTM coordinates. This serves to smooth the model, and may be necessary if there are very sharp changes in elevation relative to the size of an element. |
| Type: | float | None |
| Default value: | None |
| Description: | Do not deform the mesh below this value. Useful if you have a 1-D model which need to place at a specific depth below the WGS84 sea level. |
| Type: | float | None |
| Default value: | None |
| Description: | Do not deform the mesh above this value. Useful in special circumstances (i.e. if an atmosphere layer is desired). |
| Type: | str | None |
| Default value: | None |
| Description: | The variable name of the actual topography data in the netcdf file. In most cases Salvus will be able to automatically determine this. If not, please specify it. |
def from_gmrt_file(
name: str,
utm: pyproj.CRS,
data: pathlib.Path,
resample_topo_nx: int = 100,
decimate_topo_factor: int = 1,
gaussian_std_in_meters: float = 100.0,
no_deformation_below: float | None = None,
no_deformation_above: float | None = None,
) -> SurfaceTopography: ...| Type: | str |
| Description: | Name for this topography model. |
| Type: | pyproj.CRS |
| Description: | A pyproj.CRS object describing the UTM projection to which the elevation data should be transformed. The GMRT data is assumed to be referenced to the WGS84 ellipsoid by convention. This can usually be gathered from the target UtmDomain object. |
| Type: | pathlib.Path |
| Description: | Path to the GMRT NetCDF file. |
| Type: | int |
| Default value: | 100 |
| Description: | The elevation model is re-sampled onto a regular grid in UTM coordinate. This parameter controls the number of points per dimension in the re-sampled dataset. Resample the elevation model to this many points. If the interpolation stage is taking very long, you can consider decreasing this value. |
| Type: | int |
| Default value: | 1 |
| Description: | Decimate the provided topography model this factor (before conversion to UTM). If the interpolation stage is taking very long, you can consider increasing this value. |
| Type: | float |
| Default value: | 100.0 |
| Description: | Apply a Gaussian filter to the topography model once it has been transformed into UTM coordinates. This serves to smooth the model, and may be necessary if there are very sharp changes in elevation relative to the size of an element. |
| Type: | float | None |
| Default value: | None |
| Description: | Do not deform the mesh below this value. Useful if you have a 1-D model which need to place at a specific depth below the WGS84 sea level. |
| Type: | float | None |
| Default value: | None |
| Description: | Do not deform the mesh above this value. Useful in special circumstances (i.e. if an atmosphere layer is desired). |
def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
| Type: | dict |
| Description: | Dictionary containing its init parameters and a few other things. |
from_apppears_request or
from_gmrt_file functions), and use these lines to deform the
surface of a 2-D mesh according to the topographic profile along the
chosen line.RectBivariateSpline from scipy.def extract_2d_line(
self,
name: str,
p0: tuple[float, float],
p1: tuple[float, float],
buffer_in_meters: float = 0.0,
n_points: int,
) -> SurfaceTopography: ...| Type: | str |
| Description: | Name for this topography model. |
| Type: | tuple[float, float] |
| Description: | A tuple of points (x0, y0) defining the start of the profile. |
| Type: | tuple[float, float] |
| Description: | A tuple of points (x1, y1) defining the end of the profile. |
| Type: | float |
| Default value: | 0.0 |
| Description: | A length in meters on each side of the profile to extend the topography model by. This can be useful, for instance, if you will eventually attach absorbing boundaries to the 2-D mesh and require the topography model to extend into the absorbing region. |
| Type: | int |
| Description: | The number of points with which to perform the interpolation. |
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + NetCDF files should be stored. |