1885 write cdf default compression to 6#1886
Conversation
greglucas
left a comment
There was a problem hiding this comment.
Did you test this on your datasets at all to see if it helped?
| file_path = file_path.construct_path() | ||
|
|
||
| dataset = cdf_to_xarray(file_path, kwargs) | ||
| dataset = cdf_to_xarray(file_path, **kwargs) |
Good idea... haha. Yes for a 34 MB file that I read in and wrote back out, the new file is 17 MB. |
| if "to_datetime" not in kwargs: | ||
| kwargs["to_datetime"] = False # type: ignore |
There was a problem hiding this comment.
@greglucas, do you have any opinions about this implementation (mirrors what is also in the write_cdf function) of setting defaults in the kwargs dict vs. just exposing those keywords at the interface to the load and write functions?
There was a problem hiding this comment.
Do you mean having a signature like the following instead?
def func(args, to_datetime=False, **kwargs):
cdf_to_xarray(file_path, to_datetime, **kwargs)I don't have a strong opinion here if that is what you are asking about. I would suggest doing that as a separate PR though.
de97a26
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
This PR:
cdf_to_xarray.Updated Files
kwargswas being passed through tocdf_to_xarraywrite_cdfto 6.cdf_to_xarrayandxarray_to_cdfCloses: #1885