|
5 | 5 | from typing import TYPE_CHECKING, Any, Hashable, Literal, Mapping, Optional |
6 | 6 | from warnings import warn |
7 | 7 |
|
8 | | -import numpy as np |
9 | 8 | import xarray as xr |
10 | 9 | from cartopy.mpl.geoaxes import GeoAxes |
11 | 10 | from xarray.core import dtypes |
12 | 11 | from xarray.core.options import OPTIONS |
13 | | -from xarray.core.types import InterpOptions |
14 | | -from xarray.core.utils import UncachedAccessor, either_dict_or_kwargs |
| 12 | +from xarray.core.utils import UncachedAccessor |
15 | 13 |
|
16 | 14 | import uxarray |
17 | 15 | from uxarray.core.aggregation import _uxda_grid_aggregate |
|
23 | 21 | from uxarray.core.utils import _map_dims_to_ugrid |
24 | 22 | from uxarray.core.zonal import _compute_non_conservative_zonal_mean |
25 | 23 | from uxarray.cross_sections import UxDataArrayCrossSectionAccessor |
26 | | -from uxarray.cross_sections.interpolate import ( |
27 | | - interpolate_along_constant_latitude, |
28 | | - interpolate_along_constant_longitude, |
29 | | -) |
30 | 24 | from uxarray.formatting_html import array_repr |
31 | 25 | from uxarray.grid import Grid |
32 | 26 | from uxarray.grid.dual import construct_dual |
@@ -1288,36 +1282,6 @@ def isel( |
1288 | 1282 | missing_dims=missing_dims, |
1289 | 1283 | ) |
1290 | 1284 |
|
1291 | | - def interp( |
1292 | | - self, |
1293 | | - coords: Mapping[Any, Any] | None = None, |
1294 | | - method: InterpOptions = "linear", |
1295 | | - assume_sorted: bool = False, |
1296 | | - kwargs: Mapping[str, Any] | None = None, |
1297 | | - **coords_kwargs: Any, |
1298 | | - ): |
1299 | | - """Docstring TODO""" |
1300 | | - |
1301 | | - # TODO: Handle case where multiple dimensions are trying to be interpolated |
1302 | | - |
1303 | | - # Special interpolate case for the output of cross-sections |
1304 | | - if self.attrs.get("cross_section", False): |
1305 | | - _coords = either_dict_or_kwargs(coords, coords_kwargs, "interp") |
1306 | | - |
1307 | | - if self.attrs.get("constant_latitude", False): |
1308 | | - if "lon" in _coords: |
1309 | | - return interpolate_along_constant_latitude( |
1310 | | - self, self.attrs["constant_latitude"], _coords["lon"] |
1311 | | - ) |
1312 | | - |
1313 | | - elif self.attrs.get("constant_longitude", False): |
1314 | | - if "lat" in _coords: |
1315 | | - return interpolate_along_constant_longitude( |
1316 | | - self, self.attrs["constant_longitude"], _coords["lat"] |
1317 | | - ) |
1318 | | - |
1319 | | - return super().interp(coords, method, assume_sorted, kwargs, **coords_kwargs) |
1320 | | - |
1321 | 1285 | @classmethod |
1322 | 1286 | def from_xarray(cls, da: xr.DataArray, uxgrid: Grid, ugrid_dims: dict = None): |
1323 | 1287 | """ |
|
0 commit comments