Conversation
ee97383 to
68fd3a0
Compare
| If no dimensions are provided, all dimensions are thinned. | ||
| """ | ||
| function thin_NCDataset!(ds_out, ds_in, thinning_factor=6, dims...) | ||
| all(in.(dims, Ref(keys(ds_in.dim)))) || error("Not all of $dims are in the dataset") |
There was a problem hiding this comment.
Why we need a Ref here? Can you add a comment explaining this or find an alternative solution?
There was a problem hiding this comment.
Ref prevents broadcasting over the list of dimensions in the input file. I think this is done pretty commonly.
| end | ||
|
|
||
| """ | ||
| thin_NCDataset!(ds_out, ds_in, thinning_factor=6, dims...) |
There was a problem hiding this comment.
Can you add documentation that briefly said that ds_out and ds_in are NCDatasets since they can also be confused for file paths?
There was a problem hiding this comment.
Also, does this copy everything beside the variable and dimensions too? I am a little confused on how this is supposed to be used.
There was a problem hiding this comment.
Do you think it would be better to take in file paths?
What do you mean by "everything beside the variable and dimensions"? As in the global attributes?
There was a problem hiding this comment.
I don't think it matter as long as it is apparent that it takes in NCDataset objects or file paths.
For the second question, I am wondering if the function also copy global attributes.
68fd3a0 to
6f28d28
Compare
Add ` thin_NCDataset!(ds_out, ds_in, thinning_factor=6, dims...)` which thins NCDataset files along the provided dimensions.
6f28d28 to
c85252c
Compare
Proposed function to close #86
Add
thin_NCDataset!(ds_out, ds_in, thinning_factor=6, dims...)which thins NCDataset files along the provided dimensions.
Please suggest a better interface if you have any in mind.
I'm not sure if this should edit all the Manifest files.