ilyamaclean / microclimc

Below or above canopy microclimate modelling with R
12 stars 7 forks source link

small fixes to date-time handling in NMR integration #3

Closed dklinges9 closed 4 years ago

dklinges9 commented 4 years ago

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.

dklinges9 commented 4 years ago

Made another change, so closing this pull request and opening another.