inst/nc/reduced.R

library(ncdf4)
nc = nc_open("reduced.nc", write=TRUE)
ncatt_put(nc, 'sst', 'units', 'degree_C')
ncatt_put(nc, 'anom', 'units', 'degree_C')
ncatt_put(nc, 'err', 'units', 'degree_C')
ncatt_put(nc, 'ice', 'units', 'percent')
nc_sync(nc)
nc_close(nc)

Try the stars package in your browser

Any scripts or data that you put into this service are public.

stars documentation built on Sept. 11, 2023, 5:10 p.m.