fixed a bug where the netcdf file got read wrong