Reputation: 1198
I have a python x-array
dataset with dimensions x
,y
,t
and at least two variables at each coordinate. I was wondering if there exists any x-array
method that can help "project" or "composite" values on an axis of my choice.
The figure I drafted up below is an example of what I mean by compositing on a time axis. In the figure, only most recent finite values are considered in the final product. If no finite value is found in a specified interval, then the composite value is nan. This is similar to stacking raster layers in photoshop or gimp.
What I've learned in my recent x-array
explorations is that more than often the solution to x-array
problems involves avoiding manual dissection of x-array
data-structures(however tempting it may be).
I was wondering if python x-array
had a built in way of handling problems like compositing? Any tips on how I should go about approaching this problem? I'm primarily looking for either more knowledge about x-arrays or a solution to the compositing problem.
Upvotes: 1
Views: 553
Reputation: 9593
Unfortunately, we don't yet have this functionality built-in to xarray yet (contributions would be welcome!). See https://github.com/pydata/xarray/issues/835 for the issue tracker. Eventually, this will probably go under the name of combine_first
.
Upvotes: 1