cf.Field.cell_area¶
-
Field.
cell_area
(radius=None, insert=False, force=False)[source]¶ Return a field containing horizontal cell areas.
New in version 1.0.
See also
Parameters: - radius: optional
The radius used for calculating spherical surface areas when both of the horizontal axes are part of a spherical polar coordinate system. May be any numeric scalar object that can be converted to a
Data
object (which includesnumpy
andData
objects). If unset then the radius is either taken from the “earth_radius” parameter(s) of any coordinate reference construct datums, or, if no such parameter exisits, set to 6371229.0 metres (approximating the radius if Earth). If units are not specified then units of metres are assumed.- Parameter example:
Five equivalent ways to set a radius of 6371200 metres:
radius=6371200
,radius=numpy.array(6371200)
,radius=cf.Data(6371200)
,radius=cf.Data(6371200, 'm')
,radius=cf.Data(6371.2, 'km')
.
- insert:
bool
, optional If True then the calculated cell areas are also inserted in place as an area cell measure object. An existing area cell measure object for the horizontal axes will not be overwritten.
- force:
bool
, optional If True the always calculate the cell areas. By default if there is already an area cell measure object for the horizontal axes then it will 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'))