Running OceanParcels with surface velocity data from Copernicus. #1530
Closed
claudioiturra
started this conversation in
General
Replies: 1 comment 7 replies
-
|
Hi @claudioiturra, thanks for using Parcels! Your error is a |
Beta Was this translation helpful? Give feedback.
7 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm new to Ocean-Parcels, sorry! I'm currently attempting to run a Lagrangian particle distribution using velocities from Copernicus (.nc file). Here is my code. The .nc file contains the variables uo, vo, longitude, latitude, and time (hours since 1950-01-01, 2137hours). As described in the code, I got the error in the runtime and field sampe out of bond, I will appreciate any suggestion, is actually de code right?.
FieldOutOfBoundError Traceback (most recent call last)
Cell In[7], line 7
1 output_file = pset.ParticleFile(
2 name="GCParticles.zarr", # the name of the output file
3 outputdt=3600, # the time period between consecutive out output steps
4 chunks=(1, 10), # the chunking of the output file (number of particles, timesteps)
5 )
----> 7 pset.execute(
8 kernels, # the kernel (which defines how particles move)
9 runtime=86400 * 24, # the total length of the run in seconds
10 dt=300, # the timestep of the kernel in seconds
11 output_file=output_file,
12 )
File /opt/anaconda3/envs/parcels/lib/python3.12/site-packages/parcels/particleset.py:951, in ParticleSet.execute(self, pyfunc, pyfunc_inter, endtime, runtime, dt, output_file, verbose_progress, postIterationCallbacks, callbackdt)
949 # If we don't perform interaction, only execute the normal kernel efficiently.
950 if self.interaction_kernel is None:
--> 951 res = self.kernel.execute(self, endtime=next_time, dt=dt)
952 if res == StatusCode.StopAllExecution:
953 return StatusCode.StopAllExecution
File /opt/anaconda3/envs/parcels/lib/python3.12/site-packages/parcels/kernel.py:585, in Kernel.execute(self, pset, endtime, dt)
583 raise TimeExtrapolationError(p.time)
584 elif p.state == StatusCode.ErrorOutOfBounds:
--> 585 raise FieldOutOfBoundError(p.lon, p.lat, p.depth)
586 elif p.state == StatusCode.ErrorThroughSurface:
587 raise FieldOutOfBoundSurfaceError(p.lon, p.lat, p.depth)
FieldOutOfBoundError: Field sampled out-of-bound, at (-73.2887954711914, -37.59098434448242, 0.0)
Variables:
uo
Size: 21x28x1x8748
Dimensions: longitude,latitude,depth,time
Datatype: single
Attributes:
Beta Was this translation helpful? Give feedback.
All reactions