Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyramid_coarsen (or a more generalized function) should allow a custom coarsen func #94

Closed
ahuang11 opened this issue Jan 31, 2024 · 3 comments · Fixed by #120
Closed

Comments

@ahuang11
Copy link
Contributor

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.

@maxrjones
Copy link
Contributor

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).

@ahuang11
Copy link
Contributor Author

ahuang11 commented Feb 6, 2024

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!

@ahuang11
Copy link
Contributor Author

Created a PR here #120; I think it could support #10. Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants