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

periodicity 'dekadal'? #554

Open
rabons opened this issue Aug 8, 2024 · 4 comments
Open

periodicity 'dekadal'? #554

rabons opened this issue Aug 8, 2024 · 4 comments

Comments

@rabons
Copy link

rabons commented Aug 8, 2024

Is your feature request related to a problem? Please describe.
I would like to calculate SPI values on dekadal periodicity, i.e. every ten days of a month (days 1-10 are dekad 1, days 11-20 dekad 2, days >= 21 are dekad 3 of each month). This is often used in agricultural drought assessments.

Describe the solution you'd like
Ideally, I would like to be able to run the spi command with --periodicity dekad, where the input netCDF file for precipitation is equally in dekadal time steps

Describe alternatives you've considered
I may have to consider using a different package altogether.

@monocongo
Copy link
Owner

Yes, this should be possible. We initially started with only monthly data but later added daily. So this would continue that work to add a new periodicity.

@rabons
Copy link
Author

rabons commented Aug 9, 2024

Thank you! Could you briefly point me to the files which would require modifying? I could attempt at doing it myself as a starter.

@monocongo
Copy link
Owner

Can anyone comment as to strategies we might use for testing our implementation of this new period type?

@monocongo
Copy link
Owner

Thanks @rabons

We need to add a new enumeration to the class compute.Periodicity, then make sure we can support 36 periods per year for each index type. Initially we can look for places where the check for monthly/daily is happening then add another case for dekadal datasets where it makes a difference.

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

No branches or pull requests

2 participants