cf.NetCDFArray.del_file_location

NetCDFArray.del_file_location(location)[source]

Remove reference to files in the given location.

New in version 3.15.0.

Parameters
location: str

The file location to remove.

Returns
NetCDFArray

A new NetCDFArray with reference to files in location removed.

Examples

>>> a.get_filenames()
('/data1/file1', '/data2/file2')
>>> a.get_addresses()
('tas1', 'tas2')
>>> b = a.del_file_location('/data1')
>>> b = get_filenames()
('/data2/file2',)
>>> b.get_addresses()
('tas2',)
>>> a.get_filenames()
('/data1/file1', '/data2/file1', '/data2/file2')
>>> a.get_addresses()
('tas1', 'tas1', 'tas2')
>>> b = a.del_file_location('/data2')
>>> b.get_filenames()
('/data1/file1',)
>>> b.get_addresses()
('tas1',)