When nccompress times out and is re-run on the same directory it ends up trying to open every file to check if it is netCDF. This is slow and inefficient if it has already done that before.
Could use dusql to create a file info database, and create a table that stores the format information, and if it has already been compressed, so the work is not duplicated when it it is run again.