API Reference

This page provides an auto-generated summary of pywasps’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

General-purpose functions

pywasp.raster_to_vector(da[, dz, gsize, ...])

Convert raster map to vector map

pywasp.vector_to_raster(gdf, res[, bounds, ...])

Converts a geopandas.GeoDataFrame vector map object to a xarray.DataArray raster map object.

pywasp.LandCoverTable(*args, **kwargs)

Class with methods to work with landcover tables

pywasp.polygons_to_lines(gdf[, lctable, ...])

Converts a geopandas.GeoDataFrame vectormap object to a xarray.DataArray rastermap object.

pywasp.add_met_fields(wco[, fields, air_density])

Add additional fields to a weibull wind climate object

pywasp.estimate_sensitivity_factor(pwc, wtg)

Calculate the sensitivity factor that multiplies the wind uncertainty terms.

pywasp.get_air_density(elev[, source])

Calculate the air density at a given location from reanalysis data

pywasp.bwc_from_tswc(ds[, hist, normalize, ...])

Add timeseries to histogram

pywasp.bwc_resample_like(source, target)

Resamples a histogram to different sector or wind speed bin structure.

pywasp.bwc_resample_sectors(source[, ...])

Resamples a histogram to different sector structure.

pywasp.bwc_resample_wsbins_like(source, target)

Resamples a histogram to different wind speed bin structure.

pywasp.calc_temp_scale(ds[, ...])

Calculate temperature scale

pywasp.stability_histogram(ds[, hist, ...])

Add timeseries to existing histogram

pywasp.gross_aep(wwc, wtg, /[, ...])

Calculate annual energy production (AEP), using the WAsP core Fortran implementation, from Weibull wind climate(s) and Wind Turbine Generator(s) or WindTurbines object.

pywasp.net_aep(loss_table, ds_potential_aep)

Calculates the Net Annual Energy Production (AEP) by applying the losses from a loss table to the potential AEP values provided in the dataset.

pywasp.potential_aep(wwc, wtg, /[, ...])

Calculate Potential Annual Energy Production using wind farm effects from PyWake.

pywasp.px_aep(uncertainty_table, ds_net_aep)

Calculates the Annual Energy Production (AEP) level reached with a given probability.

pywasp.wind_farm_flow_map(wwc, wtg, ...[, ...])

Generate a flow map around a wind farm using py_wake for wake and blockage effects.

pywasp.weibull_fit(bwc[, ...])

Returns sectorwise Weibull parameters using WAsP's fitting algorithm

WAsP

pywasp.wasp

Configuration modules for working with WAsP.

pywasp.wasp.Config([par_set])

Configuration class for the WAsP model parameters

pywasp.wasp.TopographyMap(elev_map, rou_map)

Class for topography maps

pywasp.wasp.get_site_effects_cfd(cfd_files, ...)

Calculate speedups at all points provided

pywasp.wasp.predict_wwc(bwc, topo_map, ...)

Predict a weibull wind climate from a binned wind climate using a topography map

pywasp.wasp.predict_wwc_from_site_effects(...)

Predict a weibull wind climate from a binned wind climate using precalculated site effects

pywasp.wasp.predict_bwc(bwc, topo_map, ...)

Predict a binned wind climate from a binned wind climate using a topography map for given output locations

pywasp.wasp.predict_bwc_from_site_effects(...)

Creates a generalized wind climate using atlas_nt

pywasp.wasp.downscale(gwc, topo_map, output_locs)

Calculate site_effects, downscaled wind climate, and meteorlogical fields in a single step

pywasp.wasp.downscale_from_site_effects(gwc, ...)

Downscale a generalized wind climate using precalculated site effects

pywasp.wasp.downscale_from_geostrophic_and_site_effects_to_wwc(...)

Downscale a geostrophic wind climate using precalculated site effects

pywasp.wasp.downscale_from_geostrophic_and_site_effects_to_bwc(...)

Downscale a geostrophic wind climate using precalculated site effects

pywasp.wasp.generalize(bwc, topo_map[, ...])

Generalizes the wind climate using either the BZ model or a CFD volume.

pywasp.wasp.generalize_from_site_effects(...)

Creates a generalized wind climate using atlas_nt

pywasp.wasp.generalize_from_site_effects_to_geowc(...)

Creates a generalized wind climate using atlas_nt

pywasp.wasp.interpolate_gwc(gwc, /, output_locs)

Spatially interpolate GWC data to a grid of locations.

LINCOM

pywasp.lincom

Routines for running LINCOM and calculating shear exponent

pywasp.lincom.calculate_fetchmap(...)

Calculates a fetchmap for a given domain and wind

pywasp.lincom.roughness_to_landmask(lc_map, ...)

Convert a roughness map to a landmask map

pywasp.lincom.FourierSpace(nx_proj, ny_proj, ...)

FourierSpace object

pywasp.lincom.interpolate_gewc(gewc, target)

Interpolate GEWC file

pywasp.lincom.open_raster(mapfilename[, crs])

Reads grid from raster file

pywasp.lincom.shear_exp_from_wspd(wspd, ...)

Calculate shear exponent using a linear log-log fit from a number of heights

pywasp.lincom.get_spec_corr_fac(wind_ts[, ...])

Calculate spectral correction factor for model time-series

pywasp.lincom.get_return_wind(pewc[, ...])

Use the Gumbel distribution to find the return wind and uncertainty

pywasp.lincom.apply_lut(lut, gewc[, ...])

Apply lookup table to Generalized Extreme Wind Atlas

pywasp.lincom.create_lut(n_sectors, ...)

Run LINCOM to create lookup table for extreme wind estimation

pywasp.lincom.create_wind(wind_type, speed, ...)

Creates an xarray object defining the input wind for a LINCOM simulation

pywasp.lincom.WindLevel(fou_space, ...)

WindLevel object

pywasp.lincom.get_wind_points(wind_level, out_ds)

Calculate point results from wind level for requested domain

User configuration

pywasp.user_config

Configuration for pywasp, saved as an ini file