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.

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.set_hgts([height_from, height_to, n])

Set generalized lib heights automatically

pywasp.wasp.set_z0s([z0meso_from, z0meso_to, n])

Set generalized lib roughness lengths automatically

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(genwc, topo_map, ...)

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

pywasp.wasp.downscale_from_site_effects(...)

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.add_met_fields(wco[, fields, ...])

Add additional fields to a weibull wind climate object

pywasp.wasp.probabilities(wwc, speed_bins[, ...])

Get the probabilities for all speed bins

pywasp.wasp.wtg_to_pywake(wtg)

Converts a PyWAsP WTG to a PyWake WTG

pywasp.wasp.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.wasp.potential_aep(wwc, wtg, /[, ...])

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

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

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

pywasp.wasp.get_air_density(elev[, source])

Calculate the air density at a given location from reanalysis data

pywasp.wasp.bwc_from_timeseries(ds[, hist, ...])

Add timeseries to histogram

pywasp.wasp.bwc_resample_like(source, target)

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

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

Resamples a histogram to different sector structure.

pywasp.wasp.bwc_resample_wsbins_like(source, ...)

Resamples a histogram to different wind speed bin structure.

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

Calculate temperature scale

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

Add timeseries to existing histogram

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

Spatially interpolate GWC data to a grid of locations.

pywasp.wasp.get_climate(output_locs[, ...])

Get climatological parameters interpolated to the output locations

pywasp.wasp.get_climate_by_config(...[, ...])

Get climatological parameters for specified positions and a given config object.

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

Returns sectorwise Weibull parameters using WAsP's fitting algorithm

I/O

pywasp.io

pywasp Input/Output routines

pywasp.io.WaspRasterMap(values, minx, miny, ...)

Stores a roughness or elevation map in a raster format usable by WAsP routines.

pywasp.io.rastermap_to_vectormap(da[, dz, ...])

Convert raster map to vector map

pywasp.io.rastermap_to_waspformat(da[, lctable])

Convert raster to WaspRasterMap expected for WAsP fortran routines.

pywasp.io.vectormap_to_rastermap(gdf, res[, ...])

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

pywasp.io.vectormap_to_waspformat(gdf[, lctable])

Creates a WaspVectorMap object from a geodataframe.

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[, srs])

Reads grid from raster file

pywasp.lincom.grid_from_wasp_rastermap(rastermap)

Convert a WAsP RasterMap object to a Lincom Gridmap xarray object

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[, gewc_interp])

Apply lookup table to Generalized Extreme Wind Atlas

pywasp.lincom.create_lut(nsec, wind_speeds, ...)

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.config

Configuration for pywasp, saved as an ini file