Hello,
I was doing some tests using this function to calculate cc at a point close to Indonesia, and I noticed some unrealistic values for times of sunrise and sunset (tsu and tss). I corrected the wrong values by changing line 42 of the function, it should be "std.mer = seq(-180,180, 15)", and not -90 to 90. I think this solves the issue, but correct me if I am wrong. I can create a pull request from a fork, just let me know.
regards,
Daniel