Skip to content

Conversation

@ehogan
Copy link
Contributor

@ehogan ehogan commented Dec 17, 2019

This pull requests adds some tests for AreaWeightedRegridder.

The test_multiple_src_on_same_grid test creates two source cubes on the same grid with different values. One of the sources cubes is used to instantiate AreaWeightedRegridder, then both source cubes are regridded. This test will ensure the regridding still works as expected once the refactoring (including caching the weights) is complete.

@stephenworsley
Copy link
Contributor

These tollerances seem quite large. Does the current behaviour of AreaWeightedRegridder require similar tolerances for this data?

@ehogan
Copy link
Contributor Author

ehogan commented Dec 17, 2019

The tests for regrid_area_weighted_rectilinear_src_and_grid removed the coord system and units so it is no longer spherical. When I did that in this branch the arrays were equal (see latest commit) :)

Copy link
Contributor

@stephenworsley stephenworsley left a comment

Choose a reason for hiding this comment

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

Looks good.

@stephenworsley stephenworsley merged commit 325b614 into SciTools:area_weighted_regridding Dec 17, 2019
@ehogan ehogan deleted the area_weighted_regridder_test branch December 17, 2019 15:51
@abooton abooton changed the title Test for AreaWeightedRegridder PI-2472: Test for AreaWeightedRegridder Dec 24, 2019
abooton added a commit to abooton/iris that referenced this pull request Jan 9, 2020
* pr/3623:
  PI-2472:  Update area weighted regridder to accept different dim data (SciTools#3625)
  PI-2472: Fix issue related to comparison / equality in regridding code (SciTools#3624)
  Remove unused variables in regridding code (SciTools#3620)
  Add docstring and what's new (SciTools#3619)
  Move calculation of area weights from perform to prepare (SciTools#3617)
  PI-2472: Refactor AreaWeightedRegridder (SciTools#3606)
  Test for AreaWeightedRegridder (SciTools#3604)
  Split regrid_area_weighted_rectilinear_src_and_grid into prepare and perform (SciTools#3601)
abooton pushed a commit to abooton/iris that referenced this pull request Jan 9, 2020
* Add tests for AreaWeightedRegridder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants