DropCoords

class of dascore.proc.coords
inherits from: PatchProcessor, DascoreBaseModel, pydantic.main.BaseModel
source

DropCoords(
    *args ,
    coords: tuple[Any, …] = (),
)-> None

Drop one or more non-dimensional coordinates.

Parameters

Parameter Description
*coords One or more coordinates to drop. Each can be a coordinate name or
a sequence of them.

Examples

import numpy as np
import dascore as dc
pa = dc.get_example_patch("random_patch_with_lat_lon")
# Drop non-dimensional coordinate latitude
pa_no_lat = pa.drop_coords("latitude")
# A sequence of names works as well.
pa_no_lat = pa.drop_coords(["latitude"])

Methods

Name Description
check Refuse a patch which does not carry what the operation needs.
get_metadata Return the coordinates which survive; a dimension cannot go.
new Create new instance with some attributed updated.
drop_coords Drop one or more non-dimensional coordinates.
reconcile Return the result’s metadata once the data are known; default as is.
run Run the operation: check, get_metadata, kernel, reconcile, record.