Commit 164489be authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Update metadata handling (closed #163)

parent 0cf89f72
......@@ -100,6 +100,7 @@ class ParameterQuantity:
data: Any
units: str
long_name: str = None
proposed_standard_name: str = None
kind: ParameterKind = ParameterKind.QUANTITY
@property
......@@ -209,14 +210,17 @@ def build_parameter(name, metadata):
def build_index(metadata, variables, source=None):
if (cell_methods := metadata['output']['cell_methods']) is None: # noqa
cms = []
else:
cms = [CellMethod(*cm.popitem()) for cm in cell_methods]
output = OutputVariable(
metadata['output']['var_name'],
metadata['output']['standard_name'],
metadata['output'].get('proposed_standard_name', None),
metadata['output']['long_name'],
metadata['output']['units'],
[CellMethod(*cm.popitem())
for cm in metadata['output']['cell_methods']])
cms)
if isinstance(metadata['input'], str):
input_metadata = {'data': metadata['input']}
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment