Skip to content

Conversation

@mattjbr123
Copy link
Contributor

@mattjbr123 mattjbr123 commented Apr 24, 2024

Fixes #766

Added return_esmpy_regrid_operator kwargs to field/regrids and field/regridc, so that users wanting to make use of the functionality offered by it can do so via regrids and regridc, without having to call the regrid worker function directly.

This is possibly my 2nd ever PR, so if I've done something stupid, please forgive me... xD
For example, see #767

Copy link
Collaborator

@davidhassell davidhassell left a comment

Choose a reason for hiding this comment

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

Hi Matt - looks good - thanks for the quick turn around!

I've made a few style suggestions.

Also we need {{return_esmpy_regrid_operator: bool, optional}} to be fleshed out in cf/docstring/docstring.py, after this line would be a good spot - hopefully the formatting is clear enough ...

And we need a new test method in cf/test/test_regrid.py - just one that sets return_esmpy_regrid_operator=True in both regrids and regridc, and checks the type (self.assertIsInstance) of the returned object should suffice.

There's still time :)

mattjbr123 and others added 4 commits April 25, 2024 10:55
Co-authored-by: David Hassell <davidhassell@users.noreply.github.com>
Co-authored-by: David Hassell <davidhassell@users.noreply.github.com>
@mattjbr123
Copy link
Contributor Author

How's this?
f9bb52f

Copy link
Collaborator

@davidhassell davidhassell left a comment

Choose a reason for hiding this comment

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

Nicely done, Matt - thanks. I took it upon myself to do a bit of tidying, and shall merge it. You made it in to 3.16.2!

@davidhassell davidhassell merged commit 393b351 into NCAS-CMS:main Apr 25, 2024
@davidhassell davidhassell added this to the 3.16.2 milestone Apr 25, 2024
@davidhassell davidhassell added enhancement New feature or request regridding Relating to regridding operations labels Apr 25, 2024
@davidhassell davidhassell changed the title Added return_esmpy_regrid_operator to regrids and regridc per #766 Added return_esmpy_regrid_operator to regrids and regridc Apr 25, 2024
@mattjbr123 mattjbr123 deleted the return_esmpy_regrid_operator branch April 26, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request regridding Relating to regridding operations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Addition of return_esmpy_regrid_operator to regrids and regridc?

2 participants