Comparison between packages RnetCDF, ncdf4 and ncdf
Let use the same nc file obtained from NOAA ( http://www.esrl.noaa.gov/psd/data/gridded/data.noaa.oisst.v2.highres.html ) be used. Here I show the 3 ways to get annual data depending on the package used. In conclusion, RnetCDF does not scale data using scale_factor and add_offset automatically. Take care. utcal.nc from package RnetCDF is very useful. dest <- "sst.day.mean.2014.v2.nc" For all the package, I will use the same coordinates: lat=35, lon=28 # Note that the function ind_long_lat can be used data from any of these packages library(RNetCDF) dat.RNetCDF <- open.nc(dest) lat=35 lon=28 # it will be used for all data library(phenology) indice <- ind_long_lat(ncdf=dat.RNetCDF, long=lon, lat=lat) Packages RnetCDF # take care, it does not scale automatically the data point_SST.RNetCDF_wrong <- var.get.nc(ncfile=dat.RNetCDF, variable="sst", start=c(...