Summed Field with different longitudes #1138
JonathanC33
started this conversation in
General
Replies: 1 comment
-
|
Thanks for reporting, @JonathanC33. There unfortunately isn't an easy out-of-the-box solution, I'm afraid. An options you could try is to write a new, custom AdvectionRK4 kernel that uses plon = partilce.lon
if particle.lon > 180:
plon = particle.lon - 360I've done something similar here when I needed to sample EEZ: https://github.com/OceanParcels/SKIM_dFADtracking/blob/master/fadset_run.py#L19-L23 |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi, I am trying to create a summed field (ocean velocity field summed with 0.02*windage) using ocean parcels and am having issues with how longitude is defined differently in each.
The longitude in the ocean velocity field goes from -180 to 180 and 0-360 for the wind velocity field. Ideally, I'd like to be able to use the fieldset.from_netcdf function to load both in so that I can use the filename_*.npy feature to load in multiple files. Currrently, I have to load in windage velocity fields one at a time using the fieldset.from_data, and then subtract 360 from each in order to get the longitudes to line up.
Is there an easy way to convert the windage fieldset without having to use fieldset.from_data and change it manually for each netcdf file?
Beta Was this translation helpful? Give feedback.
All reactions