You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make it easy to add items by name : el.variables[var.name] = var --> el.variables.add(var)
make it easy to rename content, e.g. ds.variables.rename('x', 'y')
make it easy to construct containers (variables, attributes) from lists of element specifications
e.g. NcData(dimensions=nc_dims(x=3, y=5, t=(2, True)), variables=nc_vars(x=(['x'], int), y=(['y'], int), data=(['t', 'y', 'x'], float))
(or something !)
special convenience handling for attrs : e,g, el.ncd_setatt(name, value) ~= el.attributes[name] = NcAttribute(name, value) el.ncd_getatt(name) ~= el.attributes.get('name', NcAttribute('', None)).as_python_value()
Although strictly excluded as a goal for the initial release,
I still think the 'secondary' usage of ncdata will be useful :
For this there real scope for some convenience and sugar.
Some ideas :
ds.is_valid(error_when_not=False): checking the consistencies not ensured by the free-and-easy designideasds.variables['x'].name == 'x')el.variables[var.name] = var-->el.variables.add(var)ds.variables.rename('x', 'y')e.g.
NcData(dimensions=nc_dims(x=3, y=5, t=(2, True)), variables=nc_vars(x=(['x'], int), y=(['y'], int), data=(['t', 'y', 'x'], float))(or something !)
el.ncd_setatt(name, value)~=el.attributes[name] = NcAttribute(name, value)el.ncd_getatt(name)~=el.attributes.get('name', NcAttribute('', None)).as_python_value()Update:
v0.1.1 delivered most of this :
- but not (yet) validity checking
For instance, some actions I needed to adjust a given file output from xarray so that Iris can correctly interpret the coord-system ...
So, how about