Remove XGrid.from_dataset#2648
Conversation
for more information, see https://pre-commit.ci
f8f8809 to
ff1ac0b
Compare
f1e0127 to
e3a38d0
Compare
|
Hmmmmm, not sure why the conda package build process is failing This is happening on |
erikvansebille
left a comment
There was a problem hiding this comment.
Looks good; two minor questions below
| ds = ds[["U_A_grid", "V_A_grid", "grid"]].rename( | ||
| { | ||
| "U_A_grid": "U", | ||
| "V_A_grid": "V", | ||
| } | ||
| ) |
There was a problem hiding this comment.
Do we need to worry about the values in the arrays of these datasets? For example, if they are by default zero then some advection tests may pass irrespective of how good the advection scheme is. Or is it simply not intended that the values in these arrays are used?
There was a problem hiding this comment.
Discussed in person - these datasets have random data at the moment, where other datasets can be used for more flow specific tests.
|
|
||
|
|
||
| @pytest.fixture | ||
| def fieldset() -> FieldSet: |
There was a problem hiding this comment.
It's a bit 'magical' that the fieldset() is defined here, but can be used in all the test files without an explicit import in these test files. New devs may get confused?
There was a problem hiding this comment.
Discussed in person - this is just pytest magic :)
Description
This code path isn't used by
from_sgrid_conventionsand was mainly used before we had SGRID support by piggy-backing off xgcm functionality.This PR removes this classmethod and updates the test suite. Some parts of the test suite haven't been updated and have instead been flagged (as they're likely to be removed in a future PR).
This PR is blocked by #2647 (once this PR is merged this will be ready for review)
Checklist
mainfor normal development,v3-supportfor v3 support)AI Disclosure
None used