Field¶
-
class
ESMF.api.field.Field(*args, **kwargs)¶ The Field class is a Python wrapper object for the ESMF Field. The individual values of all data arrays are referenced to those of the underlying Fortran ESMF object.
A Field represents a physical field, such as temperature. The Field class contains distributed and discretized field data, a reference to its associated grid, and metadata. The Field class stores the grid staggering for that physical field. This is the relationship of how the data array of a field maps onto a grid (e.g. one item per cell located at the cell center, one item per cell located at the NW corner, one item per cell vertex, etc.). This means that different Fields which are on the same underlying Grid but have different staggerings can share the same Grid object without needing to replicate it multiple times.
For more information about the ESMF Field class, please see the ESMF Field documentation.
The following parameters are used to create a
Fieldfrom aGrid,MeshorLocStream.REQUIRED:
Parameters: grid (Grid/Mesh/LocStream) – A Grid,MeshorLocStreamwith coordinates allocated on at least one stagger location.OPTIONAL:
Parameters: - name (str) – An optional user friendly name for the
Field. - typekind (TypeKind) – Type of the
Fielddata. IfNone, defaults toR8. - staggerloc (StaggerLoc) – The stagger location of the
Fielddata, only specify this argument when using aGrid. IfNone, defaults toCENTERin 2D andCENTER_VCENTERin 3D. - meshloc (MeshLoc) – The mesh location of the
Fielddata, only specify this argument when using aMeshifNone, defaults toNODE. - ndbounds (tuple) – The number of entries in an extra
Fielddimension. This is represented as a single value, a list or a tuple containing the number of entries for each desired extra dimension of theField.
-
grid¶ Return type: Grid,Mesh, orLocStreamReturns: The discretization object upon which the Fieldis built.
-
staggerloc¶ Return type: StaggerLocorMeshLocReturns: The location upon which the Fieldis built.
-
get_area()¶ Initialize an existing
Fieldwith the areas of the cells of the underlyingGridorMesh.
- name (str) – An optional user friendly name for the