monocongo/climate_indices

divide by zero encountered

Closed this issue · 10 comments

Hi Mr.James, when I run the the process climate indices it shows me an error in compute.py { in alpha = 4.0 / (skew * skew) } it seems at RuntimeWarning: divide by zero encountered in divide.
Screenshot from 2024-01-03 10-24-52
Have a good day !

Thanks, @ben29med

Please post a link to your input data files so I can attempt to reproduce the results.

Hey James @monocongo ;
Here you have found the link for my dataset worked on !
https://drive.google.com/file/d/1ADRQXYt9hwWmr1xY0uoyKUBG01Q31fOO/view?usp=drive_link
Have a Good Day !

Hey James @monocongo ; Here you have found the link for my dataset worked on ! https://drive.google.com/file/d/1ADRQXYt9hwWmr1xY0uoyKUBG01Q31fOO/view?usp=drive_link Have a Good Day !

@monocongo

Dear @monocongo ;
Any answers from this issue ?

@monocongo the issue solved ! but there is runtime Warnings in SPI-Pearson.
Gamma working fine 🤝
Screenshot from 2024-02-12 14-23-34

Sorry @ben29med I've been swamped at my day job no time yet to fix this issue. Can you please share what was your problem and how you resolved it? The Pearson III warnings are interesting, we might add some debug logging to help reveal the data issues if that's what's at play (maybe missing values using NaN, etc.)

There is no problem @monocongo. concerning the previous problem, I worked with NCO package to merge annually data in one file, this part it's Okey. I displayed an error when launching a SPI command in terminal. This error due to the merge of data sets in one file.
Then, I tried with a download of a single file which includes all the years, it just displayed Warnings at the Pearson type level otherwise it calculated gamma with no error.
Perhaps I make some errors in merging data level.
I do not understand NaN missing values, what is relation with SPI. We have change NaN in the file ?
Here the type of data :
https://data.chc.ucsb.edu/products/CHIRPS-2.0/global_monthly/netcdf/
Finally, I had some problem in SPI pearson in alpha parameter (compute.py).

This issue appears to be resolved and/or dormant. Please open a new issue with details if anything else of this nature comes up. Thanks for your help!