[R-sig-Geo] make a raster from Aquarius files
Antonio Silva
aolinto.lst at gmail.com
Thu Nov 30 20:14:32 CET 2017
Hello
Some time ago I prepared scripts to extract temperature data from Modis
Aqua files. It can be found at https://gist.github.com/aolinto
HDF files can be downloaded at https://oceancolor.gsfc.nasa.gov/cgi/l3
I got the Aquarius sea surface salinity smoothed file from June 2015.
I could open and read the file:
library(ncdf4)
library(raster)
nc.data<-nc_open("Q20151522015181.L3m_MO_SCISM_V5.0_SSS_1deg")
print(nc.data)
dim(ncvar_get(nc.data,"l3m_data"))
ncvar_get(nc.data,"l3m_data")[c(110:160),c(110:117)]
But I could not prepare a raster from it. I tryed many things as:
rst.data <-
raster("Q20151522015181.L3m_MO_SCISM_V5.0_SSS_1deg",varname="l3m_data")
Error in .local(.Object, ...) :
`AQUARIUS/Q20151522015181.L3m_MO_SCISM_V5.0_SSS_1deg' not recognised as a
supported file format.
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer",
:
Cannot create a RasterLayer object from this file.
and variations with band and layer.
I would greatly appreciate any suggestions to solve this issue.
Thanks
--
Antônio Olinto Ávila da Silva
Fisheries Institute
São Paulo, Brasil
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list