LocStream¶
- class ESMF.api.locstream.LocStream(location_count, coord_sys=None, name=None, esmf=True)¶
The
LocStream
class is a Python wrapper object for the ESMF LocStream.LocStream
is a derived type of a Python dictionary.The individual values of all key arrays are referenced to those of the underlying Fortran ESMF object.
A
LocStream
is used to represent the locations of a set of data points. The values of the data points are stored within aField
created using theLocStream
.In the data assimilation world, location streams can be thought of as a set of observations. Their locations are generally described using Cartesian
(x, y, z)
, or(lat, lon, height)
coordinates. There is no assumption of any regularity in the positions of the points. To make the concept more general, the locations for each data point are represented using a construct called keys. Keys can include other descriptors besides location, including a second set of coordinates.Refer to the LocStrea Class of the ESMF Reference Manual for more information.
LocStream
follows standard dictionary syntax. For example:>>> locstream["ESMF:X"] = [1, 2, 3] >>> x = locstream["ESMF:X"] >>> locstream["ESMF:Y"] = [1, 2, 3] >>> y = locstream["ESMF:Y"] >>> locstream["ESMF:Mask"] = [0, 1, 0] >>> mask = locstream["ESMF:Mask"]
Note
Setting keys of lists of mixed types can result in errors due to type mismatches from the ESMF library.
For ESMF to be able to recognize coordinates specified in a
LocStream
key they need to be named with the appropriate identifiers. The particular identifiers depend on the coordinate system (i.e.coord_sys
argument) used to create theLocStream
.The valid values are:
Coordinate System
dimension 1
dimension 2
dimension 3
ESMF:Lon
ESMF:Lat
ESMF:Radius
ESMF:Lon
ESMF:Lat
ESMF:Radius
ESMF:X
ESMF:Y
ESMF:Z
- Parameters