спасибо за быстрый отзыв.Я хотел бы построить с помощью RasterVis NetCDF с нерегулярной сеткой (lon, lat - 2d массивы):
netcdf temp {
dimensions:
y = 292 ;
x = 362 ;
time_counter = UNLIMITED ; // (1 currently)
variables:
float lat(y, x) ;
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
lat:units = "degrees_north" ;
lat:_CoordinateAxisType = "Lat" ;
float lon(y, x) ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
lon:units = "degrees_east" ;
lon:_CoordinateAxisType = "Lon" ;
double time_counter(time_counter) ;
time_counter:standard_name = "time" ;
time_counter:units = "days since 0-00-00 00:00:00" ;
time_counter:calendar = "proleptic_gregorian" ;
float votemper(time_counter, y, x) ;
votemper:standard_name = "Temperature" ;
votemper:long_name = "Temperature" ;
votemper:units = "C" ;
votemper:coordinates = "lon lat time_counter" ;
votemper:_FillValue = 9.96921e+36f ;
votemper:missing_value = 9.96921e+36f ;
votemper:online_operation = "ave(x)" ;
votemper:interval_operation = 3600.f ;
votemper:interval_write = 2678400.f ;
votemper:offline_operation = "ave(x)" ;
}
Код, вдохновленный руководством rasterVis, выглядит следующим образом:
library(raster)
library(rasterVis)
stackSIS <- stack("temp.nc")
idx <- c(as.Date('2008-01-15'))
SISmm <- setZ(stackSIS, idx)
names(SISmm) <- month.abb[1]
SISmm
levelplot(SISmm)
, нографик не рассматривает географические координаты lon / lat как оси, а индексы x, y массива.Действительно, когда я спрашиваю сводку растрового объекта, я получаю:
class : RasterStack
dimensions : 292, 362, 105704, 1 (nrow, ncol, ncell, nlayers)
resolution : 1, 1 (x, y)
extent : 0.5, 362.5, 0.5, 292.5 (xmin, xmax, ymin, ymax)
coord. ref. : NA
names : Jan
time : 2008-01-15
, т. Е. "Экстент" учитывает индексы, а не координаты.
Спасибо