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

chore: reading 'positive' attribute back to the depth dimension #103

Merged
merged 5 commits into from
Jul 31, 2024

Conversation

uriii3
Copy link
Collaborator

@uriii3 uriii3 commented Jul 30, 2024

After a discussion with Tony in CMT-35 we discussed that it was better to keep the attribute positive for the depth dimension, set correctly to down if the dimension was depth (by default) or to up if the dimension was elevation.

I considered that it was best to keep these changes separately from other ones concerning the netcdf compliance of the output files of the toolbox. This way, we can more easily undo if there is some problem or found exactly which could be the case.

@uriii3 uriii3 requested a review from renaudjester July 30, 2024 14:07
@renaudjester renaudjester changed the title Readding 'positive' attribute back to the depth dimension Reading 'positive' attribute back to the depth dimension Jul 31, 2024
@uriii3 uriii3 force-pushed the copernicusmarine-toolbox-v2 branch 2 times, most recently from 55f580d to dccee67 Compare July 31, 2024 10:20
Comment on lines +380 to +384
elif coordinate_label in ["depth", "elevation"]:
attrs["valid_min"] = coord.values.min()
attrs["valid_max"] = coord.values.max()
coordinate_attributes.append("positive")
elif coordinate_label == "latitude":
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might seem weird but makes quite sense and it will all be deleted with the other PR... but I wanted to keep it separated just in case.

@uriii3 uriii3 merged commit 639b531 into copernicusmarine-toolbox-v2 Jul 31, 2024
2 checks passed
@uriii3 uriii3 deleted the netcdf-depth branch July 31, 2024 13:02
renaudjester pushed a commit that referenced this pull request Aug 20, 2024
Reordering the attributes of the dimensions, we considered that it was best to keep the attribute `positive`, to have it clear where the dimension depth points (down for depth, up for elevation).
renaudjester pushed a commit that referenced this pull request Aug 20, 2024
Reordering the attributes of the dimensions, we considered that it was best to keep the attribute `positive`, to have it clear where the dimension depth points (down for depth, up for elevation).
renaudjester pushed a commit that referenced this pull request Aug 29, 2024
Reordering the attributes of the dimensions, we considered that it was best to keep the attribute `positive`, to have it clear where the dimension depth points (down for depth, up for elevation).
@uriii3 uriii3 changed the title Reading 'positive' attribute back to the depth dimension chore: reading 'positive' attribute back to the depth dimension Sep 17, 2024
renaudjester pushed a commit that referenced this pull request Oct 28, 2024
Reordering the attributes of the dimensions, we considered that it was best to keep the attribute `positive`, to have it clear where the dimension depth points (down for depth, up for elevation).
renaudjester pushed a commit that referenced this pull request Oct 28, 2024
Reordering the attributes of the dimensions, we considered that it was best to keep the attribute `positive`, to have it clear where the dimension depth points (down for depth, up for elevation).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants