Open ThibHlln opened 3 years ago
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?
At the moment in the
Exchanger
, the regridding is happening inget_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 inset_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.