I have .nc file sizing around 651 MB with a couple of datasets (daily) (rr_mrg_19810101_20181231_ENACT.nc) data. I need to convert (rr_mrg_19810101_20181231_ENACT.nc) dataset to multiple GeoTIFF (one .tif for each time slice, monthly). Similarly, i want to read the time series. But I found
Error in .local(x, time, ...) :
time must has the same length as the number of layers in RasterBrick][1]
Here is what i did
library(raster)
library(zoo)
library(rts)
TRF = brick("rr_mrg_19810101_20181231_ENACT.nc")
crs(TRF) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84
+towgs84=0,0,0"
Awash_Extent<-c(37,44, 7,12)
Awash_E_resize<- crop(TRF,Awash_Extent)
Awash_Month<-seq(as.Date('1981-01-01'),as.Date('2018-12-31'),by =
"month")
rt <- rts(Awash_E_resize, Awash_Month)
write.rts(Awash_E_resize, filename='Awash_TRF_1981_2018_mon.tif',
overwrite=TRUE)
Can you help me on the issue?