write.temperature: Write a temperature field as a netcdf file.

Description Usage Arguments

View source: R/writedata.R

Description

Format a field as a netcdf file and write it to the specified file. The lat, lon, and time variables from the griddata input are used to recover the original size of the grid, reversing the flattening procedure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
write.temperature(
  fld,
  file,
  griddata,
  varname = "tas",
  varunit = "K",
  vardesc = "2m air temperature",
  tunit = "years since 2006",
  clobber = FALSE
)

Arguments

fld

A matrix ntime x ngrid containing the field to write out.

file

Name of the output file.

griddata

A griddata structure returned from the read.temperatures function.

varname

Name to use for the variable in the output file.

varunit

Units of the variable in the field.

vardesc

Description string to write into the longname attribute in the output file.

tunit

Units for the time variable.

clobber

If TRUE, overwrite the file if it exists; otherwise trying to write a file that already exists is an error.


JGCRI/fldgen documentation built on July 18, 2020, 1:42 p.m.