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 running Code 2 #119

Open
jonathanlilly opened this issue Nov 12, 2024 · 2 comments
Open

error in running Code 2 #119

jonathanlilly opened this issue Nov 12, 2024 · 2 comments

Comments

@jonathanlilly
Copy link

I get an error in running Code 2.

F = FlowFields(u = u , v = v , period = T )
ERROR: UndefVarError: u not defined in Main
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ REPL[15]:1

@gaelforget
Copy link
Member

Good point!

Unfortunately, I am going to have to get back to this one when back from this week's conference though, since I left the u,v file and script back home on a different computer

@gaelforget
Copy link
Member

Has been resolved by the latest versions of Drifters (v0.6.2) and OceanRobots (v0.2.8).

  • The code below is now executed as part of the documentation of Drifters.jl which has successfully build on GitHub.
  • The Drifters.Gulf_of_Mexico_setup function downloads a file with flow fields described in the paper.
  • The docs of Drifters.jl also contain the plotting code.
using JLD2, CairoMakie, Drifters, OceanRobots;
P=Drifters.Gulf_of_Mexico_setup(); 
F=FlowFields(u=P.u,v=P.v,period=P.T); 
I=Individuals(F,P.x0,P.y0);
[solve!(I,P.T .+P.dT*(n-1)) for n in 1:P.nt]

The same code should work on any local computer with a connection (since it works on GitHub).

Can you please confirm this works for you and/or close the issue @jonathanlilly ?

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