pcmdi_metrics.effective_resolution.compute_ke_spectra_timeseries
- pcmdi_metrics.effective_resolution.compute_ke_spectra_timeseries(ds, uvar='ua', vvar='va', level_hpa=None, time_mean=True, plev_name=None, **kwargs)[source]
KE spectra for every time step at one pressure level, optionally averaged.
Klaver et al. use 6-hourly winds at 250 and 500 hPa over four months of 2014 and analyse the monthly mean spectra. They note that spectral slopes vary little between months, so the diagnosed effective resolution behaves as a time-invariant model property.
- Parameters:
ds (
xarray.Dataset) – Dataset withuvarandvvaron(time, [plev,] lat, lon).uvar, vvar (
str, optional) – Wind variable names.level_hpa (
floatorNone, optional) – Pressure level to select, in hPa regardless of the coordinate’s own units; see select_pressure_level.None(default) assumesdsis already on a single level.time_mean (
bool, optional) – IfTrue(default), average the spectra over time after computing them. Averaging spectra rather than fields is what the paper does; averaging the fields first would destroy the transient energy the diagnostic lives on.plev_name (
strorNone, optional) – Vertical coordinate name. Default resolves it fromds.**kwargs – Forwarded to compute_ke_spectra (
ntrunc,gridtype,rsphere).
- Returns:
xarray.Dataset– As compute_ke_spectra, with a leadingtimedimension whentime_meanisFalse.
Examples
>>> spec250 = compute_ke_spectra_timeseries(ds, level_hpa=250.0)