Replies: 1 comment 1 reply
-
|
Dear @jwongala, first of all: please indeed separate different questions/issues into different posts; because that is the only way we can keep this resource manageable. You can of course refer to another post in your question/comments.
The difference between |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a question about parcel syntax (unsure if this is the right word) and using status codes. Please let me know if I should separate these two questions.
I am trying to get the temperature at a particle's location using this code:
temp1 = fieldset.T[particle]. What doesparticlemean in this context? Is it a unique ID for an individual particle, or does it get the temperature for all particles in the upset?Also, after doing calculations during each timestep, I would like to find the temperature and salinity at the particle's new lat and lon and assign it to the
pset. I am using this code, but it's not working, and I am unsure whyparticle.temp = fieldset.T [time + particle.dt, dep1, particle.lat, particle.lon]. I think this is related to not understanding whatparticlemeans, but I am unsure. Below is the end of the code where I assign the new lat, lon, temp, and salt at the particles new locationparticle.lon += (u1 + 2*u2 + 2*u3 + u4) / 6. * particle.dtparticle.lat += (v1 + 2*v2 + 2*v3 + v4) / 6. * particle.dtparticle.salt = fieldset.S[time + particle.dt, dep1, particle.lat, particle.lon]particle.temp = fieldset.T[time + particle.dt, dep1, particle.lat, particle.lon]Beta Was this translation helpful? Give feedback.
All reactions