@@ -16,27 +16,28 @@ issues from occurring.
1616Both ``merge `` and ``concatenate `` take multiple cubes as input and
1717result in fewer cubes as output. The following diagram illustrates the two processes:
1818
19- .. image :: merge_and_concat.svg
19+ .. image :: merge_and_concat.png
2020 :alt: Pictographic of merge and concatenation.
2121 :align: center
2222
23- There is one major difference between the ``merge `` and ``concatenate `` processes.
24- The ``merge `` process combines multiple input cubes into a
25- single resultant cube with new dimensions created from the
26- *scalar coordinate values * of the input cubes.
27- The ``concatenate `` process process combines multiple input cubes into a
28- single resultant cube with the same *number of dimensions * as the input cubes,
29- but with the length of one or more dimensions extended by *joining together
30- sequential dimension coordinates *.
23+ There is one major difference between the ``merge `` and ``concatenate `` processes.
24+
25+ * The ``merge `` process combines multiple input cubes into a
26+ single resultant cube with new dimensions created from the
27+ *scalar coordinate values * of the input cubes.
3128
29+ * The ``concatenate `` process combines multiple input cubes into a
30+ single resultant cube with the same *number of dimensions * as the input cubes,
31+ but with the length of one or more dimensions extended by *joining together
32+ sequential dimension coordinates *.
3233
3334Let's imagine 28 individual cubes representing the
34- temperature at a location ``(y, x) ``, one cube for each day of February. We can use
35+ temperature at a location ``(y, x) ``; one cube for each day of February. We can use
3536:meth: `~iris.cube.CubeList.merge ` to combine the 28 ``(y, x) `` cubes into
3637a single ``(t, y, x) `` cube, where the length of the ``t `` dimension is 28.
3738
3839Now imagine 12 individual cubes representing daily temperature at a time and
39- location ``(t, y, x) ``, one cube for each month in the year. We can use
40+ location ``(t, y, x) ``; one cube for each month in the year. We can use
4041:meth: `~iris.cube.CubeList.concatenate ` to combine the 12
4142``(t, y, x) `` cubes into a single ``(t, y, x) `` cube, where the length
4243of the ``t `` dimension is now 365.
@@ -125,7 +126,7 @@ make a new ``z`` dimension coordinate:
125126
126127The following diagram illustrates what has taken place in this example:
127128
128- .. image :: merge.svg
129+ .. image :: merge.png
129130 :alt: Pictographic of merge.
130131 :align: center
131132
@@ -193,11 +194,11 @@ into a single cube:
193194 cube.attributes keys differ: 'Conventions'
194195
195196Note that :meth: `~iris.cube.CubeList.merge ` returns two cubes here.
196- All the cubes that can be merged have been. Any cubes that can't be merged are
197+ All the cubes that can be merged have been merged . Any cubes that can't be merged are
197198included unchanged in the returned :class: `~iris.cube.CubeList `.
198199When :meth: `~iris.cube.CubeList.merge_cube ` is called on ``cubes `` it raises a
199200descriptive error that highlights the difference in the ``attributes `` dictionaries.
200- It is this difference that is preventing ``cube `` being merged into a
201+ It is this difference that is preventing ``cubes `` being merged into a
201202single cube. An example of fixing an issue like this can be found in the
202203:ref: `merge_concat_common_issues ` section.
203204
@@ -207,22 +208,24 @@ Merge in Iris load
207208
208209The CubeList's :meth: `~iris.cube.CubeList.merge ` method is used internally
209210by the three main Iris load functions introduced in :doc: `loading_iris_cubes `.
210- For file formats such as GRIB and PP, which intrinsically store fields as many
211+ For file formats such as GRIB and PP, which store fields as many
211212individual 2D arrays, Iris loading uses the ``merge `` process to produce a
212- more intuitive higher dimensional cube of each phenomenon.
213+ more intuitive higher dimensional cube of each phenomenon where possible .
213214
214215Sometimes the ``merge `` process doesn't behave as expected. In almost all
215216cases this is due to the input cubes containing unexpected or inconsistent metadata.
216217For this reason, a fourth Iris file loading function, :func: `iris.load_raw `, exists.
217218The :func: `~iris.load_raw ` function is intended as a diagnostic tool that can be used to
218219load cubes from files without the ``merge `` process taking place. The return value of
219220:func: `iris.load_raw ` is always a :class: `~iris.cube.CubeList ` instance.
221+ You can then call the :meth: `~iris.cube.CubeList.merge_cube ` method on this returned
222+ :class: `~iris.cube.CubeList ` to help identify merge related load issues.
220223
221224
222225Concatenate
223226-----------
224227
225- We've seen that the ``concatenate `` process process combines multiple input cubes into a
228+ We've seen that the ``concatenate `` process combines multiple input cubes into a
226229single resultant cube with the same *number of dimensions * as the input cubes,
227230but with the length of one or more dimensions extended by *joining together
228231sequential dimension coordinates *.
@@ -284,7 +287,7 @@ cubes to form a new cube with an extended ``t`` coordinate:
284287
285288The following diagram illustrates what has taken place in this example:
286289
287- .. image :: concat.svg
290+ .. image :: concat.png
288291 :alt: Pictographic of concatenate.
289292 :align: center
290293
@@ -351,11 +354,11 @@ concatenate into a single cube:
351354
352355
353356Note that :meth: `~iris.cube.CubeList.concatenate ` returns two cubes here.
354- All the cubes that can be concatenated have been. Any cubes that can't be concatenated are
357+ All the cubes that can be concatenated have been concatenated . Any cubes that can't be concatenated are
355358included unchanged in the returned :class: `~iris.cube.CubeList `.
356359When :meth: `~iris.cube.CubeList.concatenate_cube ` is called on ``cubes `` it raises a
357360descriptive error that highlights the difference in the ``attributes `` dictionaries.
358- It is this difference that is preventing ``cube `` being concatenated into a
361+ It is this difference that is preventing ``cubes `` being concatenated into a
359362single cube. An example of fixing an issue like this can be found in the
360363:ref: `merge_concat_common_issues ` section.
361364
@@ -529,17 +532,18 @@ error highlighting the presence of the duplicate cube.
529532**Single value coordinates **
530533
531534Coordinates containing only a single value can cause confusion when
532- combining input cubes. In Iris' terminology a **scalar ** coordinate is a
533- coordinate of length 1 *which does not describe a data dimension *. Remember:
535+ combining input cubes. Remember:
534536
535537* The ``merge `` process combines multiple input cubes into a
536538 single resultant cube with new dimensions created from the
537539 **scalar ** *coordinate values * of the input cubes.
538- * The ``concatenate `` process process combines multiple input cubes into a
540+ * The ``concatenate `` process combines multiple input cubes into a
539541 single resultant cube with the same *number of dimensions * as the input cubes,
540542 but with the length of one or more dimensions extended by *joining together
541543 sequential * **dimension ** *coordinates *.
542544
545+ In Iris terminology a **scalar ** coordinate is a
546+ coordinate of length 1 *which does not describe a data dimension *.
543547
544548Let's look at two example cubes to demonstrate this.
545549
@@ -640,6 +644,6 @@ the input cubes using :meth:`~iris.cube.CubeList.concatenate_cube`:
640644**Attributes Mismatch **
641645
642646The ``concatenate `` process is affected by attributes mismatch on input cubes
643- in the same way that the ``merge `` process.
647+ in the same way that the ``merge `` process is .
644648The :ref: `Attributes Mismatch <merge_issues_attrs_mismatch >` section earlier in this
645649chapter gives further information on attributes mismatch.
0 commit comments