Fixed NPE
corrected long name for variable
Fixed NPE when writing netCDF output