Closed arthur-e closed 3 years ago
It seems that the input data frame has to be arranged in chronological order. I was really frustrated with all the seemingly arbitrary requirements (e.g., days must start on 30 minutes after the hour for half-hourly data), so I hacked this together a little too quickly. It seems the easiest fix is to use lubridate
to add 30 minutes to each time stamp.
...
arrange(DateTime) %>%
fConvertTimeToPosix(
TFormat = 'YMDHM', Year = 'year', Month = 'month', Day = 'day', Hour = 'hour', Min = 'minute') %>%
mutate(DateTime = DateTime + lubridate::dminutes(30))
I'm trying to process Ameriflux half-hourly flux data, for example for site US-CS1 and the file:
Which can be downloaded from Ameriflux. These data are indeed half-hourly and, though it's inconvenient, I used
expand.grid()
and aleft_join()
to guarantee that the data are on half-hourly steps (i.e., data are joined to a half-hourly time series by their date and hour of day).We can confirm the first few rows (at least) are half-hourly:
However, when I try to create a instance of
sEddyProc
...I get the error message: