Skip to content

Conversation

@erikvansebille
Copy link
Member

@erikvansebille erikvansebille commented Jan 15, 2026

This PR replicates #2460 by creating a convert.copernicusmarine_to_sgrid() function

Since the coordinates of copernicusmarine datasets are much more predictable (always time, depth, latitude and longitude form the copernicusmarine toolbox), I made coords an optional argument. This simplifies using the function

I also extended the _is_coordinate_in_degrees() function to just check whether the word degree is part of the units. This will also capture the copernicusmarine case, where units are degrees_east

This PR is part of #2003

As it is not needed, now that we require users to provide field names explicitly
Since units has been removed as part of #2459
By looking at whether a version of "degrees" is present in units. Before this, "degrees_east" was for example not recognised
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko left a comment

Choose a reason for hiding this comment

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

I made coords an optional argument. This simplifies using the function

yes - I think in future we'll need to have a think about what the API for all these convert functions look like. We'll see as we do more :)

I also extended the _is_coordinate_in_degrees() function to just check whether the word degree is part of the units. This will also capture the copernicusmarine case, where units are degrees_east

Looks good.


Minor feedback - happy to merge once that's addressed and we have green ticks

@erikvansebille erikvansebille merged commit f111dfa into v4-dev Jan 15, 2026
11 checks passed
@erikvansebille erikvansebille deleted the convert_from_copernicusmarine branch January 15, 2026 13:01
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parcels development Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants