ArtesiaWater / hydropandas

Module for loading observation data into custom DataFrames
https://hydropandas.readthedocs.io
MIT License
52 stars 11 forks source link

`get_zvec` in gwobs not working for rotated grids #142

Closed OnnoEbbens closed 1 year ago

OnnoEbbens commented 1 year ago

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