Made some changes to changeNC in order to account for changes dimension size. Which can be done now though the av['dim'][dim]['newSize'] keyword.
Also addedsurrport for changing dimensions using the keywrod: av[var]['newDims']