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

Describe contains coordinate not on the variable #131

Conversation

renaudjester
Copy link
Collaborator

Fix: CMT-103

Uses the fact that if the coordinate is not in the chunkLen dict then it means that the variable doesn't have the coordinate

I think the real information is in cube:variables: but I don't want to move around a property

See https://stac.marine.copernicus.eu/metadata/GLOBAL_MULTIYEAR_PHY_ENS_001_031/cmems_mod_glo_phy-all_my_0.25deg_P1D-m_202311/dataset.stac.json for reference

@renaudjester renaudjester changed the base branch from main to copernicusmarine-toolbox-v2 September 12, 2024 14:38
@renaudjester renaudjester requested a review from uriii3 September 13, 2024 06:40
@uriii3
Copy link
Collaborator

uriii3 commented Sep 13, 2024

should we add any tests to it?

@@ -236,6 +236,7 @@ def from_metadata_item(
metadata_item.properties.get("admp_valid_start_date"),
)
for dimension, dimension_metadata in dimensions.items()
if variable_id in dimension_metadata.get("chunkLen", {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

but the cube:variables is being called right up from this line, no? in line 220. Should the information be there? If not, I'm also fine with using the chunkLen option although seems less intuitive when rereading the code.

@renaudjester renaudjester force-pushed the describe-contains-coordinate-not-on-the-variable branch from 322e66b to af05b9b Compare September 13, 2024 14:44
Copy link
Collaborator Author

@renaudjester renaudjester Sep 13, 2024

Choose a reason for hiding this comment

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

Maybe it's a big file but I feel like it's nice to have a snapshot of some dataset so we could see some changes @uriii3

Copy link
Collaborator

Choose a reason for hiding this comment

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

mm okay, looks good then!

@renaudjester renaudjester requested a review from uriii3 September 13, 2024 15:21
@renaudjester renaudjester force-pushed the describe-contains-coordinate-not-on-the-variable branch from 28cca30 to 1214b3e Compare September 17, 2024 08:43
@renaudjester renaudjester merged commit 66d8b46 into copernicusmarine-toolbox-v2 Sep 17, 2024
2 checks passed
@renaudjester renaudjester deleted the describe-contains-coordinate-not-on-the-variable branch September 17, 2024 08:59
renaudjester added a commit that referenced this pull request Oct 28, 2024
Fix a bug where we would have some coordinates for variables that don't have it in the describe
renaudjester added a commit that referenced this pull request Oct 28, 2024
Fix a bug where we would have some coordinates for variables that don't have it in the describe
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