[R-sig-Geo] Raster to rasterbrick does not preserve Date/Time

Miluji Sb miluji@b @ending from gm@il@com
Sun Nov 4 18:39:55 CET 2018


Dear all,

I have a raster with multiple variables and date/time information;

      time  Size:17164   *** is unlimited ***
            standard_name: time
            bounds: time_bnds
            units: day as %Y%m%d.%f
            calendar: proleptic_gregorian
        bnds  Size:2

My goal is to convert the raster file to rasterbrick for extraction
purposes;

rbrick <- brick(r,  values=TRUE, varname="var1")

However, after conversion - the date/time information is not preserved. How
can I preserve this information?

class       : RasterBrick
dimensions  : 600, 1440, 864000, 17164  (nrow, ncol, ncell, nlayers)
resolution  : 0.25, 0.25  (x, y)
extent      : -180, 180, -60, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : /work/ncfile.nc4
names       : X19700101.4375, X19700102.4375, X19700103.4375,
X19700104.4375, X19700105.4375, X19700106.4375, X19700107.4375,
X19700108.4375, X19700109.4375, X19700110.4375, X19700111.4375,
X19700112.4375, X19700113.4375, X19700114.4375, X19700115.4375, ...
z-value     : 19700101.4375, 20161231.4375 (min, max)
varname     : var1

Any help will be greatly appreciated!

Sincerely,

Milu

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list