Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in surrogateAR when iterating through ids #3

Open
martinmargh opened this issue Nov 16, 2022 · 1 comment
Open

Error in surrogateAR when iterating through ids #3

martinmargh opened this issue Nov 16, 2022 · 1 comment

Comments

@martinmargh
Copy link

Hello! I am simulating tracks for each id on my set of sea turtle tracking data. The aim is to compute 50 simulation for each track.
The loop I built stops for some of my ids because of this warning:
"In surrogateAR(arfit, tp$xs, tp$ts, point.check = gshhsMask()) :
Failed to find acceptable point at step 1. If surrogateAR fails to return a track, this might indicate a location from which it is not possible to step to another, valid location."

Is there some alternative solution to iterate the function?

Thank you!

@raymondben
Copy link
Member

Hi @martinmargh - thanks for the note. It sounds like the problem is not with the loop, it seems more likely that those particular tracks are causing problems for other reasons. If you take one of the tracks that is failing, and just try and simulate tracks directly for it (not in a loop), does it still fail? (I am expecting that it does). The problem might be the initial location for those tracks. If the first location is too far away from the ocean (too far inland), for example, then it might be impossible for the simulator to find a valid second location, because every location that it tries still falls on land and is rejected. If that is the issue, one solution might be to trim off the first few locations of the real track (and have it start from closer to the water).
If you have no luck, please post one of the problem tracks (or least the first part of it, starting from its initial location up to some point that is clearly at sea) and we can check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants