Skip to content

Commit 6b5457d

Browse files
committed
Remove analytical output
1 parent 2d21efa commit 6b5457d

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

parcels/kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ def check_fieldsets_in_kernels(self, pyfunc): # TODO v4: this can go into anoth
228228
stacklevel=2,
229229
)
230230
elif pyfunc is AdvectionAnalytical:
231-
if self.fieldset.particlefile is not None:
232-
self.fieldset.particlefile._is_analytical = True
233231
if self._fieldset.U.interp_method != "cgrid_velocity":
234232
raise NotImplementedError("Analytical Advection only works with C-grids")
235233
if self._fieldset.U.grid._gtype not in [GridType.CurvilinearZGrid, GridType.RectilinearZGrid]:

parcels/particlefile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def __init__(self, name, particleset, outputdt, chunks=None, create_new_zarrfile
6363
if var.to_write:
6464
self.vars_to_write[var.name] = var.dtype
6565
self._mpi_rank = MPI.COMM_WORLD.Get_rank() if MPI else 0
66-
self.particleset.fieldset._particlefile = self
67-
self._is_analytical = False # Flag to indicate if ParticleFile is used for analytical trajectories
6866

6967
# Reset obs_written of each particle, in case new ParticleFile created for a ParticleSet
7068
particleset.particledata.setallvardata("obs_written", 0)

parcels/particleset.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,7 @@ def execute(
10831083

10841084
if abs(time - next_output) < tol:
10851085
if output_file:
1086-
if output_file._is_analytical: # output analytical solution at later time
1087-
output_file.write_latest_locations(self, time)
1088-
else:
1089-
output_file.write(self, time_at_startofloop)
1086+
output_file.write(self, time_at_startofloop)
10901087
if np.isfinite(outputdt):
10911088
next_output += outputdt * np.sign(dt)
10921089

0 commit comments

Comments
 (0)