windkit.io.wasp.write_rsf#

windkit.io.wasp.write_rsf(filepath, A, k, wdfreq, A_combined, k_combined, power, site_elev, coords, name=None, header=None, power_decimals=4)[source]#

Write resource-file data to a WAsP .rsf/.wrg file.

Delegates to format_rsf(); lines are terminated with CRLF as WAsP expects.

Parameters:
  • filepath (str or Path) – Path to the output file.

  • A (array_like, shape (n_points, n_sectors)) – Sector-wise Weibull A parameters [m/s].

  • k (array_like, shape (n_points, n_sectors)) – Sector-wise Weibull k parameters.

  • wdfreq (array_like, shape (n_points, n_sectors)) – Sector frequencies as 0-1 fractions.

  • A_combined (array_like, shape (n_points,)) – Weibull A of the total distribution [m/s].

  • k_combined (array_like, shape (n_points,)) – Weibull k of the total distribution.

  • power (array_like, shape (n_points,)) – The power column, in the units it should be stored in (power density [W/m2] or power production [Wh/y]).

  • site_elev (array_like, shape (n_points,)) – Site elevation [m].

  • coords (dict) – Dictionary with "west_east", "south_north" and "height" arrays of shape (n_points,).

  • name (array_like of str, optional) – Site names, at most 10 characters each. Defaults to "GridPoint" for every site.

  • header (dict, optional) – WRG grid header with "nx", "ny", "xmin", "ymin" and "cell_size". When given, the header line is prepended (producing a .wrg file).

  • power_decimals (int, optional) – Preferred number of decimals for the power column, see format_rsf(). Defaults to 4.