예제 #1
0
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
예제 #2
0
def append_netcdf(netcdf_path):
    return Dataset(netcdf_path, 'a')