write2ncdf4.list: Saves climate data as netCDF.

View source: R/write2ncdf.R

write2ncdf4.listR Documentation

Saves climate data as netCDF.

Description

Method to save data as netCDF, making sure to include the data structure and meta-data (attributes). The code tries to follow the netCDf 'CF' convention. The method is built on the ncdf4 package.

Usage

## S3 method for class 'list'
write2ncdf4(
  x,
  ...,
  file = "field.nc",
  prec = "short",
  scale = 0.1,
  offset = NULL,
  torg = "1970-01-01",
  missval = -999,
  verbose = FALSE
)

Arguments

x

data object

...

additional arguments

file

file name

prec

Precision: see ncvar_def

scale

Sets the atttribute 'scale_factor' which is used to scale (multiply) the values stored (to save space may be represented as 'short').

offset

Sets the attribute 'add_offset' which is added to the values stored (to save space may be represented as 'short').

torg

Time origin

missval

Missing value: see ncvar_def

verbose

if TRUE print progress

start

defines the start of the year (default is 'January')

Value

None

See Also

write2ncdf4


metno/esd documentation built on April 29, 2024, 3:34 p.m.