cf.Field.convert¶
-
Field.
convert
(*identity, full_domain=True, cellsize=False, **filter_kwargs)[source]¶ Convert a metadata construct into a new field construct.
The new field construct has the properties and data of the metadata construct, and domain axis constructs corresponding to the data. By default it also contains other metadata constructs (such as dimension coordinate and coordinate reference constructs) that define its domain.
Only metadata constructs that can have data may be converted and they can be converted even if they do not actually have any data. Constructs such as cell methods which cannot have data cannot be converted.
The
cf.read
function allows a field construct to be derived directly from a netCDF variable that corresponds to a metadata construct. In this case, the new field construct will have a domain limited to that which can be inferred from the corresponding netCDF variable - typically only domain axis and dimension coordinate constructs. This will usually result in a different field construct to that created with the convert method.New in version 3.0.0.
- Parameters
- identity, filter_kwargs: optional
Select the unique construct returned by
f.construct(*identity, **filter_kwargs)
. Seeconstruct
for details.- full_domain:
bool
, optional If False then do not create a domain, other than domain axis constructs, for the new field construct. By default as much of the domain as possible is copied to the new field construct.
- cellsize:
bool
, optional If True then create a field construct from the selected metadata construct’s cell sizes.
- Returns
Field
The new field construct.
Examples:
TODO