juseg / hyoga

Paleoglacier modelling framework
https://hyoga.io
GNU General Public License v3.0
8 stars 0 forks source link

Axes interpolation fails on non-cartopy axes. #45

Closed juseg closed 1 year ago

juseg commented 1 year ago

Interpolation to axes coordinate with ds.hyoga.interp(ax=ax) fails on matplotlib Axes due to an internal call of ax.get_extent() which is only available on cartopy Geoaxes. To reproduce:

import matplotlib.pyplot as plot
import hyoga

ax = plt.axes()
with hyoga.open.example('pism.alps.out.2d.nc') as ds:
    ds = ds.hyoga.interp(hyoga.open.example('pism.alps.vis.refined.nc'), ax=ax)