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

Boundary treatment #7

Open
juan-park opened this issue Dec 18, 2020 · 1 comment
Open

Boundary treatment #7

juan-park opened this issue Dec 18, 2020 · 1 comment
Assignees

Comments

@juan-park
Copy link

Line 92 of tracker.py is
I = grid.atsea(X1, Y1)
shouldn't it be
I = grid.onland(X1, Y1)?

@bjornaa
Copy link
Owner

bjornaa commented Dec 21, 2020

This works as supposed.

The old particle position is (X, Y) while (X1, Y1) is the candidate for the new particle position.
Line 92 is the final check, if the (X1, Y1) is at sea it becomes the new position.
If the position is on land, it does not move i.e. (X, Y) is retained as the new position.

In lines 77+ the opposite logic is used. If the new position is outside the grid, X1 is replaced by
the old position X. This is inconsistent coding and may be confusing. This will be cleaned up in the
next revision of the code.

Another issue is if this is the best way to handle the land boundary. I plan to include different options. For some applications, like pollution transport, it may be better to let the particle move onto land and become stranded.

Bjørn

@bjornaa bjornaa self-assigned this Dec 21, 2020
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