replaced deprecated netCDF API method, corrected testcase