Read/Open Oceancolor data from MODIS with nc forma

2020-08-09 05:20发布

问题:

This month the oceancolor data format (http://oceancolor.gsfc.nasa.gov/cms/) have began change from hdf into nc. I work with R-software, but i can't open this kind of data using R..anyone have any idea?

> library (ncdf)

> indeso.nc <- open.ncdf('D:/A2015199.L3m_DAY_SST_sst_4km.nc')
  Error in R_nc_open: NetCDF: Unknown file format
  Error in open.ncdf("D:/A2015199.L3m_DAY_SST_sst_4km.nc") : 
  Error in open.ncdf trying to open file D:/A2015199.L3m_DAY_SST_sst_4km.nc

> print (indeso.nc);
  Error in print(indeso.nc) : object 'indeso.nc' not found

More i read some new R-package (ncdf4 - https://cran.r-project.org/web/packages/ncdf4/index.html). But this package can't instaled

> library (ncdf4)
  Error in library(ncdf4) : there is no package called ‘ncdf4’

> utils:::menuInstallPkgs()
  --- Please select a CRAN mirror for use in this session ---
  Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘ncdf4’
  These will not be installed
标签: r