Skip to content

Commit

Permalink
Replaces cf.axes with get_dim_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Mar 8, 2024
1 parent a5bf57c commit e2125f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xcdat/regridder/regrid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import xarray as xr

from xcdat.axis import get_dim_keys
from xcdat.regridder.base import BaseRegridder, _preserve_bounds


Expand Down Expand Up @@ -479,10 +480,7 @@ def _pertub(value: np.ndarray) -> np.ndarray:


def _get_dimension(input_data_var, cf_axis_name):
name = input_data_var.cf.axes[cf_axis_name]

if isinstance(name, list):
name = name[0]
name = get_dim_keys(input_data_var, cf_axis_name)

index = input_data_var.dims.index(name)

Expand Down

0 comments on commit e2125f9

Please sign in to comment.