parcels icon indicating copy to clipboard operation
parcels copied to clipboard

Read only values in `Field`

Open VeckoTheGecko opened this issue 1 year ago • 2 comments

Lets make the following read only (so that users don't try to edit it expecting it to propagate to the grid

https://github.com/OceanParcels/Parcels/blob/93cc635b82397a826e4e0869f2db4ecc7b3bfb19/parcels/field.py#L192-L197

cc: @sruehs

VeckoTheGecko avatar Sep 04 '24 13:09 VeckoTheGecko

In fact, we could even deprecate the field.lon, field.lat and field.depth attributes; I left them in for backward compatibility when we moved to a GridSet structure back in v2.0. So it's really old, redundant code that's there just for convenience.

erikvansebille avatar Sep 04 '24 13:09 erikvansebille

Yes, thats also a possibility. Let's save this particular discussion for down the line where I review all attributes/methods and suggest actions to take (deprecate to make private, make read only, etc)

VeckoTheGecko avatar Sep 04 '24 14:09 VeckoTheGecko

Done in #1709

VeckoTheGecko avatar Nov 19 '24 15:11 VeckoTheGecko