lair.geo.round_latlon#
- lair.geo.round_latlon(data, lat_deci, lon_deci, lat_dim='lat', lon_dim='lon')[source]#
Round latitude and longitude values to a specified number of decimal places.
- Parameters:
data (xr.DataArray | xr.Dataset) – The data with lat/lon coordinates to round.
lat_deci (int) – Number of decimal places to round latitude values to.
lon_deci (int) – Number of decimal places to round longitude values to.
lat_dim (str, optional) – Name of the latitude dimension, by default ‘lat’.
lon_dim (str, optional) – Name of the longitude dimension, by default ‘lon’.
- Returns:
xr.DataArray | xr.Dataset – The data with rounded lat/lon coordinates.
- Return type:
_XarrayT