def create_netcdf(netcdf_path, **kwargs): nco = Dataset(netcdf_path, 'w', **kwargs) nco.date_created = datetime.today().isoformat() nco.setncattr('Conventions', 'CF-1.6, ACDD-1.3') nco.history = ("NetCDF-CF file created by " "datacube version '{}' at {:%Y%m%d}." .format(__version__, datetime.utcnow())) return nco
def append_netcdf(netcdf_path): return Dataset(netcdf_path, 'a')