|
29 | 29 | from dataclasses import dataclass, field |
30 | 30 | from typing import TYPE_CHECKING, Any |
31 | 31 |
|
32 | | -import isodate |
33 | | - |
34 | | -from esmvalcore.dataset import _isglob |
35 | | -from esmvalcore.io.local import _parse_period |
36 | 32 | from esmvalcore.io.protocol import DataElement, DataSource |
37 | 33 | from esmvalcore.iris_helpers import dataset_to_iris |
38 | 34 |
|
@@ -121,15 +117,15 @@ def attributes(self) -> dict[str, Any]: |
121 | 117 | def attributes(self, value: dict[str, Any]) -> None: |
122 | 118 | self._attributes = value |
123 | 119 |
|
124 | | - def to_iris(self) -> iris.cube.CubeList: |
| 120 | + def to_iris(self, quiet: bool = True) -> iris.cube.CubeList: |
125 | 121 | """Load the data as Iris cubes. |
126 | 122 |
|
127 | 123 | Returns |
128 | 124 | ------- |
129 | 125 | : |
130 | 126 | The loaded data. |
131 | 127 | """ |
132 | | - files = _to_path_dict(self.catalog, quiet=True)[self.name] |
| 128 | + files = _to_path_dict(self.catalog, quiet=quiet)[self.name] |
133 | 129 |
|
134 | 130 | # Might want to pass through args/kwargs here? Ie. |
135 | 131 | dataset = self.catalog.to_dask() |
@@ -202,16 +198,6 @@ def find_data(self, **facets: FacetValue) -> list[IntakeEsmDataset]: |
202 | 198 | for our_facet, their_facet in self.facets.items() |
203 | 199 | if our_facet in normalized_facets |
204 | 200 | } |
205 | | - if ( |
206 | | - "timerange" in facets and not _isglob(facets["timerange"]) # type: ignore[operator] |
207 | | - ): |
208 | | - start, end = _parse_period(facets["timerange"]) |
209 | | - query["file_start"] = isodate.date_isoformat( |
210 | | - isodate.parse_date(start.split("T")[0]), |
211 | | - ) |
212 | | - query["file_end"] = isodate.date_isoformat( |
213 | | - isodate.parse_date(end.split("T")[0]), |
214 | | - ) |
215 | 201 |
|
216 | 202 | res = self.catalog.search(**query) |
217 | 203 |
|
|
0 commit comments