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

Period-length ponderation in means #93

Closed
1 task
aulemahal opened this issue Sep 29, 2022 · 1 comment · Fixed by #265
Closed
1 task

Period-length ponderation in means #93

aulemahal opened this issue Sep 29, 2022 · 1 comment · Fixed by #265
Assignees
Labels
enhancement New feature or request

Comments

@aulemahal
Copy link
Collaborator

Addressing a Problem?

When computing a seasonal mean from monthly data (for example), xarray and xclim will not take the length of each month into account.

Potential Solution

Something somewhere to "resample" monthly data to a coarser timescale with month-length weights.

Additional context

I'm not sure where this should be.
I noted "climatological_mean" on my sheet, but isn't that function meant for interannual means? Here, the seasonal resampling is a step that comes before the interannual mean.

In #80, we noted that extract_dataset was not meant to perform resamples coarser then daily. However, it wouldn't be hard to add a provision in the resampling function to take the period-length into account with periods coarser that a week.

Contribution

  • I would be willing/able to open a Pull Request to contribute this feature.
@aulemahal aulemahal added the enhancement New feature or request label Sep 29, 2022
@juliettelavoie
Copy link
Contributor

En effet, climatological_mean veut garder la même fréquence et faire une moyenne sur les années. Dans un worflow SSC, le resampling est fait dans le calcul d'indicateurs (ce qui ne fonctionne pas pour les données mensuelles de base de SAC).

La question que je me pose est: est-ce vraiment encore de l'extraction ? Est-ce que c'est la même chose que la création d'une variable daily à partir de subdaily? (peut-être que oui, je ne suis pas certaine)
Si c'est plus une étape de processing, est-ce qu'on voudrait une fonction de resampling plus modulable dans aggregate.py?

Donc, ça ne va clairement pas dans climatological_mean, mais ce n'est pas super évident ça va où pour moi.

@RondeauG RondeauG added this to the 2023 Development Plan milestone Feb 9, 2023
@aulemahal aulemahal self-assigned this Sep 28, 2023
@aulemahal aulemahal mentioned this issue Oct 2, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants