diff --git a/xarray/backends/api.py b/xarray/backends/api.py index a322139ff45..4359868feae 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -313,7 +313,10 @@ def maybe_decode_store(store, lock=False): return maybe_decode_store(store) -def open_dataarray(*args, **kwargs): +def open_dataarray(filename_or_obj, group=None, decode_cf=True, + mask_and_scale=True, decode_times=True, autoclose=False, + concat_characters=True, decode_coords=True, engine=None, + chunks=None, lock=None, cache=None, drop_variables=None): """Open an DataArray from a netCDF file containing a single data variable. This is designed to read netCDF files with only one data variable. If @@ -394,7 +397,13 @@ def open_dataarray(*args, **kwargs): -------- open_dataset """ - dataset = open_dataset(*args, **kwargs) + dataset = open_dataset(filename_or_obj, group=group, decode_cf=decode_cf, + mask_and_scale=mask_and_scale, + decode_times=decode_times, autoclose=autoclose, + concat_characters=concat_characters, + decode_coords=decode_coords, engine=engine, + chunks=chunks, lock=lock, cache=cache, + drop_variables=drop_variables) if len(dataset.data_vars) != 1: raise ValueError('Given file dataset contains more than one data '