gsolve.core.xr_accessor.TCorrMethods.generate_bathymetry_density#
- TCorrMethods.generate_bathymetry_density(land_sea_mask=None, terrain_density=2670.0, water_density=1030.0, sea_level_elevation=0.0, name='density')[source]#
Generate a bathymetry density grid from a boolean mask grid or DEM.
The output density DataArray can be used in calculating bathymetric terrain corrections. Bathymety cells are assigned a density of terrain_density - water_density. Density in topograpjy cells is set to 0.0.
- Parameters:
- land_sea_maskxarray.DataArray, None, optional
A boolean mask where land/topgraphy is True and sea/bathymetry is False. If None, a mask will be generated from the calling DataArray using
sea_level_elevationas the threshold.- terrain_densityfloat, default is 2670.0
The density of terrain (kg/m^3).
- water_densityfloat, default is 1030.0
The density of water (kg/m^3).
- sea_level_elevationfloat, default is 0.0
The threshold elevation (m). Ignored if
land_sea_maskis provided.- namestr, default is ‘density’
The name of the output DataArray.
- Returns:
- xarray.DataArray
Density grid with same dimensions as the calling DataArray.