[netcdfoutput]: adding trimming support on custom dimensions
- moving method to subsetHelper class