I have a daily time series data sets in the following format:

df <- data.frame(Date = c("01/01/1950", "01/02/1950", "12/31/1975"),
                 MeanTempStn1 = c(13, 4.6, 9.8), 
                 MeanTempStn2= c(9.5, 3.8, 8.2), 
                 MeanTempStn3= c(10.8, 6.7, 5.5)) 
Date MeanTempStn1 MeanTempStn2 MeanTempStn3
01/01/1950 13.0 9.5 10.8
01/02/1950 4.6 3.8 6.7
....
12/31/1975 9.8 8.2 5.5

I know how to get the Annual Mean for each station separately using hydroSTM with one code. But I need to calculate the Annual Average Temperature for each station separately for each hydrological year which starts on 01 September of each year and ends on 31 August next year. For example, the hydrological year 1976 starts 01 September 1975 and ends on 31 August 1976. How can I do it in R?

Any help would be deeply appreciated.

Thank you.

Best regards, Mohammad Hasan

0

There are 0 best solutions below