Remove the write.netcdf4 function

To avoid ncdf4 being picked as dependency