createNc: Creation of NetCDF from an array

Description Usage Arguments Value Examples

View source: R/createNc.R

Description

Creates a NetCDF file from an array with values.

Usage

1
2
createNc(arr, varunit, varname, longname, lons, lats, inidate = NULL,
  scale = NULL, out)

Arguments

arr

array containing the values to export in netcdf.

varunit

character. units in which variable is measured.

varname

character. name of the variable

longname

character. long name of the variable

lons

numeric. vector of longitudes.

lats

numeric. vector of latitudes.

inidate

date. initial day of observations.

scale

character. temporal units for the variable (usually "days", "months" or "years")

out

character. path to the output file.

Value

A NetCDF file is created in the path specified in the "out" parameter.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
createNc(arr = hi,
          varunit = 'ÂșC',
          varname = 'hi',
          longname = 'Huglin Index',
          lons = lon,
          lats = lat,
          inidate = '1980-01-01',
          scale = 'years',
          out = 'hi.nc')
 

agroclim documentation built on March 20, 2020, 5:06 p.m.

Related to createNc in agroclim...