-
Notifications
You must be signed in to change notification settings - Fork 296
Description
From conversations on #4719:
The proposal in Step 2 will often give rise to code like this:
for cube in my_cube_list: for coord in cube.coords(): coord.coord_system.encode_axis_order = True my_cube_list.save("tmp.nc")Which is quite clunky. We also regularly find user confusion about the difference between
Coord.coord_system
andCube.coord_system()
, and adding the need to do the above will only increase the frequency of confusion.So: it would be good to provide more convenience for modifying
coord_system
at theCube
level - i.e. automatically modify thecoord_system
of allCoord
s attached to theCube
, assuming they are identical.If sensible, we think it should take the form of
Cube.coord_system
- a@property
that can be set - rather than the current method (coord_system()
), which just invites confusion. The method would have to stay until the next major release of course.
suggestion is going to be clunky; coordinate_system objects aren't shared across coordinates, so would either need a rehaul of how it works, or more effort on the user's side.
Instead, we would offer a docstring tutorial in the new code. This seems to be the more sensible option.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status