Fix call to Dataset when writing to netCDF.
Update print statements and fix an indent.