parcels
parcels copied to clipboard
Refactoring of FieldSet field store
https://github.com/OceanParcels/Parcels/blob/595b7a94cdf97182df53c88fa99cf05646f07346/parcels/fieldset.py#L162-L197
I don't like the current implementation of .add_field()
calling set_attr(self, name, field)
. Programmatically storing these fields messes with static typecheckers, and it would be clearer if this was handled another way (either a list of fields, a dictionary, or something else). We can set __getattr__
so users can still do fieldset.U