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

[Feature]: Enable departures calculations for annual data #564

Open
pochedls opened this issue Nov 13, 2023 · 0 comments
Open

[Feature]: Enable departures calculations for annual data #564

pochedls opened this issue Nov 13, 2023 · 0 comments
Labels
type: enhancement New enhancement request

Comments

@pochedls
Copy link
Collaborator

pochedls commented Nov 13, 2023

Is your feature request related to a problem?

The departures calculation does not work for annual data.

# import xcdat
import xcdat as xc
# open dataset
dpath = '/p/user_pub/work/CMIP6/CMIP/E3SM-Project/E3SM-2-0/historical/r1i1p1f1/Amon/ts/gr/v20220830/'
ds = xc.open_mfdataset(dpath)
# get annual averages
ds = ds.temporal.group_average('ts', freq='year')
# calculate annual departures
ds = ds.temporal.departures('ts', freq='year')

ValueError: Incorrect freq argument. Supported frequencies for departures include: ['season', 'month', 'day'].

Describe the solution you'd like

.departures() works for monthly data (freq="month") – it would be useful if this also worked for annual data.

Describe alternatives you've considered

No response

Additional context

I think this would be equivalent to (CDAT using .YEAR): cdutil.YEAR.departures().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New enhancement request
Projects
Status: Todo
Development

No branches or pull requests

2 participants