0

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

Gowachin
  • 1,251
  • 2
  • 9
  • 17
  • What coding have you tried so far? Please paste your data into the question as an object: use `dput(your_dataset)`. When you have a moment have a look at [MRE] this will help others help you to verify and test solutions to your question. – Peter Mar 31 '21 at 15:21
  • Hi...Thank you for your reply. As I mentioned I can find the Annual Average Temperature for each station separately using the "hydroTSM" package in R but I could not understand how can I get it for the hydrological year, not for the calendar year. – Mohammad Hasan Mar 31 '21 at 17:29

0 Answers0