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 with uvar and vvar on (time, [plev,] lat, lon).

  • uvar, vvar (str, optional) – Wind variable names.

  • level_hpa (float or None, optional) – Pressure level to select, in hPa regardless of the coordinate’s own units; see select_pressure_level. None (default) assumes ds is already on a single level.

  • time_mean (bool, optional) – If True (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 (str or None, optional) – Vertical coordinate name. Default resolves it from ds.

  • **kwargs – Forwarded to compute_ke_spectra (ntrunc, gridtype, rsphere).

Returns:

xarray.Dataset – As compute_ke_spectra, with a leading time dimension when time_mean is False.

Examples

>>> spec250 = compute_ke_spectra_timeseries(ds, level_hpa=250.0)