EarthScope / dataselect

Selection and sorting for data in miniSEED format
GNU General Public License v3.0
14 stars 7 forks source link

Writing with archival format always append to existing files #7

Closed heavelock closed 5 years ago

heavelock commented 5 years ago

Hi! Currently, when using a dataselect with for example that command:

$ ~/tools/dataselect/dataselect -v -sum -ts 2019,182,0,0,0 -te 2019,182,23,59,59.99999 -Pr -SDS /mnt/D4To/temp/tempsds /datadir/SI.SI30.00.CHE_2019070?_??0000.miniseed

If I run it multiple times, dataselect will append data to existing files. Is there a possibility of defining what should be done in case of existing file other than executing dataselect with -o parameter for each of the requested output files?

chad-earthscope commented 5 years ago

Is there a possibility of defining what should be done in case of existing file other than executing dataselect with -o parameter for each of the requested output files?

No there is no such control. The archive option, or any of it's presets such as -SDS, will always append to existing files. You can either remove the files in the archive prior to running dataselect or write to a separate, temporary location and then copy the files back to the archive replacing them.