Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

adding attributes and metadata to a dataset using xarray

#import xarray
import xarray as xr

#open dataset
ds = xr.open_dataset(file_name.nc)

#add attributes and metadata in different ways
ds.attrs = {attribute name : attribute value}
ds.attrs[attribute name] = attribute value
 
PREVIOUS NEXT
Tagged: #adding #attributes #metadata #dataset #xarray
ADD COMMENT
Topic
Name
1+6 =