Skip to content

Conversation

@abooton
Copy link
Contributor

@abooton abooton commented Dec 29, 2019

Alter the area-weighted regridder to accept multidimensional src cubes (i.e. data other than 2D lat-lon data.), identifying the x-y coordinates corresponding to src grid.
Update the regridder to only cache the vital regridding information (i.e. target grid info and the weights information.
Fix bug in the tests so that the prepare and perform functions are called sequentially.
Update "test_mismatched_data_dims" to accept multidimensional data, with dimensions in differing orders.

src = self.cube(np.linspace(20, 30, 3), np.linspace(10, 25, 4))
target = self.cube(np.linspace(6, 18, 8), np.linspace(11, 22, 9))
target = self.cube(np.linspace(22, 28, 8), np.linspace(11, 22, 9))
return src, target
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alter this so that we are passing data through the tests. It is ok to do this because all the tests already using it abort with an error and are independent of the data used.

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, this should be ok to merge now.

@stephenworsley stephenworsley merged commit d9d2479 into SciTools:area_weighted_regridding Jan 7, 2020
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 added a commit to abooton/iris that referenced this pull request Jan 9, 2020
…ciTools#3625)

* Update area weighted regridder to accept data with dims in different orders

* Add extra unittest to test_AreaWeightedRegridder
@abooton abooton deleted the awr branch April 20, 2020 22:25
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