added flag to choose NetCDF 3 or 4 output