Open SnBuenafe opened 7 months ago
Yes I flirted with this idea today. I get errors when I rerun code if the files already exist. I think the default should be to overwrite. But adding an argument to each function that creates a file seems like a good idea. Use overwrite = TRUE
to be consistent with the ones that already have it.
The fastest way to implement this is probably to add the -O
flag to the cdo call. Not sure this works for all cdo functions though.
Another thought. We need to be careful to distinguish between overwriting an exisiting output file (which should be the default IMO) and accidentally overwriting an input file (for example when you use hrt_get_Years()
if the years selected match the existing file, then it will be overwritten).
Not sure if the
overwrite
options in some of the functions (e.g.,slice_period
works). Have to check.