Skip to content
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

Minimise number of regridding operations #47

Open
ThibHlln opened this issue Jul 6, 2021 · 1 comment
Open

Minimise number of regridding operations #47

ThibHlln opened this issue Jul 6, 2021 · 1 comment
Labels
performance Improvements to runtime

Comments

@ThibHlln
Copy link
Member

ThibHlln commented Jul 6, 2021

At the moment in the Exchanger, the regridding is happening in get_transfer regardless of the temporal resolutions of the source and destination components.

When timestep of source < timestep of destination, it makes sense to regrid in get_transfer, but when timestep of source > timestep of destination, it would be better to regrid in set_transfer to avoid repeatedly regridding the same source value.

Here, by regridding, I mean the multiplication of the interpolation weights to go from one spatial resolution to another (not the calculation of the interpolation weights themselves, which is done only once per run in the framework since #43). So this is not the most expensive task to carry out, but still there is room for performance improvement by limiting the number of regridding operations.

@ThibHlln ThibHlln added the performance Improvements to runtime label Jul 6, 2021
@ThibHlln
Copy link
Member Author

ThibHlln commented Jul 29, 2021

There is a memory tradeoff in implementing this.

At the moment, the transfers are stored at the source's spatial resolution, which means they only need to be stored once no matter how many destinations there are. If we are to do the remapping in set_transfer when timestep of source > timestep of destination, we will need to duplicate the information coming from source to be stored at the potentially different destinations' spatial resolutions.

So not sure whether it is worth it?

@ThibHlln ThibHlln added this to To do in v0.1.0 via automation Jul 29, 2021
@ThibHlln ThibHlln removed this from To do in v0.1.0 Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improvements to runtime
Projects
None yet
Development

No branches or pull requests

1 participant