Monday, 5 October 2015

geoprocessing - R Raster package: write NetCDF with time dimension


I am writing a rasterbrick with multiple layers to a netcdf file using the raster package in R:


writeRaster(gridfile, "Data", "CDF", overwrite=TRUE,
varname="Data",varunit="mm.d-1",longname="Monthly data",

xname="lon",yname="lat", zname="time", zunit="month",bylayer=FALSE,NAflag=-9999)

Is there a way to have the data with time coordinates in the written ncdf file? E.g. in the NetCDF Viewer Panoply I can plot the data in [lon][lat] but not in [time][lat].


Also how can specify the timesteps as specific months in a year instead of the timesteps starting from 1 and increasing?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...