added unit test for netcdf functions, bugfixes in resampling