pyramid_coarsen (or a more generalized function) should allow a custom coarsen func
Closed this issue · 3 comments
I think the following:
for key, factor in enumerate(factors):
# merge dictionary via union operator
kwargs |= {d: factor for d in dims}
plevels[str(key)] = ds.coarsen(**kwargs).mean()
Can be generalized:
for key, factor in enumerate(factors):
plevels[str(key)] = custom_func(ds, factor)
Potential use case, if I want to use xesmf regrid or like downsample1d operation
I'm happy to contribute a PR if this is desired.
Hi @ahuang11 I wanted to let you know that we'll be having a breakout group on pyramids at the Zarr sprint on Thursday. More details are shared in #101.
I'll try to find time to look in more detail at the two issues you posted this week. On this topic, we already support xesmf regridders through the pyramid_regrid
function. Is the downsample1d
operation referenced in the discussion you linked part of holoviews? This approach would be useful if it could help add support pyresampler's downsampling operations (xref #10).
Thanks for letting me know! I'm at a separate conference right now, but I'll try to attend if I have some spare time!