fixed row selection such that only rows with at least one value are passed to the netcdf.