You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Might be nice to get set! to dispatch on 1D arrays and treat them as vertical profiles as it's pretty common to want to set a 3D field based on a vertical profile.
I feel we shouldn’t assume that “1D” means “1D along third dimension”. Perhaps some kind of broadcasting-like logic is better? Does the function syntax not apply in this scenario? A function may often be the best solution even with discrete data because you can use an interpolation object to write a script that is resolution-agnostic.
Hmmm, that is a good point about assuming 1D => vertical profile.
I think yeah the function syntax might be useful here although you'd have to do some nearest-neighbor interpolation on the vertical profile array to get a function like f(x, y, z) to work with set!.
But using Interpolations.jl I can generate an interpolated Ti(z) which I can pass to set! using T0(x, y, z) = Ti(z) so maybe this is the cleanest and best approach. It's also resolution-independent as well which is nice.
Might be nice to get
set!
to dispatch on 1D arrays and treat them as vertical profiles as it's pretty common to want to set a 3D field based on a vertical profile.Will probably implement this as part of https://github.com/ali-ramadhan/antarctic-ice-shelf-meltwater-outflow
The text was updated successfully, but these errors were encountered: