pywasp.lincom.get_spec_corr_fac
- pywasp.lincom.get_spec_corr_fac(wind_ts, fc=0.8, fh=72, f01=0.6, f02=0.9, n=None, ensemble_average_method=False, auto=False)[source]
Calculate spectral correction factor for model time-series
Warning
This function is experimental and its signature may change.
- Parameters:
wind_ts (
xarray.Dataset
) – Dataset with wind_speed variable that has (time, height, south_north, and west_east) dimensions.fc (
float
) – Frequency where to shift from the model spectrum to the extrapolated spectrumfh (
float
) – Highest sample frequency of the extrapolated spectrum #/day (Default: 72 = 20minutes)f01 (
float
) – Frequency used to fit a linear relationship to determine slope of the model spectrumf02 (
float
) – Frequency used to fit a linear relationship to determine slope of the model spectrumn (
xarray.Dataarray
orNone
) – Data array containing values for power spectrum scaling factor n as defined in Eq (4) in Larsen and Ott, 2022 (https://doi.org/10.5194/wes-2022-64) for tropical cyclone affected areas. N must have south_north and west_east dimensionsensemble_average_method (
bool
, default:False
) – use block spectra ensemble average method instead of transforming full time series (as done in e.g WEng) to calculate the power spectrum: split time series in N x 365 day long equivalent blocks, calculate spectrum for each block and calculate ensemble average. This method has been used in e.g. the original spectral correction paper (Larsén et al. 2012, DOI: https://doi.org/10.1175/JAMC-D-11-090.1) and for the TC-adjusted spectral correction method (Larsén and Ott 2022, DOI: https://doi.org/10.5194/wes-7-2457-2022).auto (
bool
) – Run the automatic extrapolation identification script? If true, this ignores the fc, f01, and f02 parameters, instead using pre-set values.
- Returns:
out_ds (
xarray.Dataset
) – PyWAsP xr.Dataset containing spectral correction factors.
Notes
This routine fits a spectrum to model time-series, and then uses the 5/3 extrapolation to create a hybrid spectrum that is used to determine the adjustment of the V50 winds due to the missing spectral information.