Closed ana-machado closed 5 years ago
Hi Ana,
This error comes when you give a series of file for the depth dimension, since we don't support adaptive meshes in the from_nemo function. But it seems you are using one single depth file, so it shouldn't be the problem.
We were facing a similar issue in the past, that we fixed in the latest version of Parcels. Coud you check if this error still occurs with latest Parcels version?
Hi Philippe Thank you! That solved the problem. I have been able to run simple experiments with few particles, but now I tryed to add more particles and I got another error, can you please help me? Thank you, Ana
In [32]: pset = ParticleSet.from_line(fieldset=fieldset, pclass=JITParticle, ...: size=10000, ...: start=(-30, 46), ...: finish=(-30, 60), ...: depth=1) ...:
In [33]: pfile = ParticleFile("nemo_particles", pset, outputdt=delta(days=1)) ...: kernels = pset.Kernel(AdvectionRK4_3D) ...:
In [34]: pset.execute(kernels, runtime=delta(days=40), dt=delta(hours=6),output_file=pfile)
INFO: Compiled JITParticleAdvectionRK4_3D ==> /tmp/parcels-1000/5d703a2f588120f6901c6b823c1fe919.so 50% (1728000.0 of 3456000.0) |#################### | Elapsed Time: 0:02:54 ETA: 0:05:05--------------------------------------------------------------------------- OutOfBoundsError Traceback (most recent call last)
The error is written in your error message:
OutOfBoundsError: 0 Particle P[4381](lon=-29.129885, lat=51.161136, depth=0.000148, time=1728000.000000) Time: 0072-01-23 11:58:56, timestep dt: 21600.000000 Out-of-bounds sampling by particle at (-29.129885, 51.161136, 0.000148)
Your particle is out-of-bound. You see in the log message where did it happen. Why is it the case? Check the boundaries of your domain (lon, lat and depth)
Then you can use recovery kernels as it is showed in the tutorials https://github.com/OceanParcels/parcels/blob/master/parcels/examples/tutorial_Agulhasparticles.ipynb
With a recovery kernel, you can either delete a particle (as it is shown in the tutorial), or edit particle coordinates and variables, for example the depth (push back the particle to water if the particle has gone through the surface. Do some simple tests at the given location of the error to obtain what you want.
Closing this Issue now, as the originally reported problem was fixed by updating to the latest version of Parcels
Hello, I am trying to run parcels with some Nemo outputs, but I am getting this error:
NotImplementedError Traceback (most recent call last)