-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add regridding benchmark #98
Conversation
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #98 +/- ##
=======================================
Coverage 98.82% 98.82%
=======================================
Files 14 14
Lines 678 678
=======================================
Hits 670 670
Misses 8 8 Continue to review full report at Codecov.
|
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.
I think this looks good to me, although I'm inexperienced in the use of the package so I might have missed something.
) | ||
tgt = _grid_cube(n_lons_tgt, n_lats_tgt, lon_bounds, lat_bounds) | ||
src_data = np.arange(n_lats_src * n_lons_src * h).reshape( | ||
[n_lats_src, n_lons_src, h] |
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.
I assume the switch in ordering from lon-lat to lat-lon is deliberate to make sure that some regridding work is required? Otherwise it's unnecessarily confusing.
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.
I think this might be a hang over from somewhere in CF refering to dimensions in the reverse order to how they are described in numpy. I can't remember why it is this way, but i believe this is inherited from how it is done in other tests. I might have another look into if this still makes sense.
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.
Looks good @stephenworsley, do you have any examples of the output it produces?
Also, should we be timing the creation of the regridder object as well as using it to regrid?
@jamesp the output is a bit hidden but you can find an example here https://cirrus-ci.com/task/4756773006475264 by clicking through the CI. |
Adds benchmarks for the performing of regridding (after initialisation of a regridder). This is with a view to measuring the performance of different regridding solutions (i.e. sparse vs scipy.sparse). The benchmark is written to include cases involving higher to lower resolution, lower to higher, similar resolutions and a case where parts of the grid are high to low res and other parts are low to high res due to a rotated pole.