pvtend.GridProfile
- class pvtend.GridProfile(name: str, nlat: int, nlon: int, lat_south: float, lat_north: float, dlat: float, dlon: float, lon_west: float, lat_half: float, lon_half: float, z_is_height: bool, inv_band_s: float = 10.5, inv_band_n: float = 85.5)[source]
Static description of an input grid + its PV-inversion geometry (config).
Bundles the regular lat-lon grid metadata, the event-patch half-widths, and the Wu QG piecewise-inversion latitude band. Scope (v2.13): this is metadata/config consumed by callers. The Wu inversion solver (
pvtend.ppvi.solver.invert_piecewise()) is genuinely grid-agnostic (anisotropic-safezhdrreorder + below-ground fill), and the spectral Helmholtz/derivatives (pvtend.sh_ops) are global. The higher-levelTendencyComputerpipeline, however, is still ERA5-specific (it hard-codes the 10.5–85.5°N band andH=z/g), so f09 end-to-end use currently goes through the solver API directly — build the cubes +zhdryourself and passH=zwhenz_is_height(see thepv_inversion/wu_cesmclosure test for a worked example). Two profiles are provided:ERA5_1P5_NH— the default ERA5 1.5° Northern-Hemisphere grid (current behaviour; isotropic Δlat=Δlon=1.5°).CESM_F09— the CESM2-LENS2 f09 global grid (192×288, anisotropic Δlat≈0.942°, Δlon=1.25°). Helmholtz/derivatives run fully global; the Wu QG inversion runs on the mid-latitude band[inv_band_s, inv_band_n](it is singular at the equator/poles, so a truly-global QG inversion is out of scope — the band covers all blocking, ~25–85°N).
Note: CESM
zis geopotential height [m] (useH=zdirectly), whereas ERA5zis geopotential [m²/s²] (H=z/g).- __init__(name: str, nlat: int, nlon: int, lat_south: float, lat_north: float, dlat: float, dlon: float, lon_west: float, lat_half: float, lon_half: float, z_is_height: bool, inv_band_s: float = 10.5, inv_band_n: float = 85.5) None
Methods
__init__(name, nlat, nlon, lat_south, ...[, ...])Attributes
inv_band_ninv_band_sisotropicTrue if Δlat≈Δlon (Wu zhdr ordering is then irrelevant).
namenlatnlonlat_southlat_northdlatdlonlon_westlat_halflon_halfz_is_height