A few changes I made, represented in the last two commits on this fork:
1) in commit 43d0ffe, I changed how doy was created in runNMR(). Previously, tme (which was then used to assign doy and then not used again in the function) counted the day index up from the first day to length(tmeher); this doesn't mesh with timeseries that have some days missing. In my commit, I removed the line assigning tme (because it's just a temp object not called again) and used a new method to assign doy that works irregardless of whether there's gaps in your time series.
2) in commit 0f011f5, I pulled obs_time from climdata to assign to tme, which is used later as an argument in jday(). Previously jday() was referring to tme, which didn't exist locally within the function.
A few changes I made, represented in the last two commits on this fork:
1) in commit 43d0ffe, I changed how
doy
was created inrunNMR()
. Previously,tme
(which was then used to assigndoy
and then not used again in the function) counted the day index up from the first day to length(tmeher); this doesn't mesh with timeseries that have some days missing. In my commit, I removed the line assigningtme
(because it's just a temp object not called again) and used a new method to assigndoy
that works irregardless of whether there's gaps in your time series.2) in commit 0f011f5, I pulled
obs_time
fromclimdata
to assign totme
, which is used later as an argument injday()
. Previouslyjday()
was referring totme
, which didn't exist locally within the function.