Skip to content
Prev 27171 / 29559 Next

Converting a variable's units from gigatons to teratons

ncvar_get() should return a data frame, so just

get2.teratons <- get2 / 1000

Even if it's a higher-dimensional array, that will work.

You could then write it back with ncvar_put(), subject to the data
type of that variable in the NetCDF file.

Sarah


On Thu, Mar 28, 2019 at 11:55 AM rain1290--- via R-sig-Geo
<r-sig-geo at r-project.org> wrote: