pvtend.TendencyConfig

class pvtend.TendencyConfig(event_type: str = 'blocking', data_dir: Path = PosixPath('/net/flood/data2/users/x_yan/era'), clim_path: Path = PosixPath('/net/flood/data2/users/x_yan/era/era5_hourly_clim_1990-2019.nc'), clim_helmholtz_dir: Path = PosixPath('/net/flood/data2/users/x_yan/era/clim'), output_dir: Path = PosixPath('/net/flood/data2/users/x_yan/composite_blocking_tempest'), csv_path: Path = PosixPath('.'), track_file: Path = PosixPath('.'), levels: list[int] = <factory>, wavg_levels: list[int] = <factory>, rel_hours: list[int] = <factory>, year_start: int = 1990, year_end: int = 2020, lat_half: float = 21.0, lon_half: float = 36.0, partial_at_pole: bool = True, qg_omega_method: str = 'log20', center_mode: str = 'eulerian', skip_existing: bool = True, engine: str = 'netcdf4', n_workers: int = 1)[source]

Configuration for PV tendency computation.

event_type

'blocking' or 'prp'.

Type:

str

data_dir

Path to ERA5 monthly NetCDF files.

Type:

pathlib.Path

clim_path

Path to climatology file or directory.

Type:

pathlib.Path

clim_helmholtz_dir

Directory with pre-computed Helmholtz climatology files (from pvtend-pipeline clim-helmholtz).

Type:

pathlib.Path

output_dir

Root output directory for NPZ files.

Type:

pathlib.Path

csv_path

Path to TempestExtremes event CSV.

Type:

pathlib.Path

track_file

Path to tracking data file (for lagrangian mode).

Type:

pathlib.Path

levels

Pressure levels [hPa].

Type:

list[int]

wavg_levels

Subset of levels used for vertical weighted averaging.

Type:

list[int]

rel_hours

Relative hour offsets from the event reference time.

Type:

list[int]

year_start

First event year.

Type:

int

year_end

Last event year.

Type:

int

lat_half

Half-width of the extraction patch in degrees latitude.

Type:

float

lon_half

Half-width of the extraction patch in degrees longitude.

Type:

float

partial_at_pole

Allow truncated patches near the poles.

Type:

bool

qg_omega_method

'log20' (SIP) or 'sp19' (empirical scaling).

Type:

str

center_mode

'eulerian' or 'lagrangian'.

Type:

str

skip_existing

Skip events with existing NPZ output.

Type:

bool

engine

NetCDF engine passed to xarray.

Type:

str

n_workers

Number of parallel workers for multiprocessing.

Type:

int

__init__(event_type: str = 'blocking', data_dir: Path = PosixPath('/net/flood/data2/users/x_yan/era'), clim_path: Path = PosixPath('/net/flood/data2/users/x_yan/era/era5_hourly_clim_1990-2019.nc'), clim_helmholtz_dir: Path = PosixPath('/net/flood/data2/users/x_yan/era/clim'), output_dir: Path = PosixPath('/net/flood/data2/users/x_yan/composite_blocking_tempest'), csv_path: Path = PosixPath('.'), track_file: Path = PosixPath('.'), levels: list[int] = <factory>, wavg_levels: list[int] = <factory>, rel_hours: list[int] = <factory>, year_start: int = 1990, year_end: int = 2020, lat_half: float = 21.0, lon_half: float = 36.0, partial_at_pole: bool = True, qg_omega_method: str = 'log20', center_mode: str = 'eulerian', skip_existing: bool = True, engine: str = 'netcdf4', n_workers: int = 1) None

Methods

__init__(event_type, data_dir, clim_path, ...)

Attributes

center_mode

clim_helmholtz_dir

clim_path

csv_path

data_dir

engine

event_type

lat_half

lon_half

n_workers

output_dir

partial_at_pole

qg_omega_method

skip_existing

track_file

year_end

year_start

levels

wavg_levels

rel_hours