move netcdf write out code into GriddingSet.
code clear.