Open knutfrode opened 11 months ago
@jay-hennen: I looked quickly at this, but haven't figure it out.
I suspect the hard crash is from CellTree2d -- where else would it be? So there is something wrong with this grid that celltree doesn't like.
IIUC, this file was processed from ROMS -- and I think the rho grid and psi grid may have gotten a bit changed -- e.g. they are the same size, which I don't think is usually the case. That may be the source of the warning: 'Assuming low padding for faces'
But it should never hard crash, and I think this should probably work, if being odd at thr boundaries.
Yes, it's from CellTree2D
After peeking in, the problem is that lon_psi and lat_psi are both full of zeros. lon_rho and lat_rho seem to have valid data, but the CellTree is built across the psi grid.
(Pdb) self.data._grp['lon_psi'][:]
masked_array(
data=[[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]],
mask=False,
fill_value=999999,
dtype=int16)
Hmm -- is it worth a sanity check on grid definitions before calling cell_tree?
Not sure how expensive that would be -- but at least a couple things would be good.
When trying to use the at-method with the script/dataset bwlow, it crashes with the following error message: