Skip to content

Add support in convert.nemo_to_sgrid for depthw coordinate#2626

Open
VeckoTheGecko wants to merge 4 commits intoParcels-code:mainfrom
VeckoTheGecko:push-rttuqnslyyqu
Open

Add support in convert.nemo_to_sgrid for depthw coordinate#2626
VeckoTheGecko wants to merge 4 commits intoParcels-code:mainfrom
VeckoTheGecko:push-rttuqnslyyqu

Conversation

@VeckoTheGecko
Copy link
Copy Markdown
Contributor

Description

Related to getting the benchmark suite running (including the prior PR - #2605 ) this PR does the following:

  • Adds a test test_convert.py::test_nemo_to_sgrid_with_depth
  • Adds a metadata-only version of the original source dataset in the benchmark repo (for use in test_nemo_to_sgrid_with_depth)
  • Updates the convert module to allow for the depthw dimension to be optionally provided
  • Adds type hinting to the convert module allowing for easier refactoring/overview

Still need to double check that this fixes all the problems in the benchmark repo - will do that on Wednesday. If you could review the code in the meantime that would be great @erikvansebille :)

Checklist

  • Closes None
  • Tests added
  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

AI Disclosure

None used

Comment thread src/parcels/convert.py
_NEMO_EXPECTED_COORDS = [
"glamf",
"gphif",
] # "depthw" # TODO: Depthw needs to be available if the data has a depth dim. Refactor the whole convert module, this can surely all be handled better.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note

Refactor the whole convert module, this can surely all be handled better.

Is still on my TODO list (though quite low down). I have ideas on how we can make the conversion very robust but I want that to come later.

@VeckoTheGecko
Copy link
Copy Markdown
Contributor Author

Still need to double check that this fixes all the problems in the benchmark repo - will do that on Wednesday

I just did, and I think its working - though didn't have the time to wait for the run to complete. I think that's the last of the bughunting - working on perf on Wed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant