createNc | R Documentation |
Creates a NetCDF file from an array with values.
createNc( arr, varunit, varname, longname, lons, lats, inidate = NULL, scale = NULL, out )
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. |
A NetCDF file is created in the path specified in the "out" parameter.
try( createNc(arr = hi, varunit = 'ÂșC', varname = 'hi', longname = 'Huglin Index', lons = lon, lats = lat, inidate = '1980-01-01', scale = 'years', out = 'hi.nc') )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.