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
Bounds attrs are not dropped when linked variables are dropped upon merging. For instance, when merging the grevelingen mapfiles, the variables 'mesh2d_face_x_bnd' and 'mesh2d_face_y_bnd' since they cannot be aligned. However, the variables mesh2d_face_x and mesh2d_face_y have bounds attrs that are not dropped. When writing this to a file, we therefore end up with references to variables that are not available anymore.
Adding on this, manually removing the bounds from the attributes does not seem to work; they will not be dropped, even with del uds['mesh2d_face_x'].attrs['bounds']. I only got it to work when first writing from an xu.UgridDataset to an xr.Dataset and then dropping the variables (through writing new attrs or using del on the 'bounds' attr).
@mgeraeds you are referring to a quickplot crash when opening such a dataset. This happened only with a very old quickplot version (from 2018). With version 2.65.140745 (13-Feb-2022) and also higher versions, the missing bounds variables give a warning, but there is no crash and QuickPlot functions normally. It should still be solved eventually, but manually dropping the bounds attrs seems not necessary.
Bounds attrs are not dropped when linked variables are dropped upon merging. For instance, when merging the grevelingen mapfiles, the variables 'mesh2d_face_x_bnd' and 'mesh2d_face_y_bnd' since they cannot be aligned. However, the variables mesh2d_face_x and mesh2d_face_y have bounds attrs that are not dropped. When writing this to a file, we therefore end up with references to variables that are not available anymore.
MWE:
Prints:
{'units': 'm', 'standard_name': 'projection_x_coordinate', 'long_name': 'Characteristic x-coordinate of mesh face', 'mesh': 'mesh2d', 'location': 'face', 'bounds': 'mesh2d_face_x_bnd'}
The text was updated successfully, but these errors were encountered: