replaced more deprecated netcdf methods
(cherry picked from commit 80084d6)