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 structure

  • hist (xarray.Dataset) – Histogram with dimensions point, wsbin, sector

  • finalize (bool) – Convert the stabilility histogram into a mean and standard deviation?

  • revert_to_original (bool) – Return the histogram input in original format from the input ds? 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 bins

  • nwsbins (int) – Number of wind speed bins

  • nsecs (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.