@@ -3708,7 +3708,12 @@ def weights(
3708
3708
weights_axes.discard(xaxis)
3709
3709
weights_axes.discard(yaxis)
3710
3710
if not Weights.cell_measure(
3711
- self, "area", comp, weights_axes, methods=methods
3711
+ self,
3712
+ "area",
3713
+ comp,
3714
+ weights_axes,
3715
+ methods=methods,
3716
+ auto=True,
3712
3717
):
3713
3718
Weights.area_XY(
3714
3719
self,
@@ -4919,7 +4924,6 @@ def collapse(
4919
4924
scale=None,
4920
4925
radius="earth",
4921
4926
great_circle=False,
4922
- cell_measures=True,
4923
4927
verbose=None,
4924
4928
remove_vertical_crs=True,
4925
4929
_create_zero_size_cell_bounds=False,
@@ -5477,14 +5481,12 @@ def collapse(
5477
5481
the field construct's `weights` method:
5478
5482
``f.weights(weights, components=True, axes=axes,
5479
5483
measure=measure, scale=scale, radius=radius,
5480
- great_circle=great_circle,
5481
- cell_measures=cell_measures)``.
5484
+ great_circle=great_circle)``.
5482
5485
5483
- See the *axes*, *measure*, *scale*, *radius*,
5484
- *great_circle*, and *cell_measures* parameters, and
5485
- `cf.Field.weights` for details; and note that the
5486
- value of *scale* may be modified depending on the
5487
- value of *measure*.
5486
+ See the cf.Field.weights` and the *axes*, *measure*,
5487
+ *scale*, *radius*, and *great_circle* parameters for
5488
+ details; and note that the value of *scale* may be
5489
+ modified depending on the value of *measure*.
5488
5490
5489
5491
.. warning:: By default *weights* is `None`, resulting
5490
5492
in **unweighted calculations**.
@@ -5500,9 +5502,10 @@ def collapse(
5500
5502
units of the weights are not combined with
5501
5503
the field's units in the collapsed field.
5502
5504
5503
- .. note:: A pre-calculated weights array may also be
5504
- provided as the *weights* parameter. See
5505
- `cf.Field.weights` for details
5505
+ .. note:: A pre-calculated weights array or dictionary
5506
+ may also be provided as the *weights*
5507
+ parameter. See `cf.Field.weights` for
5508
+ details
5506
5509
5507
5510
If the collapse method and axes have been provided as
5508
5511
a CF cell methods-like string via the *method*
@@ -5619,15 +5622,6 @@ def collapse(
5619
5622
5620
5623
.. versionadded:: 3.2.0
5621
5624
5622
- cell_measures: `bool`, optional
5623
- If True, the default, then area and volume cell
5624
- measure constructs are considered for weights creation
5625
- when *weights* is `True`, ``'area'``, or
5626
- ``'volume'``. If False then cell measure constructs
5627
- are ignored for these *weights*.
5628
-
5629
- .. versionadded:: NEXTVERSION
5630
-
5631
5625
squeeze: `bool`, optional
5632
5626
If True then size 1 collapsed axes are removed from the
5633
5627
output data array. By default the axes which are collapsed
@@ -6733,7 +6727,6 @@ def collapse(
6733
6727
measure=measure,
6734
6728
radius=radius,
6735
6729
great_circle=great_circle,
6736
- cell_measures=cell_measures,
6737
6730
)
6738
6731
if g_weights:
6739
6732
# For grouped collapses, bring the weights
@@ -6768,7 +6761,6 @@ def collapse(
6768
6761
group_by=group_by,
6769
6762
axis_in=axes_in[0],
6770
6763
verbose=verbose,
6771
- cell_measures=cell_measures,
6772
6764
)
6773
6765
6774
6766
if regroup:
@@ -6839,7 +6831,6 @@ def collapse(
6839
6831
measure=measure,
6840
6832
radius=radius,
6841
6833
great_circle=great_circle,
6842
- cell_measures=cell_measures,
6843
6834
)
6844
6835
if d_weights:
6845
6836
d_kwargs["weights"] = d_weights
@@ -7113,7 +7104,6 @@ def _collapse_grouped(
7113
7104
coordinate=None,
7114
7105
measure=False,
7115
7106
weights=None,
7116
- cell_measures=True,
7117
7107
squeeze=None,
7118
7108
group_by=None,
7119
7109
axis_in=None,
0 commit comments