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

Cube printout should not compute lazy scalar coordinates #5743

Closed
pp-mo opened this issue Feb 14, 2024 · 3 comments
Closed

Cube printout should not compute lazy scalar coordinates #5743

pp-mo opened this issue Feb 14, 2024 · 3 comments

Comments

@pp-mo
Copy link
Member

pp-mo commented Feb 14, 2024

To address #5723

We've accepted in the discussion there that we really don't want complex lazy calculations performed each time you print a cube.
Nor would we like it to "realise" a scalar coordinate, so it only happens once, since you really wouldn't expect printing to modify a cube.

It seems reasonable instead to just print something like "complex_scalarvalue_coord: <lazy>" in this case.
The user could of course realize it, if + when the value is actually wanted.

Note: IMHO this is not a major change, and can just be done
-- we have changed printout format before without considering it a breaking change.
Also relevant here : most scalar coords, ones loaded from files, are not lazy, since #5229
( so in many/most cases, adopting this won't change the output )

@pp-mo pp-mo changed the title Stop cube printout from computing lazy scalar coordinates Cube printout should not compute lazy scalar coordinates Feb 14, 2024
@bouweandela
Copy link
Member

Does this issue mean that there is consensus that this is the right approach? And if yes, is this is something @fnattino and I could help with implementing and/or reviewing?

@pp-mo
Copy link
Member Author

pp-mo commented Feb 20, 2024

Does this issue mean that there is consensus that this is the right approach? And if yes, is this is something @fnattino and I could help with implementing and/or reviewing?

Yes, and Yes, I think!
I wrote this after last week's Peloton meeting, so we did get to generally discuss the options + this was our choice.

N.B. I just edited the comment as I realised the "<lazy>" part didn't come out in markdown!

@ESadek-MO
Copy link
Contributor

@SciTools/peloton Closed in #5896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants