-
Notifications
You must be signed in to change notification settings - Fork 35
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
reimplementation of pole_kind option #415
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions.
An example in one of the notebooks could be interesting ?
file_to_rem.unlink() | ||
file_to_rem = pathlib.Path('xesmf_testing_OM4.tar.gz') | ||
file_to_rem.unlink() | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return None |
@@ -1007,3 +1007,66 @@ def test_densify_polys(): | |||
poly = Polygon([(-80, -40), (80, -40), (80, 40), (-80, 40)]) # Large poly | |||
with pytest.warns(UserWarning): | |||
xe.SpatialAverager(ds_in, [poly]) | |||
|
|||
|
|||
def test_regrid_polekind(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_regrid_polekind(): | |
def test_regrid_polekind(tmp_path): |
I suggest writing the test files in a temporary path (see https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html).
As a bonus, you don't even need to clean them up at the end.
if 'pole_kind' in ds: | ||
pole_kind = np.asarray(ds['pole_kind']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The possibility of passing pole_kind
in the dataset should maybe be added somewhere in the documentation ? The docstring of Regridder
maybe ?
this PR replaces #236 and #223
testing uses sample data from figshare.