Hi, thank you for your great tutoring. However, I regret to say there seems a miscalculation in this video. Each period of a specific year, like Jan - Mar, when calculating SPI-3 must be compared with the same periods of other years. For example, Jan - Mar in 1959 must be compared with the Jan - Mar period in other years like 1960 - 1989. However, the method in this tutorial compares every three months' precipitation regardless of specific months. It means the typical wet period of the year always shows positive SPI even though it doesn't rain as usual. In the graph of SPI-3 and SPI-6 in Video, every year has positive data. It means it doesn't show historical drought in specific years. On the other hand, the reason SPI-12 and SPI-24 values show different anomalies for each year is their data range is a year and two years, including every 12 months of a year. So, they can show historical drought status regardless of the difference in calculation method whether separating calculation for basic month or not. I am sorry to raise this issue and bother you, but I hope you understand what I mean and revise this video.
We built the function to return 10 different outputs that we can use later. The 10th variable is the SPI output. Python indexing starts from 0. So, in order to retrieve the SPI variable from the function, we select the 10th item of the function output, which is the x[9].
Hello Sir, I have a problem writing a code that will characterize drought from a netcdf SPI file. I don't know of you have done any work in that direction please
Hello Eugene, We have covered that in the attached tutorial (URL shown below) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-StfUmmP-44A.html Hope it proves helpful. Cheers!
Without massively changing the code, you should make the needed SPI value the first in your times=[ ] array. Afterward, set nrows to 1 in the plt.subplots( ) part. Hope this is helpful?
Hello Sir, I have calculated SPI through netcdf and now I want to Calculated Drought Intensity, Drought Frequency and Drought Duration. Kindly help me to find these values using python. Also, I want spatial plot of these stats. Thank you.
I guess what your function does not account for is seasonality, right? You basically compare, say, MA of Jan, Feb and Mar to the mean of all MAs, covering also the other months. What you ideally like to have is a comparison with the MA of a particular year with the long-term mean of the MAs of the exact same period. I.e. compare the MA of the first three month of 2014 with the long term mean of the MAs of the same first three month for all years prior to 2014. Am I correct or am I missing somethng?
Not quite sure if I got the question fully, but for select seasons, you can extract those seasons from the data set before applying the function. The shortfall in that is, you need a continuous (cyclical), annual data spanning a period to rightly deduce the SPIs, especially for the longer-range SPIs.