Skip to content

Export python dictionary to imas-compliant netcdf file #38

Open
@AreWeDreaming

Description

@AreWeDreaming

To avoid the overhead of xarrays when working with data loaded with IMAS-python, I think it would be good to allow the conversion to and from python dictionaries to numpy masked arrays. I am suggesting masked arrays because that's the clearest way to deal with ragged data.
For the conversion from IMAS-python objects I think all the key ingredients are there:

Now the other direction from the python dictionary to an imas-compliant netcdf file is harder and I think this is were IMAS-python can help a lot by providing its own from_dict method like this https://docs.xarray.dev/en/stable/generated/xarray.DataArray.from_dict.html) method but use the existing xarray.DataArray encoding in IMAS-python for consistency checks and all the meta information from the schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions