Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Viewing and editing metadata dict #1701

Open
VeckoTheGecko opened this issue Sep 12, 2024 · 1 comment
Open

DOC: Viewing and editing metadata dict #1701

VeckoTheGecko opened this issue Sep 12, 2024 · 1 comment
Labels

Comments

@VeckoTheGecko
Copy link
Contributor

VeckoTheGecko commented Sep 12, 2024

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

self.metadata = {
"feature_type": "trajectory",
"Conventions": "CF-1.6/CF-1.7",
"ncei_template_version": "NCEI_NetCDF_Trajectory_Template_v2.0",
"parcels_version": parcels.__version__,
"parcels_mesh": self.parcels_mesh,
}

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 VeckoTheGecko added documentation good first issue Good for new parcels developers labels Sep 12, 2024
@erikvansebille
Copy link
Member

Good point to better document this feature. Places to do that could be

  1. The Working with Parcels Output tutorial
  2. The Executing and Output section of the Parcels structure overview tutorial

If we add it in option 1, we could link it in option 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants