Closed pytoPN closed 4 years ago
We currently use what we call "distributed date" which means that 365 days are re-apportioned over 1000 "days". For example, the day yyyyddd of 2015365 (the last day in 2015) is, in our code, represented as 2015999. 2015182 is represented as 2015500.
The reason for this: Makes for continuous plotting across years on the x-axis since we treat yyyyddd as simple integers. Plotting from 2015365 to 2016000 creates a visual gap.
Solution: There must be a better way to store dates, at least for plotting purposes that gets rid of the gap without introducing this confusing "distributed date". Currently, the user must understand and use dist_date in various parts of code. That should change back to 1-365.
Update: I think we should keep using distributed date in the code since it's rather fundamental to operations such as subtraction (valueChange) for now. However, user should not have to enter or see these gory details. Currently run_thresh is 0-365, so that's good. Probably some plots need to be updated wrt their legends.
Places where the user should enter the date yyyyddd = 2014365 (for example) and then the code should translate that in to the distributed date of 2014999: 1) Step 1: "date_limits" parameter 2) Step 4: Value Change Custom 3) Step 4: Date Value
I believe there is a "distributed date" function(?) that can already do this translation. Let me know if you need further clarification.
Test and then close or reassign.
Fix year range. Have years be input by user only as 1-366 instead of 1-999.(This workflow shows up in various places so requires multiple fixes)