CliMA / ClimaUtilities.jl

Shared utilities for the CliMA project
Apache License 2.0
8 stars 1 forks source link

Can we remove the space from `InterpolationsRegridder`? #113

Open charleskawczynski opened 2 days ago

charleskawczynski commented 2 days ago

I'm seeing huge stack traces in https://buildkite.com/clima/climaland-long-runs/builds/1330#01925384-a92c-4f92-885e-69fe03731fc1. I think it's because there are a lot (~23) of InterpolationsRegridder objects (and therefore spaces) in a DataLayouts kernel, and this results in a massive method signature

Sbozzolo commented 2 days ago

Yes, I think that should be possible. The only place where it is not easy is where we determine the extrapolation boundary conditions automatically (at the constructor): https://github.com/CliMA/ClimaUtilities.jl/blob/5171f8c5ece6c52ed785a417049edc55ece30ea5/ext/InterpolationsRegridderExt.jl#L32-L73

This would change a little bit the spirit of the regridder (the initial idea was to have a regridder attached to a specific variable and calling it multitple times would be cheap), but I don't see big problems with this.