tams.idealized.Blob#
- class tams.idealized.Blob(center=(0, 0), width=1, *, height=None, angle=0, depth=20, tendency=None)#
An elliptical blob that can be used to represent a cloud element (or part of one, if blobs are overlapping).
- Parameters:
center (array-like of
float) – Center of the blob. Shape(2,): (\(x\), \(y\)) (lon, lat) degrees.width (float) – Width of the blob (along the x-axis before rotation).
height (float | None) – Height of the blob (along the y-axis before rotation). Assumed same as width if not provided (i.e., circular blob).
angle (float) – Angle of rotation (degrees). When angle is 0, width is along the x-axis. Positive angles are counter-clockwise.
depth (float) – Relative to the environment/background, the well depth of the center of the blob. Higher depth means a larger negative anomaly. In TAMS, 235 K cloud-top temperature is used to define cloud elements, while 219 K areas are assumed to represent embedded overshooting tops.
tendency (
dict, optional) – Tendency in any of the blob parameters above (center, width, height, angle, depth). Units: per hour. You can also useset_tendency()to set the tendency after creating the blob. The default tendency is 0 for all parameters.
- __init__(center=(0, 0), width=1, *, height=None, angle=0, depth=20, tendency=None)#
Methods
copy()Return a copy of the blob.
evolve(hours, /)Evolve the blob in place by the given number of hours.
get_tendency([key, copy])Get the current tendency of one or all (default) of the ellipse parameters.
merge(other)Merge with another blob, creating a new blob with area-weighted-average characteristics.
set_tendency(**kwargs)Set in place the tendency of one or more of the ellipse parameters in per hour units.
split([n])Split the blob into n smaller blobs that line up along the minor axis.
to_geopandas(*[, crs])Convert the blob to a GeoPandas GeoSeries, using the polygon.
to_patch(**kwargs)Convert the blob to a Matplotlib Ellipse patch.
well(x, y)Parabolic well function.
Attributes
The ellipse as a
shapely.Polygon.The ellipse perimeter as a
shapely.LinearRing.