Replies: 1 comment 4 replies
-
|
Hi @hyc006, thanks for reaching out! I'm not sure what is the issue here. I don't see anything wrong with the two code snippets you posted above. Could you also provide the rest of the code? And are you sure that your fieldset.TEMP has values? Can you do a Field interpolation outside of the Kernel and/or pset.execute()? For example, what is the output of |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Question
Hi everyone,
I’m trying to sample the temperature field along particle trajectories using OceanParcels, following the tutorial example here:
🔗 https://docs.oceanparcels.org/en/latest/examples/tutorial_sampling.html
I added a new variable called "TEMP" to my fieldset and wrote a kernel like this:
Then I exported the results to a CSV file. The output file correctly contains a column named "temperature", but all of the values are 0, suggesting that no temperature data was actually sampled.
I’m wondering what might be going wrong here. Could it be:
that the "TEMP" field is not being read or interpolated correctly in the kernel?
Here’s how I defined my fieldset (simplified):
I’d really appreciate any suggestions or common pitfalls I might be missing — for instance, whether TEMP needs a specific interpolation method, or if sampling order (time vs depth vs lat/lon) matters.
Thank you very much for your time and help!
Beta Was this translation helpful? Give feedback.
All reactions