Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coords to print shorter, and avoid realising #4488

Closed
pp-mo opened this issue Jan 10, 2022 · 2 comments · Fixed by #4499
Closed

Coords to print shorter, and avoid realising #4488

pp-mo opened this issue Jan 10, 2022 · 2 comments · Fixed by #4499
Assignees

Comments

@pp-mo
Copy link
Member

pp-mo commented Jan 10, 2022

Printing large coords has been a practical problem for some time : Although numpy can print arrays in a truncated form, the results for large coords are pretty unreadable (especially those with bounds)
-- and it always realises data.

This is really about Aux-coords, as only they have the potential to be multi-dimensional, and lazy.
Which, practically, means that only they will typically be "really large".
Nevertheless, it may be better to modify DimCoords also, for consistency.

Obviously, this is likely to be especially nasty for unstructured data.

We want to tackle this now, because it affects the printout of meshes -- which is currently pretty unreadable
However, it does mean "breaking change" -- if you care about the text output from printing coords.

STOP PRESS:
now also intending to produce a 'single-line format', inspired by the Cube.repr format.
This can help a lot with making Mesh printout more sensible.

@pp-mo pp-mo self-assigned this Jan 10, 2022
@pp-mo pp-mo changed the title coord printout to be shorter + avoid realising Coord to print shorter, and avoid realising Jan 10, 2022
@pp-mo pp-mo changed the title Coord to print shorter, and avoid realising Coords to print shorter, and avoid realising Jan 10, 2022
@pp-mo
Copy link
Member Author

pp-mo commented Jan 10, 2022

Note: I think that this risks losing the 'special' support for date formatting in printing coord outputs, which would be a practical problem.
For this purpose, perhaps an abbreviated form can be used to retain that, and/or depend on size.

@lbdreyer lbdreyer moved this to To Do in Iris v3.2.0 Jan 11, 2022
@pp-mo pp-mo moved this from To Do to In Progress in Iris v3.2.0 Jan 12, 2022
@pp-mo pp-mo mentioned this issue Jan 13, 2022
@pp-mo
Copy link
Member Author

pp-mo commented Jan 17, 2022

In case anyone doesn't get a ping from the Discussion, I just raised there an awkward question of column formatting ...
#4501 (comment)

Right now, having a discussion, a PR and an Issue all live on this one topic is looking positively awkard !

@pp-mo pp-mo moved this from In Progress to For Review in Iris v3.2.0 Jan 19, 2022
@lbdreyer lbdreyer moved this from For Review to In Review in Iris v3.2.0 Jan 20, 2022
Repository owner moved this from In Review to Done in Iris v3.2.0 Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant