EGRET icon indicating copy to clipboard operation
EGRET copied to clipboard

problem with the year column in printSeries() function

Open rmhirsch49 opened this issue 1 year ago • 0 comments

Laura: This is a minor glitch. No urgency. Here's what is wrong. I have a Daily data frame that runs for many years and ends in July, 2022. When I do eList <- setPA(eList = eList, paStart = 11, paLong = 2) and then I want to print out the values for each year using printSeries() I get a list in which the years run all the way to 2022. That suggests that the last entry is for the data from the season November and December of 2022, which hasn't even happened yet. The values listed as 2022 are really for 2021 and all of the numbers are simply shifted by one year. The last entry is really for 2021. I looked at the code and can see what happened. The code takes the mean value of DecYear and then adds 0.5 to it and calls that the year. That works fine for paStart = 10, paLong = 12 and for many other combinations, but not all.

I think the fix might be to have the code compute the maximum value of DecYear in the data for that year and season and then assign the value to be printed to be truncated value of the maximum DecYear.

Let me know if that isn't clear.

Thanks. Bob

rmhirsch49 avatar Jul 08 '22 13:07 rmhirsch49