-
Notifications
You must be signed in to change notification settings - Fork 94
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
Unable to save model.results
directly
#684
Comments
What is the use case that makes this a bug? In other words, why can't you use |
In this case, I wanted to just save the results to have a smaller file size. I did save with If you have a stable model build and run many scenarios (e.g., SPORES), saving only the model results, and some metadata on the side, would reduce data use. Generally, though, just saving the results or inputs makes parsing the data a bit easier. Depending on the mode, some things might be inputs or results (e.g., |
Maybe this is why we should simply pickle our data - then it would be clear that you need to load it back in using calliope 😅. But in all seriousness, our preferred method is that data is always loaded in using calliope ( Generally, input data has a much smaller memory footprint than results. Still, in the use-case you have given (individual SPORES runs), it's clearly preferable not to save the input data every single time a new set of results is generated. How about |
@brynpickering I would not pickle the data. Pickle files are not always translatable between python or library versions. I'd actually prefer to just keep I suppose it would introduce the chance of someone trying to re-load Should I close this as 'not planned'? |
Except you also want to add |
I meant that I'm ok with just using I can get around it in other ways on my side, and if it has not popped up yet it means most people do not do it. |
Just to clarify: we already have This issue was just about making sure using xarray functionality with it works when saving to netCDF. |
I'm setting this as 'not planned'. |
What happened?
Problem
This is related to other problems (#619), but it's closer to an actual user case, so I'll document it here.
Due to our approach of saving everything in the
.attrs
of thexarray
, we cannot directly save model results.This is a reasonable user-case, as saving results is semantically intuitive.
Solution
Not saving dictionaries or arrays in the
.attrs
Which operating systems have you used?
Version
v0.7.0.dev4
Relevant log output
The text was updated successfully, but these errors were encountered: