You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ds_country.salem.roi(shape=country_shape) fails if the mask is [1,N] or [N,1].
Specifically I have mask on very course data that makes from switzerland a set of 3 boxes on the same latitude.
The traceback made me realise that it fails in sio.py at the def _salem_grid_from_dataset(ds): function.
The lines are
` # OK, get it
x = ds.variables[x][:]
y = ds.variables[y][:]
# Make the grid
dx = x[1]-x[0] ### THIS DOESN'T WORK FOR 1D
dy = y[1]-y[0] ### SAME
args = dict(nxny=(x.shape[0], y.shape[0]), proj=proj, dxdy=(dx, dy),
x0y0=(x[0], y[0]))
return gis.Grid(**args)`
At the moment I bodged the info I needed from a different mask, so I can't help with a fool-proof solution.
~Laurens
The text was updated successfully, but these errors were encountered:
Hi @fmaussion,
The ds_country.salem.roi(shape=country_shape) fails if the mask is [1,N] or [N,1].
Specifically I have mask on very course data that makes from switzerland a set of 3 boxes on the same latitude.
The traceback made me realise that it fails in sio.py at the
def _salem_grid_from_dataset(ds):
function.The lines are
` # OK, get it
x = ds.variables[x][:]
y = ds.variables[y][:]
At the moment I bodged the info I needed from a different mask, so I can't help with a fool-proof solution.
~Laurens
The text was updated successfully, but these errors were encountered: