A few changes I made, represented in the last four 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.
3) in commit a6d61b9, I changed how ndays was created so that if your timeseries is multiple years, ndays will be the number of days in your timeseries, rather than the number of days-of-year; this seemed to be the purpose of ndays and allowed multiyear timeseries to work in the model.
3) in commit 6605ec5, I removed a line that manipulates doy1; my previous commit causes this line to throw a warning, but doy1 is an object that isn't used downstream from that line, so removing this line didn't make a difference.
A few changes I made, represented in the last four 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.3) in commit a6d61b9, I changed how
ndays
was created so that if your timeseries is multiple years,ndays
will be the number of days in your timeseries, rather than the number of days-of-year; this seemed to be the purpose ofndays
and allowed multiyear timeseries to work in the model.3) in commit 6605ec5, I removed a line that manipulates
doy1
; my previous commit causes this line to throw a warning, butdoy1
is an object that isn't used downstream from that line, so removing this line didn't make a difference.