correction flatten and to its usage.
Added logger. do_regrid now trim the file to keep only useful years (minimising memory usage and speeding up processing. Usage of flatten is correct.