LocStream¶

class
ESMF.api.locstream.
LocStream
(*args, **kwargs)¶ 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 location stream (
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.For more information about the ESMF
LocStream
class, please see the ESMF LocStream documentation.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.
Note
Mask must be of type
I4
,and coordinates must by of type
R8
.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 SPH_DEG
ESMF:Lon ESMF:Lat ESMF:Radius SPH_RAD
ESMF:Lon ESMF:Lat ESMF:Radius CART
ESMF:X ESMF:Y ESMF:Z Parameters: