From ef46baf86b09f0b2437bc340f4468106fb6c45df Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:07:57 +0800 Subject: [PATCH 1/3] Remove FieldSet.add_field() --- src/parcels/_core/fieldset.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/parcels/_core/fieldset.py b/src/parcels/_core/fieldset.py index 7f5959c755..481e5d3ee1 100644 --- a/src/parcels/_core/fieldset.py +++ b/src/parcels/_core/fieldset.py @@ -139,29 +139,6 @@ def time_interval(self): return overlap - def add_field(self, field: Field, name: str | None = None): - """Add a :class:`parcels.field.Field` object to the FieldSet. - - Parameters - ---------- - field : parcels.field.Field - Field object to be added - name : str - Name of the :class:`parcels.field.Field` object to be added. Defaults - to name in Field object. - """ - if not isinstance(field, (Field, VectorField)): - raise ValueError(f"Expected `field` to be a Field or VectorField object. Got {type(field)}") - assert_compatible_calendars((*self.fields.values(), field)) - - name = field.name if name is None else name - - if name in self.fields: - raise ValueError(f"FieldSet already has a Field with name '{name}'") - - self.fields[name] = field - _warn_if_fields_use_different_meshes(self.fields.values()) - def to_windowed_arrays(self, *, max_levels: int | None = None): """Wrap dask-backed field data in rolling time-window caches. From 53b48002b58cc3b11b8966792c1472a2b1967c52 Mon Sep 17 00:00:00 2001 From: Erik van Sebille Date: Thu, 13 Aug 2026 09:16:12 +0200 Subject: [PATCH 2/3] Also removing (empty) add_field unit test --- tests/test_fieldset.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/test_fieldset.py b/tests/test_fieldset.py index a81cf43297..75ca0868a7 100644 --- a/tests/test_fieldset.py +++ b/tests/test_fieldset.py @@ -303,11 +303,6 @@ def test_fieldset_grid_deduplication(): ... -def test_fieldset_add_field_after_pset(): - # ? Should it be allowed to add fields (normal or vector) after a ParticleSet has been initialized? - ... - - def test_fieldset_from_icon(): ds = convert.icon_to_ugrid(datasets_unstructured["icon_square_delaunay_uniform_z_coordinate"]) fieldset = FieldSet.from_ugrid_conventions(ds) From 68a850c830b989cc3d30d9d213889d69c0782122 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:52:12 +0800 Subject: [PATCH 3/3] Extend deadline --- tests/test_compat_v3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_compat_v3.py b/tests/test_compat_v3.py index a6c9625b92..00b9fcf27a 100644 --- a/tests/test_compat_v3.py +++ b/tests/test_compat_v3.py @@ -49,7 +49,7 @@ def assert_valid_v3_particlefile_structure(ds: xr.Dataset): assert ds["lat"].attrs["axis"] == "Y" # attrs are copied accross correctly -@settings(deadline=timedelta(seconds=0.3)) +@settings(deadline=timedelta(seconds=1)) @example(buf=example_particlefile()) @given(buf=pst.particlefile_output()) def test_particlefile_to_v3_zarr(buf):