The get_zvec function does not work for rotated grids when used with a dataset. The extent in a dataset with a rotated grid is the model extent xmin=ymin=0 and not the actual coordinates. Hence the code below will always return nan:
xmin, xmax, ymin, ymax = ds.attrs["extent"]
if (x < xmin) or (x > xmax) or (y < ymin) or (y > ymax):
zvec = np.nan
The
get_zvec
function does not work for rotated grids when used with a dataset. The extent in a dataset with a rotated grid is the model extent xmin=ymin=0 and not the actual coordinates. Hence the code below will always return nan: