We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9d1571 commit e0ea544Copy full SHA for e0ea544
src/access_mopper/driver.py
@@ -106,6 +106,20 @@ def to_dataset(self):
106
"""
107
return self.cmoriser.ds
108
109
+ def to_iris(self):
110
+ """
111
+ Converts the underlying xarray Dataset to Iris CubeList format.
112
+ Requires iris and iris.experimental.xarray to be installed.
113
114
+ try:
115
+ from iris.experimental.xarray import as_cubes
116
+
117
+ return as_cubes(self.cmoriser.ds)
118
+ except ImportError:
119
+ raise ImportError(
120
+ "iris and iris.experimental.xarray are required for to_iris(). Please install iris."
121
+ )
122
123
def run(self, write_output: bool = False):
124
125
Runs the CMORisation process, including variable selection, processing,
0 commit comments