pvtend.EventPatch
- class pvtend.EventPatch(grid: NHGrid, lat_half: float = 21.0, lon_half: float = 36.0)[source]
Event-centred patch extraction from a full NH grid.
- grid
The underlying NHGrid.
- Type:
Methods
__init__(grid[, lat_half, lon_half])extract(data, ilat, ilon[, eff_north, eff_south])Extract event-centred patch from (..., nlat, nlon) data.
nearest_idx(lat0, lon0)Find nearest grid index and check if patch fits.
relative_grid()Return relative coordinate arrays (Y_rel, X_rel) in degrees.
wrapped_lon_index(ilon)Return longitude indices with periodic wrapping.
Attributes
lat_padNumber of grid points of padding in latitude.
lon_padNumber of grid points of padding in longitude.
patch_shapeShape of the extracted patch (nlat_patch, nlon_patch).