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
Field
from aGrid
,Mesh
orLocStream
.REQUIRED:
Parameters: grid (Grid/Mesh/LocStream) – A Grid
,Mesh
orLocStream
with 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
Field
data. IfNone
, defaults toR8
. - staggerloc (StaggerLoc) – The stagger location of the
Field
data, only specify this argument when using aGrid
. IfNone
, defaults toCENTER
in 2D andCENTER_VCENTER
in 3D. - meshloc (MeshLoc) – The mesh location of the
Field
data, only specify this argument when using aMesh
ifNone
, defaults toNODE
. - ndbounds (tuple) – The number of entries in an extra
Field
dimension. 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
, orLocStream
Returns: The discretization object upon which the Field
is built.
-
staggerloc
¶ Return type: StaggerLoc
orMeshLoc
Returns: The location upon which the Field
is built.
-
get_area
()¶ Initialize an existing
Field
with the areas of the cells of the underlyingGrid
orMesh
.
- name (str) – An optional user friendly name for the