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

Convert the attributes type for easier export to netcdf format with the xarray.Dataset.to_netcdf method #89

Closed
liuchao95 opened this issue Oct 9, 2023 · 3 comments

Comments

@liuchao95
Copy link

The attributes of the MCA method output, has a "None" type and "bool" type, which are not directly compatible with the xr.DataArray.to_netcdf method. I wonder if it is possible to convert these None and Logical values to the String type to faciliate an easier export to netcdf format with the Xarray package, if these attributes are used only to record model configuration details.

image

image

@nicrie
Copy link
Contributor

nicrie commented Oct 9, 2023

Thank you for raising this! The attributes are indeed just for tracking model configurations, so you're probably right that converting all values to str will fix this. I'll try to make a new release in the coming days.

@liuchao95
Copy link
Author

Thank you for your efforts in actively maintaining this package!

@nicrie
Copy link
Contributor

nicrie commented Oct 9, 2023

No worries! I'll leave the issue open as a reminder for myself and until the new release is out.

@nicrie nicrie reopened this Oct 9, 2023
@nicrie nicrie closed this as completed in 98c5cef Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants