pywasp.wasp.stability_histogram
- pywasp.wasp.stability_histogram(ds, hist=None, finalize=True, revert_to_original=True, ws_bin_width=1, nwsbins=40, nsecs=12, percentile=0.5, wv_count=None, landmask=None)[source]
Add timeseries to existing histogram
Uses the stability parameters to derive summed histogram of the surface layer temperature scale, squared surface layer temperature scale, boundary layer height and logarithm of roughness length. The time dimension is copied so that one can see what was the period that was used to generate the histogram.
- Parameters:
ds (
xarray.Dataset
) – Dataset containing variables [‘wind_speed’, ‘wind_direction’, ‘PSFC’, ‘T2’, ‘UST’, ‘HFX’, ‘LH’, ‘PBLH’, ‘LANDMASK’, ‘ZNT’] Can have any pywasp spatial structurehist (
xarray.Dataset
) – Histogram with dimensions point, wsbin, sectorfinalize (
bool
) – Convert the stabilility histogram into a mean and standard deviation?revert_to_original (
bool
) – Return the histogram input in original format from the inputds
? If false, keeps the data in stacked point format which is more efficient when doing large calculations for numerical wind atlases.ws_bin_width (
float
) – width of wind speed binsnwsbins (
int
) – Number of wind speed binsnsecs (
int
) – Number of sectors (wind direction bins)kwargs – Other keyword arguments passed on to _finalize_meso
- Returns:
hist (
xarray.Dataset
) – Histogram with dimensions point, wsbin, sector with the values from ds-timeseries added.