Skip to content

Commit cf1f9d5

Browse files
committed
Remove analytical output
1 parent eecb692 commit cf1f9d5

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

parcels/kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ def check_fieldsets_in_kernels(self, pyfunc): # TODO v4: this can go into anoth
208208
"""
209209
if self.fieldset is not None:
210210
if pyfunc is AdvectionAnalytical:
211-
if self.fieldset.particlefile is not None:
212-
self.fieldset.particlefile._is_analytical = True
213211
if self._fieldset.U.interp_method != "cgrid_velocity":
214212
raise NotImplementedError("Analytical Advection only works with C-grids")
215213
if self._fieldset.U.grid._gtype not in [GridType.CurvilinearZGrid, GridType.RectilinearZGrid]:

parcels/particlefile.py

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

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

parcels/particleset.py

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

10791079
if abs(time - next_output) < tol:
10801080
if output_file:
1081-
if output_file._is_analytical: # output analytical solution at later time
1082-
output_file.write_latest_locations(self, time)
1083-
else:
1084-
output_file.write(self, time_at_startofloop)
1081+
output_file.write(self, time_at_startofloop)
10851082
if np.isfinite(outputdt):
10861083
next_output += outputdt * np.sign(dt)
10871084

0 commit comments

Comments
 (0)