Skip to content

Define custom dataset attributes #60

@forman

Description

@forman

Is your feature request related to a problem? Please describe.

Users should be allowed to define custom dataset attributes. The values of attributes should be allowed to contain (Python) expressions evaluated in the context of the current target dataset. This way it is possible to dynamically update variables such as time_coverage_start and time_coverage_end. In the expression, the current dataset should be accessible by a variable named ds.

Ideally the solution would also work for variable attributes with current data array accessible by name v or var.

Describe the solution you'd like

Configuration example:

...
attrs:
    title: HROC Ocean Colour Monthly Composite
    time_coverage_start: {{ ds.time[0] }}
    time_coverage_end: {{ ds.time[-1] }}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions