
Last chance! 50% off unlimited learning
Sale ends in
Writes magpie object into netcdf4 file.
write.magpie.ncdf(x, file, nc_compression = 9, var_style = "fullname",
comment = NULL, verbose = TRUE)
MAgPIE object. Has to be on half degree resolution. If x as comments in attr, they are plotted as global attributes.
file path as provided in write.magpie
Only used if filetype="nc". Sets the compression level for netCDF files (default is 9). If set to an integer between 1 (least compression) and 9 (most compression), the netCDF file is written in netCDF version 4 format. If set to NA, the netCDF file is written in netCDF version 3 format.
change between variable naming in nc-file; "fullname" for ungrouped name, "grouped" for variable names divided into sub-groups
Vector of comments (also used for setting the unit). Comments are set as global attributes in the netcdf file. Format of comments: "indicator: comment" (e.g. "unit: Share of land area per grid cell")
Boolean deciding about whether function should be verbose or not
netcdf file. Writes one file per year per data column. In the case that more than one year and data column is supplied several files are written with the structure filename_year_datacolumn.asc. In the case several data dimensions exist, they are saved as subcategories.