cf.Field.cell_area¶
-
Field.
cell_area
(radius='earth', great_circle=False, insert=False, force=False)[source]¶ Return a field containing horizontal cell areas.
New in version 1.0.
- Parameters
- radius: optional
Specify the radius used for calculating the areas of cells defined in spherical polar coordinates. The radius is that which would be returned by this call of the field construct’s
radius
method:f.radius(radius)
. See thecf.Field.radius
for details.By default radius is
'earth'
which means that if and only if the radius can not found from the datums of any coordinate reference constucts, then the default radius taken as 6371229 metres.- great_circle:
bool
, optional If True then allow, if required, the derivation of i) area weights from polygon geometry cells by assuming that each cell part is a spherical polygon composed of great circle segments; and ii) and the derivation of line-length weights from line geometry cells by assuming that each line part is composed of great circle segments.
New in version 3.2.0.
- insert:
bool
, optional If True then calculated cell areas are also inserted in place as an “area” cell measure construct, unless there is already an existing area cell measure construct for the horizontal axes.
- force:
bool
, optional If True the always calculate the cell areas. By default, if there is already an “area” cell measure construct for the horizontal axes then it will be used provide the area values.
- Returns
Field
A field construct containing the horizontal cell areas.
Examples:
>>> a = f.cell_area() >>> a = f.cell_area(force=True) >>> a = f.cell_area(radius=cf.Data(3389.5, 'km')) >>> a = f.cell_area(insert=True)