diff --git a/parcels/fieldset.py b/parcels/fieldset.py index 7d2c6002c..1799f3d2a 100644 --- a/parcels/fieldset.py +++ b/parcels/fieldset.py @@ -54,7 +54,7 @@ def __init__(self, U: Field | NestedField | None, V: Field | NestedField | None, self.add_field(field, name) self.compute_on_defer = None - self.add_UVfield() + self._add_UVfield() @property def particlefile(self): @@ -245,7 +245,11 @@ def add_vector_field(self, vfield): for f in vfield: f.fieldset = self - def add_UVfield(self): + @deprecated_made_private # TODO: Remove 6 months after v3.1.0 + def add_UVfield(self, *args, **kwargs): + return self._add_UVfield(*args, **kwargs) + + def _add_UVfield(self): if not hasattr(self, "UV") and hasattr(self, "U") and hasattr(self, "V"): if isinstance(self.U, NestedField): self.add_vector_field(NestedField("UV", self.U, self.V)) @@ -313,7 +317,7 @@ def check_velocityfields(U, V, W): if g.defer_load: g.time_full = g.time_full + self.time_origin.reltime(g.time_origin) g.time_origin = self.time_origin - self.add_UVfield() + self._add_UVfield() ccode_fieldnames = [] counter = 1