Xarray: add support for multi-file dataset (#1233)
* Xarray: add support for multi-file dataset * fix flake8 * test
This commit is contained in:
@@ -95,6 +95,7 @@ jobs:
|
||||
python3 setup.py install
|
||||
pip3 install --upgrade numpy elasticsearch
|
||||
pip3 install --upgrade numpy "sqlalchemy<2"
|
||||
pip3 install --upgrade flake8
|
||||
pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
|
||||
#pip3 install --upgrade rasterio==1.1.8
|
||||
- name: setup test data ⚙️
|
||||
|
||||
@@ -62,7 +62,12 @@ class XarrayProvider(BaseProvider):
|
||||
if provider_def['data'].endswith('.zarr'):
|
||||
open_func = xarray.open_zarr
|
||||
else:
|
||||
open_func = xarray.open_dataset
|
||||
if '*' in self.data:
|
||||
LOGGER.debug('Detected multi file dataset')
|
||||
open_func = xarray.open_mfdataset
|
||||
else:
|
||||
open_func = xarray.open_dataset
|
||||
|
||||
self._data = open_func(self.data)
|
||||
self._data = _convert_float32_to_float64(self._data)
|
||||
self._coverage_properties = self._get_coverage_properties()
|
||||
|
||||
Reference in New Issue
Block a user