get_gap_pos(interval, for.gaps) in find_gap
Additionally the sample from the profiler marks additional resources spend in:
Which is a call of the get_gap_pos() func
(this still needs to be double checked with the Rprof output from JASMIN)
This is the second output of profiler that points to this line. My command-line-run of Rprof() for one month only also points to line #36
It appears the code spend quite some time in get_gap_pos() func line #64
xx.int<-data.frame(date=miss,lon=lon.miss,lat=lat.miss)
might be the creation of a dataframe here. So is not as severe as the subset()
Again I will add output from the Rprof Jasmin run in comments below if this line keeps popping up in a different sample of Months/data