cf.from_netcdf

cf.from_netcdf(input_file, output_uri, input_group_path='/', recursive=True, output_key=None, output_ctx=None, unlimited_dim_size=10000, dim_dtype=_DEFAULT_INDEX_DTYPE, tiles_by_var=None, tiles_by_dims=None, coords_to_dims=False, collect_attrs=True, unpack_vars=False, offsets_filters=None, attrs_filters=None, copy_metadata=True)

Converts a NetCDF input file to nested TileDB CF dataspaces.

See tiledb.cf.NetCDF4ConverterEngine for more information on the backend converter engine used for the conversion.

Parameters

Name Type Description Default
input_file typing.Union[str, pathlib.Path] The input NetCDF file to generate the converter engine from. required
output_uri str The uniform resource identifier for the TileDB group to be created. required
input_group_path str The path to the NetCDF group to copy data from. Use '/' for the root group. '/'
recursive bool If True, recursively convert groups in a NetCDF file. Otherwise, only convert group provided. True
output_key typing.Optional[str] If not None, encryption key to decrypt arrays. None
output_ctx typing.Optional[tiledb.tiledb.Ctx] If not None, TileDB context wrapper for a TileDB storage manager. None
unlimited_dim_size int The size of the domain for TileDB dimensions created from unlimited NetCDF dimensions. 10000
dim_dtype numpy.numpy.dtype The numpy dtype for TileDB dimensions. _DEFAULT_INDEX_DTYPE
tiles_by_var typing.Optional[typing.Dict[str, typing.Dict[str, typing.Optional[typing.Sequence[int]]]]] A map from the name of a NetCDF variable to the tiles of the dimensions of the variable in the generated TileDB array. None
tiles_by_dims typing.Optional[typing.Dict[str, typing.Dict[typing.Sequence[str], typing.Optional[typing.Sequence[int]]]]] A map from the name of NetCDF dimensions defining a variable to the tiles of those dimensions in the generated TileDB array. None
coords_to_dims bool If True, convert the NetCDF coordinate variable into a TileDB dimension for sparse arrays. Otherwise, convert the coordinate dimension into a TileDB dimension and the coordinate variable into a TileDB attribute. False
collect_attrs bool If True, store all attributes with the same dimensions in the same array. Otherwise, store each attribute in a scalar array. True
unpack_vars bool Unpack NetCDF variables with NetCDF attributes scale_factor or add_offset using the transformation scale_factor * value + unpack. False
offsets_filters typing.Optional[tiledb.tiledb.FilterList] Default filters for all offsets for variable attributes and dimensions. None
attrs_filters typing.Optional[tiledb.tiledb.FilterList] Default filters for all attributes. None
copy_metadata bool If True copy NetCDF group and variable attributes to TileDB metadata. If False do not copy metadata. True