-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add temporal bounds and center times for group_average()
API
#717
base: main
Are you sure you want to change the base?
Conversation
12afd27
to
3bf227c
Compare
@pochedls and @oliviermarti this PR should address this GH issue (same as this comment from @oliviermarti). If you can check this branch out and try it that'd be great. import numpy as np
import pandas as pd
import xcdat as xc
# Create a dummy xarray dataset
time = pd.date_range("2000-01-01", "2001-12-31", freq="D")
data = np.random.rand(len(time))
dummy_ds = xr.Dataset({"dummy_var": (["time"], data)}, coords={"time": time})
dummy_ds["time"].encoding["calendar"] = "standard"
dummy_ds = dummy_ds.bounds.add_missing_bounds(axes=["T"])
ds_avg = dummy_ds.temporal.group_average("dummy_var", freq="month") Before -- no
|
@tomvothecoder – this is great – thanks for pushing this forward so quickly. I think I think we'll need to collect the bounds for each group, (e.g., |
This makes sense to me. I'll think of an algorithm. |
Description
Checklist
If applicable: