parcels icon indicating copy to clipboard operation
parcels copied to clipboard

DOC: Viewing and editing metadata dict

Open VeckoTheGecko opened this issue 5 months ago • 1 comments

The metadata for the simulation is stored in a dictionary (ParticleFile.metadata) which is passed to xarray during writing.

https://github.com/OceanParcels/Parcels/blob/b007dcf0ee189ca85735d78c97f0fabf0ad485de/parcels/particlefile.py#L78-L84

Currently users can modify and add items to this dictionary, however this isn't mentioned in documentation. Showing how users can view and modify these attributes would be helpful as a quick aside in a tutorial.

NOTE: When documenting this, please use normal dictionary methods for modifying the metadata (the ParticleFile.add_metadata() method is over-engineered and will be marked for deprecation)

@erikvansebille in which tutorial would be a good place to mention this?

VeckoTheGecko avatar Sep 12 '24 11:09 VeckoTheGecko