LocStream¶
-
class
ESMF.api.locstream.LocStream(location_count, coord_sys=None, name=None, esmf=True)¶ The
LocStreamclass is a Python wrapper object for the ESMF LocStream.LocStreamis 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
LocStreamis used to represent the locations of a set of data points. The values of the data points are stored within aFieldcreated 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.For more information about the ESMF LocStream class, please see the ESMF LocStream documentation.
LocStreamfollows 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
LocStreamkey they need to be named with the appropriate identifiers. The particular identifiers depend on the coordinate system (i.e.coord_sysargument) 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