I have a netcdf file of downward longwave radiation for the whole of China dated 1979 - December. It has got three dimensions namely: longitude , latitude and time. The file contains the data for every 3 hours, which means that for the month of December (31 days), there are 248 values of downward longwave radiation. I have listed the characteristics of the source netcdf file below:
1 variables (excluding dimension variables): short lrad[lon,lat,time] scale_factor: 0.25 add_offset: 685 _FillValue: -32767 missing_value: -32767 units: W m-2 long_name: Surface downward longwave radiation 3 dimensions: lon Size:700 units: degrees_east long_name: Longitude lat Size:400 units: degrees_north long_name: Latitude time Size:248 *** is unlimited *** units: hours since 1900-01-01 00:00:0.0 long_name: Time
I have converted the nc file to raster using the following code:
lradin <- raster("lrad_ITPCAS-CMFD_V0106_B-01_197912.nc")
The internal raster attributes of the created raster object "lradin" shows the following information:
class : RasterLayer band : 1 (of 248 bands) dimensions : 400, 700, 280000 (nrow, ncol, ncell) resolution : 0.1, 0.1 (x, y) extent : 70, 140, 15, 55 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 data source : C:\Program Files\RStudio\bin\lrad_ITPCAS-CMFD_V0106_B- 01_197912.nc names : Surface.downward.longwave.radiation z-value : 1979-12-01 00:00:00 zvar : lrad
The problem is that the attribute of the raster object "lradin" shows only one band of time, i.e. out of time size of 248, "lradin" is showing only 1 time size. This means that I will have to create 248 rasters (for every 3 hours) for the month of December.
Does anybody have idea about how to create the multiband raster that has all the time size of 248 in it ? So that I could have a single raster for the month of December ?