diff --git a/docs/src/further_topics/controlling_merge.rst b/docs/src/further_topics/controlling_merge.rst index 3f788a8493..6f223048ea 100644 --- a/docs/src/further_topics/controlling_merge.rst +++ b/docs/src/further_topics/controlling_merge.rst @@ -200,5 +200,9 @@ Once merged, we can now concatenate all these cubes into a single result cube, w source 'Data from Met Office Unified Model' um_version '12.1' -.. todo:: - Mention the work done in #6168 +See Also +-------- +* :func:`iris.combine_cubes` can perform similar operations automatically +* :data:`iris.LOAD_POLICY` controls the application of :func:`~iris.combine_cubes` + during the load operations, i.e. :func:`~iris.load`, :func:`~iris.load_cube` and + :func:`~iris.load_cubes`. diff --git a/lib/iris/io/loading.py b/lib/iris/io/loading.py index 78b1f4fe83..6b30e26c94 100644 --- a/lib/iris/io/loading.py +++ b/lib/iris/io/loading.py @@ -208,7 +208,9 @@ class LoadPolicy(threading.local): of matching dimension and scalar coordinates. This may be supported at some later date, but for now is not possible without specific user actions. - TODO: reference the newer advice on "new_axis" usage. + .. Note :: + + See also : :ref:`controlling_merge`. Examples -------- @@ -349,11 +351,20 @@ def context(self, settings=None, **kwargs): import iris from iris import LOAD_POLICY, sample_data_path - path = sample_data_path("hybrid_height.nc") - >>> with LOAD_POLICY.context("comprehensive"): + >>> path = sample_data_path("time_varying_hybrid_height", "*.pp") + >>> with LOAD_POLICY.context("legacy"): ... cubes = iris.load(path) - + >>> print(cubes) + 0: surface_altitude / (m) (time: 15; latitude: 144; longitude: 192) + 1: x_wind / (m s-1) (time: 2; model_level_number: 5; latitude: 144; longitude: 192) + 2: x_wind / (m s-1) (time: 12; model_level_number: 5; latitude: 144; longitude: 192) + 3: x_wind / (m s-1) (model_level_number: 5; latitude: 144; longitude: 192) + + >>> with LOAD_POLICY.context("recommended"): + ... cube = iris.load_cube(path, "x_wind") + >>> cube + """ # Save the current state saved_settings = self.settings()