added functions for regridding data, and also for writing gridded data (array) to netcdf
merge