pvtend.TendencyComputer

class pvtend.TendencyComputer(config: TendencyConfig)[source]

Computes PV tendency terms for weather events.

Parameterized by TendencyConfig — works for both blocking and PRP event types without code duplication.

Example:

cfg = TendencyConfig(
    event_type="blocking",
    csv_path=Path("events_blocking.csv"),
)
tc = TendencyComputer(cfg)
n = tc.process_event("onset", track_id=42, lat0=55.0,
                     lon0=-30.0, base_ts=pd.Timestamp("2010-01-15"))
print(f"Wrote {n} NPZ files.")
__init__(config: TendencyConfig) None[source]

Methods

__init__(config)

process_event(evt_name, track_id, lat0, ...)

Process a single event and write NPZ files.